|
8086 File IO
read form a file which is already opened. Check index for full io
check the procedure below for the same
readfil proc near ;requires offset of buffer in si
mov bx,word ptr [file_handle] ;number of bytes to read in cx
mov dx,si ; on error cf is set and returns
mov ah,3fh ; error code in ax
int 21h
jc error_readfil_12
ret
error_readfil_12:
mov ax,0
stc
ret
endp
|