Prev: 27005 Up: Map Next: 27041
27026: Parser: Match Or Rephrase
Used by the routines at ActionLeave and ActionLand.
Allow a command with no object. Otherwise require a named noun.
Output
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 noun
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_MatchOrRephrase 27026 LD A,(25234) Fetch the second token from the user input into A.
27029 CP 255 Return if there is no second token.
27031 RET Z
There is a second token; validate that it names a noun.
27032 CALL Parser_FindPhrase Call Parser_FindPhrase.
27035 RET NZ Return if there is at least one valid noun.
Any references are invalid.
27036 CALL ResponsePleaseRephraseThat Call ResponsePleaseRephraseThat.
27039 SCF Set the carry flag.
27040 RET Return.
Prev: 27005 Up: Map Next: 27041