Commodore 128 Programmer's Reference Manual page 465

Hide thumbs Also See for 128:
Table of Contents

Advertisement

n
THE COMMODORE 128 OPERATING SYSTEM
455
n
n
i ?
n
n
common (shared) RAM at $2A2 which switches banks, loads the data, restores the
user's bank, and returns. When calling a non-system bank, the user should take
necessary precautions to ensure that interrupts (IRQ's and NMI's) will be handled
properly (or disabled beforehand).
17. $FF77 INDSTA ;STA (stavec),Y to any bank
PREPARATION:
Registers:
Memory:
Flags:
Calls:
RESULTS:
Registers:
Memory:
Flags:
EXAMPLE:
LDA #$00
STA $FA
LDA #$20
STA $FB
LDA #$FA
STA $2B9
LDA data
LDX #$01
LDY #$00
JSR $FF77
.A = data
.X = bank (0-15)
.Y = index
setup indirect vector
setup STAVEC ($2B9) pointer
none
none
.X used
changed per call
status invalid
;setup write to $2000
;in bank 1
;STA ($FA,RAM 1),Y
INDSTA enables applications to write data to any other bank. After you set
up STAVEC ($2B9), it calls GETCFG to convert the bank number and JMPs to
code in common (shared) RAM at $2AF which switches banks, stores the data,
restores your bank, and returns. When calling a nonsystem bank, the user should
take necessary precautions to ensure that interrupts (IRQ's and NMI's) will be
handled properly (or disabled beforehand).

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents