Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File5.10.9 Fdup TOS Name: »File duplicate« - Duplicate a file handle. Opcode: 69 Syntax: int16_t Fdup ( int16_t handle ); Description: The GEMDOS routine Fdup duplicates a standard file handle (0-5) and assigns it a new handle (>6) for a standard channel. The following apply: handle Meaning 0 Keyboard (stdin:) 1 Screen (stdout:) 2 Serial port (stdaux:) 3 Parallel port (stdprn:) Note: In all known GEMDOS versions (up to and including 0.19) errors occur if, after an Fdup, a program is started with Pexec. As of MagiC 4, one can also use this function to the device files -1, -2, -3 (system global) and -4 (NULL device). Return value: The function returns the following results: ENHNDL : No more handles available. EIHNDL : Incorrect file handle. Otherwise : The desired new handle. Availability: All GEMDOS versions. Group: File functions See also: Binding Fforce