Program :
m_name macro msg
mov ah,09h
mov dx,offset msg
int 21h
endm
data segment
msg1 db 'enter the file to be created$'
msg2 db 0dh,0ah,'unable to create$'
filename db 80 dup(0)
data ends
code segment
assume cs:code,ds:data
main proc
mov ax,data
mov ds,ax
m_name msg1
mov si,offset filename
l1:
mov ah,01h
int 21h
cmp al,0dh
je l2
mov [si],al
inc si
jmp l1
l2:
mov dx,offset filename
mov ah,39h
int 21h
jnc l3
m_name msg2
l3:
mov ah,4ch
int 21h
main endp
code ends
end main
Saturday, November 3, 2007
File Creation
Posted by MarchingSoul at 8:37 PM
Labels: Microsoft Assembler
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment