Commodore 128 Programmer's Reference Manual page 441

Hide thumbs Also See for 128:
Table of Contents

Advertisement

n
i
j [
I
s
THE COMMODORE 128 OPERATING SYSTEM
431
EXAMPLE:
LDX #1
;la
JSR $FFC9
;CKOUT
BCS error
j [
CKOUT establishes an output channel to the device associated with the
logical address (LA) passed in .X, in preparation for a call to BSOUT. The Kernal
variable DFLTO ($9A) is updated to indicate the current output device and the
variables LA, FA and SA are updated with the file's parameters from its entry in
the logical file tables (put there by OPEN). CKOUT performs certain device
specific tasks: keyboard channels are illegal, screen channels pass through, cassette
files are confirmed for output, and serial channels are sent a LISTN command and
the SA transmitted (if necessary). Call CLRCH to restore normal I/O channels.
CKOUT is required for all output except the screen. If screen output is
desired and no other output channel is established, you do not need to call CKOUT
or OPEN. The screen is the default output device for BSOUT.
The path to CKOUT is through an indirect RAM vector at $320. Applications
may therefore provide their own CKOUT procedures or supplement the system's by
redirecting this vector to their own routine.
26. $FFCC CLRCH ;restore default channels
PREPARATION:
Registers:
Memory:
Flags:
Calls:
RESULTS:
Registers:
Memory:
Hags:
EXAMPLE:
JSR $FFCC
none
system map
none
none
.A used
.X used
DFLTI, DFLTO updated
none
irestore default I/O
CLRCH (alias CLRCHN) is used to clear all open channels and restore the
system default I/O channels after other channels have been established via CHKIN
and/or CHKOUT. The keyboard is the default input device and the screen is the
default output device. If the input channel was to a serial device, CLRCH first
UNTLKs it. If the output channel was to a serial device, it is UNLSNed first.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents