Prev: 46559 Up: Map Next: 46594
46577: Graphic layout routine: (247) Jump to randomly selected graphic layout data address from list
Read current byte value (n) from graphic layout data, generate random number m (0 - n-1) then jump to address in m-th WORD after current position.
Used by the routine at 46218.
Input
A (Entry at 46585) Number of words in graphic layout data to skip over
A (Entry at 46586) Number of bytes in graphic layout data to skip over
IX Address of first parameter in current graphic layout data instruction
Output
IX Address of next graphic layout data instruction to process
46577 LD A,(IX+0) Load current byte of graphic layout data into A
46580 INC IX Advance pointer to next byte
46582 CALL 54222 Load A with a random number between 0 and (A-1)
This entry point is used by the routine at 46594.
46585 ADD A,A Double value in A
This entry point is used by the routine at 46559.
46586 LD C,A Load BC with offset value in A
46587 LD B,0
46589 ADD IX,BC Advance IX by offset value
46591 JP 46481 Jump to 46481 (set current position in graphic layout data to value of WORD at this address)
Prev: 46559 Up: Map Next: 46594