MEMBOT

Set bottom of memory
Function AddressDescription
MEMBOT FF9CSet bottom of memory

This routine reads or writes the bottom of memory.

When the Carry flag is set then the bottom memory address is read into the X, Y index registers.

When the Carry flag is clear then the bottom memory address is set to the address in the X, Y index registers.

The value is stored in the MEMSTR variable at 0x281.

Default values

Machine Value
C64 0x0800
V20 unexpanded 0x1000
V20 with 3K expansion 0x0400
V20 with 8K or more 0x1200
Example:
Move bottom of memory up 1 page
SECRead memory bottom
JSRMEMBOT
INY
CLCWrite memory bottom
JSRMEMBOT