[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]

B-13. Function Name: IOINIT

Purpose: Initialize I/O devices
Call address: $FF84 (hex) 65412 (decimal)
Communication registers:None
Preparatory routines: None
Error returns:
Stack requirements: None
Registers affected: A, X, Y

Description: This routine initializes all input/output devices and routines. It is normally called as part of the initialization procedure of a Commodore 64 program cartridge.

EXAMPLE:

   JSR IOINIT

B-14. Function Name: LISTEN

Purpose: Command a device on the serial bus to listen
Call address: $FFB1 (hex) 65457 (decimal)
Communication registers:A
Preparatory routines: None
Error returns: See READST
Stack requirements: None
Registers affected: A

Description: This routine will command a device on the serial bus to receive data. The accumulator must be loaded with a device number between 0 and 31 before calling the routine. LISTEN will OR the number bit by bit to convert to a listen address, then transmits this data as a command on the serial bus. The specified device will then go into listen mode, and be ready to accept information.

How to Use:

  1. Load the accumulator with the number of the device to command to LISTEN.
  2. Call this routine using the JSR instruction.

EXAMPLE:

   ;COMMAND DEVICE #8 TO LISTEN
   LDA #8
   JSR LISTEN

[Prev] [Next] [Contents] [Commodore] [New] [Search] [Home]
This page has been created by Sami Rautiainen.
Read the small print. Last updated December 16, 2002.