Atari ST series Technical Reference Manual page 99

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

GEMDOS Device I/O and Process Control
ing characters to the character devices. Each output device
has its own output function. The first, Cconout(), is used to
send characters to the console screen. Its syntax is
char ch;
Cconout(ch);
where ch is the ASCII character to write to the screen. Machine
language programmers should note that they will pass the
character to be printed as a word-length value, the low byte of
which contains the character to be printed, and the high byte
of which has been cleared to 0. As with the BIOS routine,
Bconout(), VT-52 control characters and escape sequences
are treated as commands rather than printed as characters. For
a complete list of VT-52 style escape code, see Appendix E.
The character output functions for the other two output
devices are very similar. The Cpmout() call is used to send
characters to the printer, while Cauxout is used to send out­
put to the serial port. The syntax for these calls is:
char ch;
int status;
status = Cpmout(ch);
char ch;
Cauxout(ch);
where ch is the character to be sent. Both of these functions
will wait for the character to be sent before they return. In
the case of the printer, the status return will be - 1 if the
character has been sent correctly. If, for some reason, the
character cannot be sent, however (paper out, printer off
line, and so on), a value of 0 will be returned in status after
the time-out period. Note that like Bconin, Bconout doesn't
return until the character is actually sent. As with the input
functions, you can avoid sending a character to a device that
is not ready to receive it by first testing the device's output
status. The output status functions are Cconos(), Cauxos(),
and Cprnos(), and they all share the same syntax:
int status;
status = Cconos();
int status;
status = Cauxos();
int status;
status = Cprnos();
These functions all return a 0 in status if the device is not
ready to accept a character, and $FFFF ( - 1 ) if it is ready.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents