I am learning assembler this year and I don't know how to print a string from a text file how to do that??
I am learning in the program notepad++ and run the program in dos box 8086
Thanks for the helpers..
proc OpenFile
; Open file for reading and writing
mov ah, 3Dh
mov al, 2
mov dx, offset filename
int 21h
jc openerror
mov [filehandle], ax
ret
openerror:
mov dx, offset ErrorMsg
mov ah, 9h
int 21h
ret
endp OpenFile
proc WriteToFile
; Write message to file
mov ah,40h
mov bx, [filehandle]
mov cx,12
mov dx,offset user_name
int 21h
ret
endp WriteToFile
proc CloseFile
doPush ax,bx
; Close file
mov ah,3Eh
mov bx, [filehandle]
int 21h
doPop bx,ax
ret
endp CloseFile
And how to read and print from a text file??