![]() |
Routines |
| Prev: 26848 | Up: Map | Next: 26927 |
|
Used by the routines at ActionExamine, ActionTake, HandlerPickUpObject, ActionDrop, HandlerResolveSynonym, ActionEnter, ActionLeave, ActionGive, ActionSwim, ActionCut, ActionKill, ActionRead, ActionLand, ActionOpen, ActionClose, ActionShoot, ActionWear, ActionTurn, ActionType, ActionTouch and ActionUse.
Report whether the words still to be parsed match the phrase passed by the caller.
|
||||
| Parser_AdvanceToSeparator | 26880 | EX DE,HL | Hold the phrase while the command tokens are checked. | |
| 26881 | JR Parser_AdvanceToSeparator_Step1 | Continue at Parser_AdvanceToSeparator_Step1 to start at the second word of the command. | ||
| Parser_AdvanceToSeparator_Loop1 | 26883 | INC DE | Step to the next byte of the phrase. | |
| Parser_AdvanceToSeparator_Step1 | 26884 | LD HL,25234 | Matching starts at the second word of the command. | |
| 26887 | JR Parser_AdvanceToSeparator_Step2 | Continue at Parser_AdvanceToSeparator_Step2 to compare that word with the phrase. | ||
| Parser_AdvanceToSeparator_Loop2 | 26889 | INC HL | The next token of the command has to match too. | |
| 26890 | INC DE | Step to the next word of the command. | ||
| Parser_AdvanceToSeparator_Step2 | 26891 | LD A,(DE) | Read the next byte of the phrase. | |
| 26892 | CP (HL) | Keep matching while this token agrees with the phrase. | ||
| 26893 | JR Z,Parser_AdvanceToSeparator_Loop2 | |||
| 26895 | CP 254 | This byte is a word token, not the end of the phrase. | ||
| 26897 | JR NZ,Parser_AdvanceToSeparator_Step3 | |||
| 26899 | LD A,(HL) | Read the token the phrase is waiting for. | ||
| 26900 | CP 255 | Compare with 255. | ||
| 26902 | RET | Return. | ||
| Parser_AdvanceToSeparator_Step3 | 26903 | CP 253 | This byte is not an alternative in the phrase. | |
| 26905 | JR NZ,Parser_AdvanceToSeparator_Loop3 | |||
| 26907 | LD A,(HL) | Read the token the phrase is waiting for. | ||
| 26908 | CP 255 | Jump back to Parser_AdvanceToSeparator_Loop1 when the phrase token is not the end marker (255). | ||
| 26910 | JR NZ,Parser_AdvanceToSeparator_Loop1 | |||
| 26912 | RET | Return. | ||
| Parser_AdvanceToSeparator_Loop3 | 26913 | INC DE | Match the next alternative in the phrase. | |
| 26914 | LD A,(DE) | |||
| 26915 | CP 254 | |||
| 26917 | JR Z,Parser_AdvanceToSeparator_Step4 | |||
| 26919 | CP 253 | |||
| 26921 | JR NZ,Parser_AdvanceToSeparator_Loop3 | |||
| 26923 | JR Parser_AdvanceToSeparator_Loop1 | Continue at Parser_AdvanceToSeparator_Loop1 to try the next wording of the phrase. | ||
| Parser_AdvanceToSeparator_Step4 | 26925 | OR A | Set flags from A. | |
| 26926 | RET | Return. | ||
| Prev: 26848 | Up: Map | Next: 26927 |