Prev: 44034 Up: Map Next: 44079
44061: Parser: Validate Input Tokens
Output
A The number of references to items in the user input tokens
F The zero flag is set when there is only a verb present
F The zero flag is unset when there is at least one valid direct object
F The carry flag is set when the command is malformed
The first token is the verb, so target the second token for the direct object.
Parser_ValidateInputTokens 44061 LD A,(41276) Fetch the second token from the user input and store it in A.
44064 CP 255 Return if there is no second token.
44066 RET Z
There is a second token; so validate all direct objects after this point.
44067 CALL Parser_CountItems Call Parser_CountItems.
44070 RET NZ Return if there is at least one valid item mentioned in the user input tokens.
Any references are invalid.
Print "Please rephrase that.".
44071 LD HL,24 HL=Messaging_PleaseRephraseThat.
44074 CALL PrintCompressedStringAndNewline Call PrintCompressedStringAndNewline.
44077 SCF Set the carry flag.
44078 RET Return.
View the equivalent code in;
Prev: 44034 Up: Map Next: 44079