Atari ST series Technical Reference Manual page 25

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

int devnum;
long status;
status = Bconstat(devnum);
where devnum is the number of the input device whose sta­
tus you wish to check. Since only devices 1-3 provide input,
status checks should be limited to those devices. The value
returned in status is a 0 if there are no characters waiting,
and $FFFF ( - 1 ) if there is at least one character ready to be
received. Thus, by calling Bconstat it's possible to determine
whether Bconin will return immediately. If the call to Bcon­
stat shows there are no characters ready, your program may
omit the call to Bconin, go on to do something else, and then
check the input device again later.
The BIOS output functions are very similar to the input
functions. To output a character to one of the devices, use
the function Bconout(), whose C macro takes the following
form:
int devnum, char;
Bconout(devnum,char);
where devnum is the number of the device (0-4) to which the
character is sent. The variable char contains the ASCII value
of the character to send in its low byte. Note that like
Bconin, Bconout doesn't return until the character is actually
sent. To avoid sending a character to a device that isn't ready
to receive it, and thus hanging up your program, first test
the status of the output device with the Bcostat function. The
C macro for this function takes the following form:
int devnum;
long status;
status = Bcostat(devnum);
where devnum is the number (0-4) of the device to query.
Bcostat returns a 0 in status if the device is not ready to ac­
cept a character, and $FFFF ( — 1) if it is ready. It always
makes sense to check the output device to see if it's ready to
receive characters, particularly before you send the first one.
Unlike GEM graphics text functions, which output any
character for which there is image data, the console device
screen emulates a DEC VT-52 display terminal and treats the
ASCII characters from 0 to 31 as nonprinting control charac­
ters. This means, for example, that it interprets the ASCII
BIOS

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents