Prev: 46170 Up: Map Next: 46244
46218: Jump to appropriate graphic layout routine
Used by the routine at 45999.
Input
A Index of graphic layout data instruction
IX Address of current graphic layout data instruction
46218 INC IX Advance IX to first parameter byte in graphic layout data
46220 SUB 236 Subtract 236 to get zero-based index of required instruction
46222 ADD A,A Load BC with double index of graphic layout data instruction
46223 LD C,A
46224 LD B,0
46226 PUSH HL Store HL
46227 LD HL,46244 Load HL with start address of table of addresses of graphic layout data handling routines
46230 ADD HL,BC Add doubled instruction index as offset to HL to point to address of required routine
46231 LD A,(HL) Modify JP instruction at 46241 with this address
46232 LD (46242),A
46235 INC HL
46236 LD A,(HL)
46237 LD (46243),A
46240 POP HL Restore HL
The operand of the instruction at 46241 represents the addresses of the required graphic layout data handling routine. This is modified by the instructions at 46232 and 46237.
46241 JP 0 Jump to appropriate instruction handling routine
Prev: 46170 Up: Map Next: 46244