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.27 Fselect TOS Name: »Fselect« - Enquiry of the file status with timeout. Opcode: 285 Syntax: int32_t Fselect ( int16_t timeout, int32_t *rfds, int32_t *wfds, ((int32_t) 0) ); Description: The function Fselect checks which open files are ready for reading or writing. The parameter rfds points to a LONG bitmap which describes the set of GEMDOS read file descriptors to wait for. In this longword, bit n is set when the file descriptor n is to be checked for input. An empty set may also be represented optionally by a NULL-pointer. In the same way, wfds points to a set of write file descriptors whose output status is to be checked. On return of the function, the handles of the files that are ready for reading or writing respectively and also should be checked are passed in rfds and wfds. Note that currently the only BIOS device Fselect works with is the keyboard. With timeout one can specify how many milliseconds one should wait before the function returns. A value of 0 means in this case that the function waits until one of the specified files is ready for reading or writing. Example: Fselect (0, 0L, 0L, 0L) waits forever Fselect (1, 0L, 0L, 0L) waits for one millisecond Return value: The function can return the following results: 0 : In the specified time no files were ready for reading or writing (timeout) >0 : Sum of the set bits of rfds and wfds EIHNDL : At least one of the handles is not assigned to an open file Availability: As of the first in MultiTOS integrated MiNT version 1.04. Group: File functions See Also: Binding Finstat Foutstat