•  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-FileFforce()
Fdup()                                                               GEMDOS

Syntax

LONG Fdup( shandle )
WORD shandle;

Function      Fdup() duplicates a standard file handle (0-5) and assigns
              it a new handle (>6).

Opcode        69 (0x45)

Availability  All GEMDOS versions.

Parameters    shandle is the standard GEMDOS handle to be duplicated.

Binding       move.w   shandle,-(sp)
              move.w   #$45,-(sp)
              trap     #1
              addq.l   #4,sp

Return Value  Fdup() returns a normal GEMDOS file handle in the lower WORD
              of the returned LONG. If the LONG return value is negative
              then it should be treated as a GEMDOS error code.

Comments      This function is generally used to save a standard file
              handle so that an Fforce() operation may be undone.

See Also      Fforce()