Prev: F39F Up: Map Next: F3E2
F3B6: Call a routine in RAM bank 3
Input
HL Address of entry point ($C000 + 0/3/6/9)
call_bank_3_128k F3B6 LD ($81C6),HL Self modify 'CALL xxxx' @ $81C5 (F3D1 here - below)
F3B9 LD HL,$B000 Set up registers to copy 4096 bytes from $B000 to $F000
F3BC LD DE,$F000
F3BF LD BC,$1000
F3C2 PUSH HL Preserve registers for later
F3C3 PUSH DE
F3C4 PUSH BC
F3C5 LDIR Copy 4096 bytes from $B000 to $F000
F3C7 LD ($81CE),SP Self modify 'LD SP,xxxx' @ $81CD (F3D9 here - below)
F3CB LD SP,$A214 Set stack pointer
F3CE CALL $81D6 Call page_128k to page in
F3D1 CALL $0000 Call the entry point requested. Self modified by call_bank_3_128k
F3D4 PUSH AF Preserve (why?)
F3D5 CALL $81D6 Call page_128k to page out
F3D8 POP AF Restore
F3D9 LD SP,$0000 Restore original SP (self modified by F3C7 above)
F3DC POP BC Restore registers but swap source and destination around
F3DD POP HL
F3DE POP DE
F3DF LDIR Copy 4096 bytes from $F000 to $B000
F3E1 RET Return
Prev: F39F Up: Map Next: F3E2