-3

I tried to use interrupt 3bh/21h for change directory to the root and display it, but that doesn't work. I copy program to c:/folder and execute it.

.model  tiny

ORG 100h  
.DATA


root db "\",0
buf DB   64 dup('$') 

.CODE
 start:
mov ax, @data
mov ds, ax



mov ah,3bh
mov dx,offset root
int 21h

mov ah,47h
mov si,offset buf   
mov dl,0       
int 21h         

mov ah,9        
mov dx,offset buf   
int 21h


mov ax,4c00h
int 21h
end start
lifetowin
  • 107
  • 2
  • 11

1 Answers1

0

It displays nothing because the root path has no pathname. Try it with a subdirectory e.g. "\tmp" (or something existing). Caution: You must use 8.3-pathnames.

BTW: Your combination

.model  tiny

ORG 100h  
.DATA
...
.CODE
...

is wrong.

rkhb
  • 14,159
  • 7
  • 32
  • 60