0

I've written a program in assembler, however, my program can't go to specified directory. The error is : carry flag = 1, ax=03h.

My mount is: mount P: D:\ProgramFiles\Asembler I have created a folder "programfiles in my "Asembler" folder, it's purpose is to act like a real hard drive.

.model small
.stack 100h
.data  
dirr db "P:\programfiles\",  0
testt db "P:\programfiles\kz2", 0
.code
start:
mov dx, @data
mov ds, dx

mov dx, offset dirr           ;DS:DX pathname
mov ah, 3Bh
int 21h

mov dx, offset testt
mov ah, 39h
int 21h

mov ah, 4ch
mov al, 0
int 21h

end start

Any help is appreciated

rkhb
  • 14,159
  • 7
  • 32
  • 60
Pijus
  • 53
  • 9
  • I tried "\programfiles\" (without disk letter). – Pijus Nov 01 '15 at 11:58
  • 1
    The name `programfiles` is too long. DOS can only work with [8.3 names](https://en.wikipedia.org/wiki/8.3_filename). Take a look [here](http://stackoverflow.com/a/24009482/3512216). – rkhb Nov 01 '15 at 12:06
  • @rkhb thank you very much, by the way how should i write path name if it contains a space? – Pijus Nov 01 '15 at 12:17
  • 1
    There are no spaces allowed in 8.3 names. You have to use the short name instead of the long name with space. Follow my second link above to find out how to get the short name. – rkhb Nov 01 '15 at 12:25
  • @rkhb thanks, now i get it :) – Pijus Nov 01 '15 at 12:30
  • @rkhb In 8.3 names spaces are allowed. But typically they are not being used, certainly not from the command prompt. Using them programmatorically should work. – Sep Roland Nov 01 '15 at 15:55
  • @rkhb i have one more problem my brains can not find the reason, should i post it there or should i create new question. hopefully you guys will easily find the problem, because i was thinking on this a lot – Pijus Nov 01 '15 at 21:56
  • @Pijus: How many brains do you have? :-) First have a pause and do anything total different (sleep). Second ask Google for a solution. Third read the [fine manual here](http://stackoverflow.com/help/asking) and [create a MCVE](http://stackoverflow.com/help/mcve). Then create a new question and give all the information an answerer needs. – rkhb Nov 01 '15 at 22:13
  • @rkhb only one.. It's hard to go to sleep when the deadline is coming for my task, and I stuck with the first steps of the program. – Pijus Nov 01 '15 at 22:25

0 Answers0