Prev: 697D Up: Map Next: 69A1
6992: 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 6992 LD A,($6292) Fetch the second token from the user input into A.
6995 CP $FF Return if there is no second token.
6997 RET Z
There is a second token; validate that it names a noun.
6998 CALL Parser_FindPhrase Call Parser_FindPhrase.
699B RET NZ Return if there is at least one valid noun.
Any references are invalid.
699C CALL ResponsePleaseRephraseThat Call ResponsePleaseRephraseThat.
699F SCF Set the carry flag.
69A0 RET Return.
Prev: 697D Up: Map Next: 69A1