Prev: 6183 Up: Map Next: 61A1
618C: Collect one byte from a command list
Used by the routines at 6226, 62D7, 63BE, 6B3D, 6B58, 7C5A and 7DA7. Collects a byte from a character's current command list and returns it in A.
Input
H Character number (0x98-0xA9)
618C PUSH HL Save the character number temporarily
618D LD L,$75 Bytes 0x75 and 0x76 of the character's buffer hold the address reached in the command list
618F LD A,(HL) Pick up the LSB of this address
6190 INC (HL) Move along one byte in the command list
6191 JR NZ,$619D Jump unless the LSB flipped over to zero
6193 NOP
6194 NOP
6195 INC L L=0x76
6196 INC (HL) Increment the MSB
6197 LD H,(HL) Set H to the old MSB
6198 DEC H
6199 LD L,A HL=address of the byte to be picked up from the command list
619A LD A,(HL) Pick up the byte in A
619B POP HL Restore the character number to H
619C RET
619D INC L L=0x76
619E LD H,(HL) HL=address of the byte to be picked up from the command list
619F JR $6199 Jump back to pick up the byte in A
Prev: 6183 Up: Map Next: 61A1