Index
Function Name: GETIN
Purpose: Read buffered data
Call address: $FFE4 (hex) 65508 (decimal)
Preparation:
Registers: none
Memory: system map
Flags: none
Calls: CHKIN (if necessary)
Results:
Registers: .A = character (or error code)
.X used
.Y used
Memory: STATUS, RSSTAT updated
Flags: .C = 1 if error
Description: GETIN reads a character from the current input device (DFLTN ($99)) buffer
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 buffer
associated with the current input channel:
- Keyboard input: A character is removed from the keyboard buffer and passed
in .A. If the buffer is empty, a null ($00) is returned.
- RS-232 input: A character is removed from the RS-232 input buffer at $C00
and passed in .A. If the buffer is empty, a null ($00) is returned (use READST
to check validity).
- Serial input: GETIN automaticallyjumps to BASIN. See BASIN serial I/O.
- Cassette input: GETIN automatically jumps to BASIN. See BASIN cassette
I/O.
- Screen input: GETIN automaticallyjumps to BASIN. See BASIN serial I/O.
The path to GETIN is through an indirect RAM vector at $32A. Applications
may therefore provide their own GETIN procedures or supplement the system's by
redirecting this vector to their own routine.
EXAMPLE:
wait JSR $FFE4 ;get any key
BEQ wait
STA character