Prev: F918 Up: Map Next: F955
F923: Make MR CREAK ask the birth year question if appropriate
Used by the routine at 7A32. Makes MR CREAK ask the birth year question if (a) he hasn't asked it yet this lesson, and (b) ERIC hasn't opened the safe yet.
Input
A 0 (MR ROCKITT), 1 (MR WITHIT), or 2 (MR CREAK)
F923 LD B,A Save the teacher identifier in B for now
F924 LD HL,$7A1A Point HL at MR ROCKITT's question/answer data table (ready for the return to the calling routine)
F927 CP $02 Are we dealing with MR CREAK?
F929 JR Z,$F92E Jump if so
F92B LD A,B Restore the teacher identifier (0-2) to A
F92C AND A Set the zero flag if we're dealing with MR ROCKITT
F92D RET
We're dealing with MR CREAK, so we need to determine whether he should ask the birth year question.
F92E LD A,($7FEA) Collect the game mode indicator from 7FEA
F931 CP $03 Has ERIC already opened the safe?
F933 JR NC,$F92B Jump if so
F935 AND A Are we in demo mode?
F936 JR Z,$F92B Jump if so
F938 LD A,($7FDA) Has MR CREAK already asked the birth year question this lesson?
F93B AND A
F93C JR NZ,$F92B Jump if so
MR CREAK hasn't asked the birth year question yet. Make him do so now.
F93E POP DE Drop the return address from the stack; we'll be re-entering the calling routine at a different point
F93F INC A Set 7FDA to 1, indicating that MR CREAK has asked the birth year question this period
F940 LD ($7FDA),A
F943 LD A,($7F9A) Copy the identifier of CREAK's birth year battle into the 'Q' spot in 'It was the BATTLE OF Q'
F946 LD ($F0F7),A
F949 LD HL,$F0E1 F0E1: '{Please Sir - I cannot tell a lie . . }It was the BATTLE OF Q'
F94C LD ($A96B),HL Place this message address into bytes 0x6B and 0x6C of EINSTEIN's buffer
F94F LD DE,$F12D F12D='WHAT HAPPENED IN THE YEAR THAT I WAS BORN'
F952 JP $7AC9 Re-enter the calling routine to make MR CREAK ask the birth year question
Prev: F918 Up: Map Next: F955