Prev: $1EC2 Up: Map Next: $1F29
$1EE3: Make EINSTEIN speak
Used by the routines at $0A58 and $0B3B.
Input
YX Message address
$1EE3 TXA Push the message address formed by YX onto the stack.
$1EE4 PHA
$1EE5 TYA
$1EE6 PHA
$1EE7 JSR $33BF Restore the current character's buffer from page 0.
$1EEA LDA $60 Pick up the current character number from $60 and store it at $57 temporarily.
$1EEC STA $57
$1EEE LDA #$11 Set the current character number at $60 to $11 (EINSTEIN).
$1EF0 STA $60
$1EF2 JSR $3279 Copy EINSTEIN's character buffer to page 0.
$1EF5 PLA Pull the message address off the stack and place it at $AC.
$1EF6 STA $AD
$1EF8 PLA
$1EF9 STA $AC
$1EFB JSR $33BF Restore EINSTEIN's character buffer from page 0.
$1EFE LDA $57 Pick up the saved character number from $57.
$1F00 STA $60 Update the current character number at $60.
$1F02 JSR $3279 Copy the current character's buffer to page 0.
This entry point is used by the routine at $0A58 to make a teacher wait for EINSTEIN to finish speaking.
$1F05 LDA #$03 Event $03: EINSTEIN is speaking.
$1F07 JSR $31B6 Raise the signal for this event.
$1F0A PLA Pull the return address from the stack and place it in the character's buffer as the primary command routine address.
$1F0B STA $29
$1F0D PLA
$1F0E STA $2A
$1F10 INC $29
$1F12 BNE $1F16
$1F14 INC $2A
$1F16 LDA #$1F Place the address of the interruptible subcommand routine at $1F1E (below) into the character's buffer.
$1F18 STA $AB
$1F1A LDA #$1E
$1F1C STA $AA
$1F1E LDA #$03 Event $03: EINSTEIN is speaking.
$1F20 JSR $31D2 Is EINSTEIN still speaking?
$1F23 BCS $1F28 Return if so.
$1F25 JMP $1D28 Otherwise terminate this interruptible subcommand.
$1F28 RTS
Prev: $1EC2 Up: Map Next: $1F29