Next Previous Contents

3.45 cbm_k_iobase

Function

Return Base Address of Memory-Mapped I/O Devices

Header

cbm.h

Declaration

unsigned cbm_k_iobase (void);

Description

This function returns the address of the memory section where the memory mapped I/O devices are located. This address can then be used with an offset to access the memory mapped I/O devices in the Commodore 64. The offset is the number of locations from the beginning of the page on which the I/O register you want is located. This function exists to provide compatibility between the Commodore 64, VIC-20, and future models of the Commodore 64. If the I/O locations for a program are set by a call to this function, they should still remain compatible with future versions of the Commodore 64, the KERNAL and BASIC.

Limits

Availability

cc65

See also
Example

None.


Next Previous Contents