Purpose: CMP (cmpvec),Y to any bank
Call address: $FF7A (hex) 65402 (decimal)
Registers: .A = data .X = bank (0-15) .Y = index Memory: setup indirect vector setup CMPVEC ($2C8) pointer Flags: none Calls: noneResults:
Registers: .X used Memory: none Flags: status valid
Description: INDCMP enables applications to compare data to any other bank. After you set up CMPVEC ($2C8), it calls GETCFG to convert the bank number and JMP's to code in common (shared) RAM at $2BE which switches banks, compares 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).
LDA #$00 ;setup to verify $2000 STA $FA LDA #$20 STA $FB LDA #$FA STA $2C3 LDA data LDX #$01 ;in bank 1 LDY #$00 JSR $FF7A ;CMP ($FA,RAM 1),Y BEQ same