[Addressed Listing] [Alphabetical Listing] [Error Codes]

ACPTR

     Purpose:  Get data from the serial bus
Call address:  $FFA5 (hex)  65445 (decimal)
Communication registers:  A
Preparatory routines:  TALK, [TKSA]
Error returns:  See READST
Stack requirements:  13
Registers affected:  A, X

Description:

This is the routine to use when you want to get information from a device on the serial bus, like a disk. This routine gets a byte of data off the serial bus using full handshaking. The data is returned in the accumulator. To prepare for this routine the TALK routine must be called first to command the device on the serial bus to send data through the bus. If the input device needs a secondary command, it must be sent by using the TKSA KERNAL routine before calling this routine. Errors are returned in the status word. The READST routine is used to read the status word.

How to Use:

  1. Command a device on the serial bus to prepare to send data to the Commodore 64. (Use the TALK and TKSA KERNAL routines.)
  2. Call this routine (using JSR).
  3. Store or otherwise use the data.

EXAMPLE:

     ;GET A BYTE FROM THE BUS
     JSR ACPTR
     STA DATA

[Addressed Listing] [Alphabetical Listing] [Error Codes]