Prev: 63486 Up: Map Next: 63573
63488: Make little boy no. 10 give ERIC a message
Used by command lists 208 and 210. Makes little boy no. 10 tell ERIC about BOY WANDER having hidden a pea-shooter on the fire escape, EINSTEIN's intent to grass him up to MR WACKER, or ANGELFACE's medical condition.
Input
H 161 (little boy no. 10)
63488 LD A,(32763) Set bit 3 of ERIC's status flags at 32763, indicating that ERIC is being spoken to
63491 SET 3,A
63493 LD (32763),A
63496 LD A,255 Adjust the MSB of the lesson clock so that the lesson will not end until the drama has played out
63498 LD (32760),A
Figure out which message the boy should deliver, depending on what MR ROCKITT and MR WACKER are up to.
63501 LD A,(42104) Collect byte 120 of MR ROCKITT's buffer, which holds the MSB of the command list start address
63504 CP 250 This is the MSB of 64219 (command list 222)
63506 LD BC,65280 BC=65280: 'Don't let ANGELFACE touch you...'
63509 JR Z,63522 Jump if MR ROCKITT is using command list 222
63511 LD C,53 BC=65333: 'EINSTEIN is going to tell MR WACKER...'
63513 LD A,(41845) Collect byte 117 of MR WACKER's buffer, which holds the LSB of the address reached in the command list
63516 CP 60 Is MR WACKER using command list 216?
63518 JR C,63522 Jump if not (he must be using command list 214)
63520 LD C,143 BC=65423: 'BOY WANDER has hidden a pea-shooter...'
Now BC holds the address of the message to be delivered.
63522 CALL 32038 Make the little boy deliver his message
63525 LD L,104 Initialise the message repetition delay counter in byte 104 of the little boy's buffer to 40
63527 LD (HL),40
63529 LD BC,60640 60640: 'Press 'U' if you understood'
63532 LD A,(32715) Set bit 0 at 32715, indicating that the little boy is now waiting for acknowledgment from ERIC
63535 SET 0,A
63537 LD (32715),A
63540 CALL 32038 Make the little boy say 'Press 'U' if you understood'
63543 LD A,(32763) Collect ERIC's status flags from 32763
63546 BIT 3,A Has 'U' been pressed yet?
63548 JR NZ,63558 Jump if not
ERIC has acknowledged delivery of the message ('U' was pressed).
63550 LD A,12 Set the MSB of the lesson clock to 12, giving enough time for the ensuing drama to play out
63552 LD (32760),A
63555 JP 25256 Move to the next command in little boy no. 10's command list
ERIC has not yet acknowledged delivery of the message ('U' has not been pressed).
63558 LD L,104 Decrement the message repetition delay counter in byte 104 of the little boy's buffer and return unless it has reached 0
63560 DEC (HL)
63561 RET NZ
63562 LD A,(32715) Reset bit 0 at 32715, indicating that the little boy is no longer waiting for acknowledgment from ERIC (because he's going to repeat the message first)
63565 RES 0,A
63567 LD (32715),A
63570 JP 63496 Deliver the message to ERIC once again
Prev: 63486 Up: Map Next: 63573