Set directory using assembly programming.


 Write a program to set directory assembly program.

 Write assembly program to set directory.

 Set directory using assembly programming.

Program:-

;set directory

printstring macro msg

mov ah,09h

mov dx,offset msg

int 21h

endm

data segment

imsg db 13,10,"Enter name of the directory to access  : $"

smsg db 13,10," !! Success  !! $"

fmsg db 13,10,"  !! Faliure  !! $"

dname db 20 dup(0)

data ends

code segment

assume cs:code,ds:data

start:

mov ax,data

mov ds,ax

;set present directory

printstring imsg

mov si,offset dname

 

ri:

 mov ah,1

int 21h

cmp al,13

je crd

mov [si],al

inc si

jmp ri

crd:

 mov ah,3bh

 mov dx,offset dname

 int 21h

jnc succ

printstring fmsg

jmp exit

succ:printstring smsg

exit:

 mov ah,4ch

int 21h

code ends

end start

 


   

No comments:

Post a Comment