Prev: 39741 Up: Map Next: 39823
39805: 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
39805 LD A,(IX+0) Load current byte of graphic layout data into A.
39808 INC A Increase by one.
39809 CP (IX+1) If following byte (cap value) is greater than current byte then skip ahead to 39815.
39812 JR C,39815
39814 XOR A Reset current value to zero as cap value reached.
39815 LD (IX+0),A Load current value back into current position in graphic layout data.
39818 ADD A,A Load A with double current value + 2 (as we're skipping over first two bytes and subsequent data are WORD addresses).
39819 ADD A,2
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.
39821 JR 39832 Update position in graphic layout data and continue processing.
Prev: 39741 Up: Map Next: 39823