Prev: 46693 Up: Map Next: 46725
46704: Parser: Validate Direct Object
Output
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.
ParserValidateDirectObject 46704 LD A,(44847) Fetch the 44847(second token from the user input) and store it in A.
46707 CP 255 Jump forward to DirectObject_Process if the token is anything other than the terminator character (255).
46709 JR NZ,DirectObject_Process
The token was the terminator character (255), so the sentence is malformed.
E.g. They tried "TAKE" but didn't write anything after it.
46711 CALL Messaging_PleaseBeMoreSpecific_Newline Call Messaging_PleaseBeMoreSpecific_Newline.
46714 SCF Set the carry flag to indicate this call was a failure.
46715 RET Return.
Process the direct object.
DirectObject_Process 46716 CALL ParserCountItemReferences Call ParserCountItemReferences.
46719 RET NZ Return if A is not equal to 255.
46720 CALL Messaging_PleaseRephraseThat_Newline Call Messaging_PleaseRephraseThat_Newline to ask the player to rephrase.
46723 SCF Set the carry flag to indicate the command is malformed.
46724 RET Return.
Prev: 46693 Up: Map Next: 46725