Rewind
◄Example► ◄Back► ◄Contents► ◄Index►
──────────────────────────────────────────────────────────────────────────────
;* Rewind - Rewinds an open file, specified by handle. See the GetFileSize
;* procedure for an example of using Function 42h to determine file size.
;*
;* Shows: DOS Function - 42h (Set File Pointer)
;*
;* Params: handle - File handle
;*
;* Return: None
Rewind PROC \
handle:WORD
mov bx, handle ; BX = file handle
mov ax, 4200h ; AH = function #,
; AL = move to beginning of
sub cx, cx ; file plus offset
sub dx, dx ; CX:DX = offset (zero)
int 21h ; Move File Read/Write Pointer
ret
Rewind ENDP
-♦-