Atari ST series Technical Reference Manual page 45

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

XBIOS Device and System Functions
An output buffer record immediately follows the input
buffer record for the RS-232 serial device only.
Each input device has an input buffer where incoming
characters are stored until retrieved by a call to Bconin(). As
characters are stored, the ST Operating System increments
the index to the buffer head, which is an offset from the be­
ginning of the buffer that shows where the next character
will be stored. As characters are retrieved, the Operating
System increments the index to the buffer tail, which is an
offset from the beginning of the buffer that shows where the
next character will be read.
If the head and tail of the buffer are the same, the buffer
is empty. There are also offsets from the buffer tail which are
known as the high water mark and the low water mark. These
are used by devices that support handshaking. When the
buffer head is a certain number of characters ahead of the
buffer tail (the high water mark), the device signals the
sender that it can't receive any more data. When the buffer
head drops back to within a certain number of characters of
the tail (the low water mark), the device signals the sender to
resume transmission.
The ST Operating System sets up a default buffer for
each input device. The size of these buffers are 256 bytes
each for RS-232 input and output, and 128 bytes each for
keyboard and MIDI input. Under normal circumstances,
these buffer sizes are quite sufficient. When a continuous
stream of bytes is coming in faster than calls to Bconin() can
read them, however, it may be possible to push the head in­
dex past the tail, overflowing the buffer, and causing incom­
ing data to be lost. In circumstances where data is coming in
at a very rapid rate, the user may wish to replace the default
buffer with a larger one of his own. Do this by declaring a
block of variable storage and setting the buffer address
pointer to that address. The programmer should save the ad­
dress of the default system buffer and restore that buffer be­
fore the program terminates.
MIDI and IKBD I/O
Two of the ST's character output devices, the MIDI port and
Intelligent Keyboard controller (IKBD), don't come as stan­
dard equipment on most personal computers. These devices
process commands that always consist of more than one byte

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents