Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
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
                                    -♦-