Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Int 21h Function 42h
 Detail Example                          Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Interrupt:   21h     Function:   42h
 
  Title:       Set File Pointer
 
  See also:    Read File or Device, Write to File or Device, @GetFileSize,
               @MovePtrAbs, @MovePtrRel
 
  Description:
 
     Sets the file location pointer relative to the start-of-file,
     end-of-file, or the current file position.
 
     Input                             Output
 
     AH = 42h                          If function successful
     AL = Method code                    Carry flag: clear
        = 00h Absolute offset            DX = Most significant half of
              from start of file              resulting file pointer
        = 01h Signed offset from         AX = Least significant half
              current file pointer            of resulting file pointer
        = 02h Signed offset from
              end of file              If function unsuccessful
     BX = Handle                         Carry flag: set
     CX = Most significant half          AX = Error code (01h or 06h)
          of offset                      See: Error codes
     DX = Least significant half
          of offset
                                    -♦-