Skool Daze Routines
63488: Make character 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.
H 161 (little boy no. 10)
63488 LD A,(32763) Set bit 3 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 time counter so that the lesson doesn't end until the drama has played out
63498 LD (32760),A
63501 LD A,(42104) Byte 120 of MR ROCKITT's buffer: MSB of TAP start address
63504 CP 250 Is MR ROCKITT using command list 222?
63506 LD BC,65280 BC=65280: 'Don't let ANGELFACE touch you...'
63509 JR Z,63522 Jump if so
63511 LD C,53 BC=65333: 'EINSTEIN is going to tell MR WACKER...'
63513 LD A,(41845) Byte 117 of MR WACKER's buffer: LSB of address reached in TAP
63516 CP 60 Is MR WACKER using command list 214?
63518 JR C,63522 Jump if so
63520 LD C,143 BC=65423: 'BOY WANDER has hidden a pea-shooter...'
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) Pick up ERIC's status flags in A
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 time counter to 12, giving enough time for the ensuing drama to play out
63552 LD (32760),A
63555 JP 25256 Move on in the 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