Prev: B01F Up: Map Next: B081
B05E: Handler: Match Verb
Used by the routines at GameLoop and RemoveUserInput_Token_1.
Handler_MatchVerb B05E LD HL,($A7E0) Load HL with *Pointer_VerbWordTokens.
B061 LD BC,($A7EA) Set the length of the table from *Count_VerbTokens into BC.
B065 LD A,($A824) Search *Pointer_VerbWordTokens for *UserInput_Token_1.
B068 CPIR
B06A JR Z,Handler_Verb Jump to Handler_Verb if *UserInput_Token_1 was found in the table.
The verb wasn't found.
Print "I don't understand.".
B06C LD HL,$A84F HL=Messaging_IDontUnderstand.
B06F CALL PrintStringAndNewline Call PrintStringAndNewline.
B072 RET Return.
The verb token was found in the table, so jump to the appropriate routine.
Handler_Verb B073 LD A,($A7EA) Calculate the index using *Count_VerbTokens-C-01 and store the result in E.
B076 SUB C
B077 DEC A
B078 LD E,A
B079 LD IX,($A7DA) IX=*Pointer_JumpTable_Verbs.
B07D CALL GetTableEntry Call GetTableEntry.
B080 JP (HL) Jump to the verb handler held by HL.
View the equivalent code in The Jewels Of Babylon.
Prev: B01F Up: Map Next: B081