Download Print this page

Radio Shack TRS-80 Model II Reference Manual page 249

Disk operating system
Hide thumbs Also See for TRS-80 Model II:

Advertisement

Technical Information
ARCV
BRCV
Channel AlB Receive (function codes 96/98)
These routines perform character input from channel
A
or
B.
They are analogous to
keyboard character input (see
KBCHAR).
TRSDOS
sets up
A/BRCV, A/BTX
and
AIBCTRL
when you initialize channel
AlB
with
RS232C.
If you call any ofthese routines while the channel is not initialized (active),
you will get an error return code of
I
(no function code exists).
Input Buffer
Each channel
(A
and
B)
has its own internal 16-character receive buffer. The buffer
is established when the channel is initialized. This should reduce data overruns
when receiving data at high speeds.
When each byte is received, the communications status at that time is also stored in
the receive buffer. Each time you get a character via the
SVC AlB RCV,
the first
(oldest) character in the buffer, if any, is returned in register
B,
and the status at the
time that byte was received is returned in register
A.
An overrun occurs only when the 17th byte is received into the already-full buffer.
The 16th character is replaced with the 17th. When this character is retrieved, an
overrun will be indicated in register
A.
If there are no characters' 'waiting" in the buffer, the communications status
returned in register A will reflect the current status of the serial interface.
Entry Conditions
A
96 (for
ARCV)
A
98 (for
BRCV)
285

Advertisement

loading