Create directory in Assembly


Write a program to create directory assembly program.

 Write assembly program to create directory.

 Create directory using assembly programming.

 Program:-

;create 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 create  : $"

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

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,39h

 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