![]() |
Routines |
| Prev: 46740 | Up: Map | Next: 46780 |
|
Parser: Validate Any Direct Object.
|
||||||||||||
|
The first token is the verb, so target the second token for the direct object.
|
||||||||||||
| ParserValidateAnyDirectObject | 46764 | LD A,(44847) | Fetch the 44847(second token from the user input) and store it in A. | |||||||||
| 46767 | CP 255 | Jump forward to ValidateAnyDirectObject if the token is anything other than the terminator character (255). | ||||||||||
| 46769 | JR NZ,ValidateAnyDirectObject | |||||||||||
|
The token was the terminator character (255), so the sentence is malformed.
E.g. They tried "TAKE" but didn't write anything after it.
|
||||||||||||
| 46771 | CALL Messaging_PleaseBeMoreSpecific_Newline | Call Messaging_PleaseBeMoreSpecific_Newline to ask for a more specific command. | ||||||||||
| 46774 | SCF | Set the carry flag to indicate this call was a failure. | ||||||||||
| 46775 | RET | Return. | ||||||||||
|
The user input tokens have a direct object, return how many are in the command buffer.
|
||||||||||||
| ValidateAnyDirectObject | 46776 | CALL ParserCountItemReferences | Call ParserCountItemReferences. | |||||||||
| 46779 | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 46740 | Up: Map | Next: 46780 |