Index
Function Name: CHROUT/BSOUT
Purpose: OUtput to channel
Call address: $FFD2 (hex) 65490 (decimal)
Preparation:
Registers: .A = character
Memory: system map
Flags: none
Calls: CHKOUT (if necessary)
Results:
Registers: .A = error code (if any)
Memory: STATUS, RSSTAT updated
Flags: .C = 1 if error
Description: CHROUT (alias BSOUT) writes the character in .A to the current output
device (DFLTO $9A). Output to devices other than the screen (the default output
device) must be OPENed and CKOUTed. The character is written to the output
buffer associated with the current output channel:
- Cassette data is put a character at a time into the cassette buffer at $B00, with
tape blocks being written when necessary.
- RS-232 data is put a character at a time into the RS-232 output buffer at $D00,
waiting until there is room if necessary.
- Serial data is passed to CIOUT, which buffers one character and sends the
previous character.
- Screen data is put into screen RAM at the current cursor position.
- Keyboard output is illegal.
The path to CHROUT is through an indirect RAM vector at $326. Applications
may therefore provide their own CHROUT procedures or supplement the system's by
redirecting this vector to their own routine.
EXAMPLE:
LDA #character
JSR $FFD2 ;output a character