home *** CD-ROM | disk | FTP | other *** search
- include asm.inc
-
- public read_from_file
-
- .code
- extn ms_dos_strerror
-
- ;; read from file
- ;
- ; entry BX file handle
- ; CX byte count
- ; ES:DI destination
- ; exit AX number of bytes read
- ; Cf if error
- ;
- read_from_file proc
- push ds
- mov ah,3Fh
- push es
- pop ds
- xchg dx,di
- call ms_dos_strerror
- xchg di,dx
- pop ds
- ret
- read_from_file endp
-
- end
-