home *** CD-ROM | disk | FTP | other *** search
- include asm.inc
-
- public input_file_size
-
- .code
- extn ms_dos_strerror
-
-
- ;; input file size
- ;
- ; entry BX file handle
- ; exit DX AX size
- ;
- input_file_size proc
- pushm cx,di,si
- mov ax,4201h ; get current position
- movx cx,0
- movx dx,0
- call ms_dos_strerror
- jc ifs1
- mov si,dx ; into SI DI
- mov di,ax
-
- mov ax,4202h ; move to end of file
- movx dx,0
- call ms_dos_strerror
- jc ifs1
-
- pushm ax,dx
- mov ax,4200h ; restore file position
- mov cx,si
- mov dx,di
- call ms_dos_strerror
- popm dx,ax
-
- ifs1: popm si,di,cx
- ret
- input_file_size endp
-
-
- end
-