Prev: 6B54 Up: Map Next: 6B78
6B58: Raise the signal for a certain event
Used by command lists 0x80, 0x82, 0x84, 0x86, 0xCC, 0xD0, 0xD2, 0xD4, 0xD6, 0xD8 and 0xDA.
Input
H Character number (0x98-0xA9)
6B58 LD B,$C6 0xC6 is the code for 'SET 0,(HL)'
This entry point is used by the routine at 6B54 with B=0x86 (the code for 'RES 0,(HL)').
6B5A CALL $618C Get the event identifier (0x00-0x1D) from the command list
6B5D RRCA Point HL at the appropriate signal flag holder (7FC8, 7FC9, 7FCA or 7FCB)
6B5E RRCA
6B5F RRCA
6B60 LD C,A
6B61 AND $1F
6B63 ADD A,$C8
6B65 LD E,A
6B66 LD D,$7F
6B68 EX DE,HL
6B69 LD A,C Modify the instruction at 6B72 below to 'SET n,(HL)' or 'RES n,(HL)' as appropriate
6B6A RRCA
6B6B RRCA
6B6C AND $38
6B6E ADD A,B
6B6F LD ($6B73),A
6B72 SET 0,(HL) Lower or raise the signal for the event; this instruction is modified immediately before execution so that it sets or resets the appropriate bit
6B74 EX DE,HL Restore the character number to H
6B75 JP $62A8 Move to the next command in the command list
Prev: 6B54 Up: Map Next: 6B78