Routines

24133: 'W' pressed - write on board


The address of this routine is found in the keypress table at 58624

24133 26D2 LD H,210 210=ERIC
24135 CD5567 CALL 26453 Collect info about board ERIC's standing at
24138 D8 RET C Return if ERIC's not standing at a blackboard
24139 21D87F LD HL,32728
24142 70 LD (HL),B B=blackboard identifier (84, 90, 96, 102 or 108)
24143 2D DEC L
24144 75 LD (HL),L
24145 68 LD L,B
24146 3601 LD (HL),1 Signal: board written on
24148 2C INC L
24149 7E LD A,(HL) A=character number of person who last wrote on this board, or 0 if clean
24150 36D2 LD (HL),210 Signal: ERIC wrote on this board
24152 0604 LD B,4
24154 2F CPL
24155 E680 AND 128 A=128 if board is clean, 0 otherwise
24157 2C INC L Prepare 4 spaces for combination letters/numbers
24158 77 LD (HL),A
24159 10FC DJNZ 24157
24161 2EFB LD L,251 HL=32763
24163 3610 LD (HL),16 Set bit 4: ERIC is writing on the board
24165 26D2 LD H,210
24167 CDB461 CALL 25012 Update SRB for ERIC's current animatory state
24170 F607 OR 7 A=animatory state of ERIC with arm up (as if writing on board)
24172 C317F3 JP 62231