home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Programmer's Library 1.3 / Microsoft-Programers-Library-v1.3.iso / sampcode / dos_ency / 7 / pointer2.asm < prev   
Encoding:
Assembly Source File  |  1988-08-11  |  780 b   |  21 lines

  1. fhandle dw      ?               ; handle from previous open
  2.  
  3.         .
  4.         .
  5.         .
  6.                                 ; position the file pointer
  7.                                 ; to the end of file...
  8.         mov     cx,0            ; CX = high part of offset
  9.         mov     dx,0            ; DX = low part of offset
  10.         mov     bx,fhandle      ; BX = handle for file
  11.         mov     al,2            ; AL = positioning mode
  12.         mov     ah,42h          ; Function 42H = position
  13.         int     21h             ; transfer to MS-DOS
  14.         jc      error           ; jump if function call failed
  15.  
  16.                                 ; if call succeeded, DX:AX
  17.                                 ; now contains the file size
  18.         .
  19.         .
  20.         .
  21.