•  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-FileBconin()
Fputchar()
Fread()
Fgetchar()                                                           GEMDOS

Syntax

LONG Fgetchar( handle, mode )
WORD handle, mode;

Function      Fgetchar() reads a character from the specified handle.

Opcode        263 (0x107)

Availability  This function is available under all MiNT versions
              integrated with MultiTOS.

Parameters    handle is a valid GEMDOS handle to read from. If handle is
              a TTY then mode (a bit mask) has meaning as follows:

              Name        mode   Meaning

              TTY_COOKED  0x01   Cooked mode. Special control characters
                                 such as ctrl-c and ctrl-z are checked and
                                 acted upon. In addition, flow control
                                 with ctrl-s and ctrl-q is activated.

              TTY_ECHO    0x02   Echo mode. Characters read are echoed
                                 back to the TTY.

Binding       move.w   mode,-(sp)
              move.w   handle,-(sp)
              move.w   #$107,-(sp)
              trap     #1
              addq.l   #6,sp

Return Value  Fgetchar() returns the character read in the low byte of the
              returned LONG. If the device is a terminal where scan codes
              are available, the LONG will be mapped in the same manner as
              Bconin(). If an end-of-file is reached, the value 0xFF1A
              will be returned.

See Also      Bconin(), Fputchar(), Fread()