It creates a file named trail.try and then uses function 40h to write a string of ASCII characters to the file function 3Eh is used to close file.
;named trail.try.
data segment
org 1000h
handle dw? ; reserve ram for handle variable
data ends
code segment
mov sp,6000h
mov dx,path
mov ah,03ch
mov cx,0000h
int 21h
mov handle,ax
mov bx,ax
mov ah,40h
mov cx,0005h
mov dx,msg
int 21h
mov ax,3e00h
mov bx,handle
int 21h
path: 'db' A: TRAIL.TRY',00h
msg: db 'hello'; msg to be written
code ends
You might be also interested in:
:: Data transfer instructions of 8086 microprocessor
:: 8085 Microprocessor simulator for linux
::Interfacing pic microcontroller with LCD
:: Serial Port interfacing with atmega
No comments:
Post a Comment