Home GEMDOSGEMDOS Memory managementMemory management System functionsSystem functions

5.13 Network functions

Fflush Flush file
Flock Lock file from current position
Frlock Lock a file record
Frunlock Unlock a file record
Funlock Unlock file
Nversion Network identifier determine

5.13.1 Fflush

Name: »Fflush« - Flush the buffer of a file
 
Opcode: 102 (0x0066)
 
Syntax: int32_t Fflush ( int16_t handle );
 
Description: The GEMDOS routine Fflush writes all modified data of the specified file handle from its buffer to the disk.
 
Return value: Returns E_OK on success, or a negative GEMDOS error code otherwise.
 
Availability: Available when a network driver is installed.
 
Group: Network functions
 
See also: Binding
 

5.13.1.1 Bindings for Fflush

C: int32_t Fflush ( int16_t handle );
 
Assembler:
 
move.w    handle,-(sp) ; Offset 2
move.w    #102,-(sp)   ; Offset 0
trap      #1           ; GEMDOS
addq.l    #4,sp        ; correct stack

5.13.2 F_lock

Name: »Flock« - Protect a portion of a file
 
Opcode: 100 (0x0064)
 
Syntax: int32_t Flock ( int16_t handle, int32_t length );
 
Description: The GEMDOS routine Flock serves to protect a portion of a file (from the current position) from access by other processes across a network. The following apply:
 
Parameter Meaning
   
handle File ID
length Number of bytes affected

Note: Please do not confuse this function ($64) with Flock ($5C) from the specification for GEMDOS File Sharing & Record Locking.
 
Return value: Returns E_OK on success, or a negative GEMDOS error code otherwise.
 
Availability: Available when a network driver is installed.
 
Group: Network functions
 
See also: Binding Funlock
 

5.13.2.1 Bindings for F_lock

C: int32_t Flock ( int16_t handle, int32_t length );
 
Assembler:
 
move.l    length,-(sp) ; Offset 4
move.w    handle,-(sp) ; Offset 2
move.w    #100,-(sp)   ; Offset 0
trap      #1           ; GEMDOS
addq.l    #8,sp        ; correct stack

5.13.3 Frlock

Name: »Frlock« - Protect a portion of a file
 
Opcode: 98 (0x0062)
 
Syntax: int32_t Frlock ( int16_t handle, int32_t start, int32_t length );
 
Description: The GEMDOS routine Frlock serves to protect a portion of a file from access by other processes across a network. The following apply:
 
Parameter Meaning
   
handle File ID
start Start position in the file
length Number of bytes affected
Return value: Returns E_OK on success, or a negative GEMDOS error code otherwise.
 
Availability: Available when a network driver is installed.
 
Group: Network functions
 
See also: Binding Frunlock Nversion
 

5.13.3.1 Bindings for Frlock

C: int32_t Frlock ( int16_t handle, int32_t start, int32_t length );
 
Assembler:
 
move.l    length,-(sp) ; Offset 8
move.l    start,-(sp)  ; Offset 4
move.w    handle,-(sp) ; Offset 2
move.w    #98,-(sp)    ; Offset 0
trap      #1           ; GEMDOS
lea       12(sp),sp    ; correct stack

5.13.4 Frunlock

Name: »Frunlock« - Unlock a portion of a file
 
Opcode: 99 (0x0063)
 
Syntax: int32_t Frunlock ( int16_t handle, int32_t start );
 
Description: The GEMDOS routine Frunlock serves to unlock the locked portion of a file. The following apply:
 
Parameter Meaning
   
handle File ID
start Start position in the file
Return value: Returns E_OK on success, or a negative GEMDOS error code otherwise.
 
Availability: Available when a network driver is installed.
 
Group: Network functions
 
See also: Binding Frlock Nversion
 

5.13.4.1 Bindings for Frunlock

C: int32_t Frunlock ( int16_t handle, int32_t start );
 
Assembler:
 
move.l    start,-(sp)  ; Offset 4
move.w    handle,-(sp) ; Offset 2
move.w    #99,-(sp)    ; Offset 0
trap      #1           ; GEMDOS
addq.l    #8,sp        ; correct stack

5.13.5 Funlock

Name: »Funlock« - Unlock a portion of a file
 
Opcode: 101 (0x0065)
 
Syntax: int32_t Funlock ( int16_t handle );
 
Description: The GEMDOS routine Funlock serves to unlock the portion of a file previously locked by Flock. The following apply:
 
Parameter Meaning
   
handle File ID
Return value: Returns E_OK on success, or a negative GEMDOS error code otherwise.
 
Availability: Available when a network driver is installed.
 
Group: Network functions
 
See also: Binding Flock
 

5.13.5.1 Bindings for Funlock

C: int32_t Funlock ( int16_t handle );
 
Assembler:
 
move.w    handle,-(sp) ; Offset 2
move.w    #101,-(sp)   ; Offset 0
trap      #1           ; GEMDOS
addq.l    #4,sp        ; correct stack

5.13.6 Nversion

Name: »Nversion« - Network identifier determine
 
Opcode: 96
 
Syntax: int32_t Nversion( void );
 
Description: Returns the identifier of the connected network
 
Return value:
 

ID Name
1 Bionet
2 A-Net
3 Elan
4 TSE-Net
5 Atlanet
6 PAMs-Net
7 Transnet
Availability:
 
Group: Network functions
 
See also: Binding
 

5.13.6.1 Bindings for Nversion

C: int32_t Nversion( void );
 
Assembler:
 
move.w    #96,-(sp)    ; Offset 0
trap      #1           ; GEMDOS
addq.l    #2,sp        ; correct stack

Home GEMDOSGEMDOS Memory managementMemory management System functionsSystem functions