Commodore 128 Programmer's Reference Manual page 442

Hide thumbs Also See for 128:
Table of Contents

Advertisement

432
COMMODORE 128
The path to CLRCH is through an indirect RAM vector at $322. Applications
may therefore provide their own CLRCH procedures or supplement the system's by
redirecting this vector to their own routine.
27. $FFCF BASIN ;input from channel
PREPARATION:
Registers:
Memory:
Flags:
Calls:
RESULTS:
Registers:
Memory:
Rags:
EXAMPLE:
LDY#0
MORE JSR $FFCF
STA data,Y
INY
CMP #$0D
BNE MORE
none
system map
none
CHKIN (if necessary)
.A = character (or error code)
STATUS, RSSTAT updated
.C = 1 if error
;index
;input a character
;buffer it
;carriage return?
u
u
D
U
BASIN (alias CHRIN) reads a character from the current input device (DFLTN
w
$99) and returns it in .A. Input from devices other than the keyboard (the default
input device) must be OPENed and CHKINed. The character is read from the input
j t
buffer associated with the current input channel:
M
a. Cassette data is returned a character at a time from the cassette buffer at $B00,
) t
with additional tape blocks being read when necessary.
) |
b. RS-232 data is returned a character at a time from the RS-232 input buffer at $C00,
^
waiting until a character is received if necessary. If RSSTAT ($A14) is bad from
a prior operation, input is skipped and null input (carriage return) is substituted.
j
c. Serial data is returned a character at a time directly from the serial bus, waiting
■<—'
until a character is sent if necessary. If STATUS ($90) is bad from a prior
operation, input is skipped and null input (carriage return) is substituted.
i
d. Screen data is read from screen RAM starting at the current cursor position and
I
ending with a pseudo carriage return at the end of the logical screen line. The
way the BASIN routine is written, the end of line (EOL) is not recog
nized. Users must therefore count characters themselves or otherwise detect
] j
when the logical EOL has been reached.
'-J

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents