Function Name: GETIN
Purpose: Read buffered data
Call address: $FFE4 (hex) 65508 (decimal)
Memory: system map
Calls: CHKIN (if necessary)
Registers: .A = character (or error code)
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:
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.
- 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
- Screen input: GETIN automaticallyjumps to BASIN. See BASIN serial I/O.
wait JSR $FFE4 ;get any key