Prev: 9B3D Up: Map Next: 9B8F
9B7D: Graphic layout routine: (243) Increment index, n, and jump to n-th address in following list
Read first parameter (n) from graphic layout data, increment (resetting to zero if it is equal to the length of the list of addresses as specified by the second parameter) and jump to n-th address.
Input
IX Address of first parameter in current graphic layout data instruction
Output
A Number of bytes in graphic layout data to skip over
9B7D LD A,(IX+$00) Load current byte of graphic layout data into A.
9B80 INC A Increase by one.
9B81 CP (IX+$01) If following byte (cap value) is greater than current byte then skip ahead to 9B87.
9B84 JR C,$9B87
9B86 XOR A Reset current value to zero as cap value reached.
9B87 LD (IX+$00),A Load current value back into current position in graphic layout data.
9B8A ADD A,A Load A with double current value + 02 (as we're skipping over first two bytes and subsequent data are WORD addresses).
9B8B ADD A,$02
Here we advance our position in graphic layout data by A bytes, read the address stored at that location and then set that address as our new graphic layout data position.
9B8D JR $9B98 Update position in graphic layout data and continue processing.
Prev: 9B3D Up: Map Next: 9B8F