Write a
program to delete directory assembly program.
Write assembly program to delete directory.
Delete directory using assembly programming.
Program:-
;delete 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 delete :
$"
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,3ah
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
Output:-
No comments:
Post a Comment