Port 0A8h, Primary Slot Register (PSLOT, PPI Port A) (Read/Write)
Used to select internal RAM, or ROM, or external memory (cartridges) into CPU address space, as shown in the examples above. In some cases also used to select 'memory mapped I/O ports' into memory.
(*) If less than 64K internal RAM is installed, then RAM is located in the higher memory area only, ie. at address E000-FFFF for 8K, C000-FFFF for 16K, etc.
Usually the mapping circuit latches only the actually used lower 3, 4, or 5 bits of the bank numbers, depending on whether 128K, 256K, or 512K RAM are built-in. Theoretically (fully exanped) a total of 4MByte RAM (16Kbyte * 256 blocks) could be controlled by the mapping registers.
To enable/disable RAM, use the PSLOT register (Port A8h)