Prev: 989A Up: Map Next: 995F
9945: Jump Graphic Layout Routine
Used by the routine at 989A.
Input
A Index of graphic layout data instruction
IX Address of current graphic layout data instruction
Jump_GraphicLayoutRoutine 9945 INC IX Advance IX to first parameter byte in graphic layout data.
9947 SUB $E6 Subtract E6 to get zero-based index of required instruction.
9949 ADD A,A Load BC with double index of graphic layout data instruction.
994A LD C,A
994B LD B,$00
994D PUSH HL Stash HL on the stack.
994E LD HL,$995F Load HL with start address of table of addresses of graphic layout data handling routines.
9951 ADD HL,BC Add doubled instruction index as offset to HL to point to address of required routine.
9952 LD A,(HL) Modify JP instruction at 995C with this address.
9953 LD ($995D),A
9956 INC HL
9957 LD A,(HL)
9958 LD ($995E),A
995B POP HL Restore HL from the stack.
The operand of the instruction at 995C represents the addresses of the required graphic layout data handling routine. This is modified by the instructions at 9953 and 9958.
995C JP $0000 Jump to appropriate instruction handling routine.
Prev: 989A Up: Map Next: 995F