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