| Routines

27480: Raise the signal for a certain event

Used by command lists 128, 130, 132, 134, 204, 208, 210, 212, 214, 216 and 218.
Input
H | Character number (152-169)
27480 | LD B,198 | 198 is the code for 'SET 0,(HL)'
This entry point is used by the routine at 27476 with B=134 (the code for 'RES 0,(HL)').
27482 | CALL 24972 | Get the event identifier (0-29) from the command list
27485 | RRCA | Point HL at the appropriate signal flag holder (32712, 32713, 32714 or 32715)
27486 | RRCA
27487 | RRCA
27488 | LD C,A
27489 | AND 31
27491 | ADD A,200
27493 | LD E,A
27494 | LD D,127
27496 | EX DE,HL
27497 | LD A,C | Modify the instruction at 27506 below to 'SET n,(HL)' or 'RES n,(HL)' as appropriate
27498 | RRCA
27499 | RRCA
27500 | AND 56
27502 | ADD A,B
27503 | LD (27507),A
27506 | 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
27508 | EX DE,HL | Restore the character number to H
27509 | JP 25256 | Move to the next command in the command list