![]() |
Routines |
| Prev: 36138 | Up: Map | Next: 36269 |
|
Used by the routines at GameLoop and HandlerResolveSynonym.
Match the first word token against the verb table. If a match is found, jump to its handler. If not, print "I Don't Understand" and return to the game loop.
|
||||
|
Set up to search the verb word tokens for the first word token.
|
||||
| HandlerMatchVerb | 36229 | LD HL,35100 | Point at the list of verb word numbers. | |
| 36232 | LD BC,(25306) | Load *Count_VerbTokens into BC for the search. | ||
| 36236 | LD A,(25233) | Fetch *UserInput_Token_1 from the user input. | ||
| 36239 | CPIR | Search the verb word tokens for a matching token. | ||
| 36241 | JR Z,HandlerMatchVerb_Step1 | Jump to HandlerMatchVerb_Step1 if a match was found. | ||
|
The token doesn't match any verb.
Print "I don't understand.".
|
||||
| 36243 | LD HL,25324 | HL=Messaging_IDonTUnderstand. | ||
| 36246 | CALL PrintStringAndANewline | Call PrintStringAndANewline. | ||
| 36249 | JR GameLoop | Jump to GameLoop to read the next command. | ||
|
A verb was matched. Calculate its index and jump to its handler.
|
||||
| HandlerMatchVerb_Step1 | 36251 | LD A,(25306) | Fetch how many verbs the game knows. | |
| 36254 | SUB C | The matching verb selects its handler index. | ||
| 36255 | DEC A | |||
| 36256 | LD E,A | |||
| 36257 | LD IX,(25304) | Point IX at *Pointer_JumpTable_Verbs. | ||
| 36261 | CALL GetTableEntry | Call GetTableEntry. | ||
|
This entry point is used by the routine at GameLoop.
|
||||
| HandlerMatchVerb_Step2 | 36264 | LD DE,36138 | Run the verb, then return to the game loop. | |
| 36267 | PUSH DE | |||
| 36268 | JP (HL) | |||
|
View the equivalent code in;
|
||||
| Prev: 36138 | Up: Map | Next: 36269 |