printmsg macro msg
mov ah,09h
lea dx,msg
int 21h
endm
_DATA segment
cr equ 0dh
lf equ 0ah
msg1 db cr,lf,'Enter the name of the Dir to be changed :$'
msg2 db cr,lf,'Dir not found$'
filen db 80 dup(0)
_DATA ends
_CODE segment
assume cs:_CODE,ds:_DATA
start: mov ax,_DATA
mov ds,ax
printmsg msg1
lea si,filen
rdchar: mov ah,01h
int 21h
cmp al,cr
je skip
mov [si],al
inc si
jmp rdchar
skip: mov ah,3bh
lea dx,filen
int 21h
jnc succ
printmsg msg2
succ: mov ah,4ch
mov al,00h
int 21h
_CODE ends
end start
0 comments:
Post a Comment