•  Back 
  •  GEMDOS Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-FileFseek()                                                              GEMDOS

Syntax

LONG Fseek( offset, handle, mode )
LONG offset;
WORD handle,mode;

Function      Fseek() moves the file position pointer within a GEMDOS
              file.

Opcode        66 (0x42)

Availability  All GEMDOS versions.

Parameters    handle specifies the GEMDOS file handle of the file pointer
              to modify. The meaning of offset varies with mode as
              follows:

              Name    mode  Meaning

              SEEK_SET  0   offset specifies the positive number of bytes
                            from the beginning of the file.

              SEEK_CUR  1   offset specifies the negative or positive
                            number of bytes from the current file
                            position.

              SEEK_END  2   offset specifies the positive number of bytes
                            from the end of the file.

Binding       move.w   mode,-(sp)
              move.w   handle,-(sp)
              move.l   offset,-(sp)
              move.w   #$42,-(sp)
              trap     #1
              lea      10(sp),sp

Return Value  Fseek() returns a positive value representing the new
              absolute location of the file pointer from the beginning of
              the file or a negative GEMDOS error code.