Purpose: Open a channel for output Call address: $FFC9 (hex) 65481 (decimal) Communication registers: X Preparatory routines: (OPEN) Error returns: 0, 3, 5, 7 (See READST) Stack requirements: 4+ Registers affected: A, X |
Description:
Any logical file number that has been created by the KERNAL routine OPEN can be defined as an output channel. Of course, the device you intend opening a channel to must be an output device. Otherwise an error will occur, and the routine will be aborted. This routine must be called before any data is sent to any output device unless you want to use the Commodore 64 screen as your output device. If screen output is desired, and there are no other output channels already defined, then calls to this routine, and to the OPEN routine are not needed. When used to open a channel to a device on the serial bus, this routine will automatically send the LISTEN address specified by the OPEN routine (and a secondary address if there was one).
REMEMBER: this routine is NOT NEEDED to send data to the screen. |
How to Use:
Possible errors are:
EXAMPLE:
LDX #3 ;DEFINE LOGICAL FILE 3 AS AN OUTPUT CHANNEL JSR CHKOUT