I$Seek

From NitrOS-9
Jump to: navigation, search
Reposition the logical file pointer Reposition the logical file pointer
OS9 I$Seek 103F 88

Entry Conditions

A path number

X most significant 16 bits of desired file position

U least significant 16 bits of desired file position

Error Output

CC carry set on error

B error code, if any

Additional Information

  • The Seek call repositions the path's logical file pointer, the 32-bit address of the next byte in the file to be read from or written to.
  • You can perform a seek to any value, regardless of the file's size. Later writes automatically expand the file to the required size (if possible). Later reads, however, return an end-of-file condition. Note that a seek to Address 0 is the same as a rewind operation.
  • NitrOS-9 usually ignores seeks to non-random access devices, and returns without error.
  • On RBF devices, seeking to a new disk sector causes the internal disk buffer to be rewritten to disk if it has been modified. Seek does not change the state of record locking.