Index

Function Name: CLRCHN

Purpose: Restore default channels
Call address: $FFCC (hex) 65484 (decimal)
Preparation:

	Registers:	none
	Memory:		system map
	Flags:		none
	Calls:		none
Results:
	Registers:	.A used
			.X used
	Memory:		DFLTI, DFLTO updated
	Flags:		none

Description: CLRCHN (alias CLRCH) 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.
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.

EXAMPLE:

	JSR	$FFCC	;restore default I/O