Prev: 44061 Up: Map Next: 44109
44079: Parser: Validate Two Direct Objects
Output
F The carry flag is set when the command is malformed
Parser_ValidateTwoDirectObjects 44079 CALL Parser_ValidateDirectObject Call Parser_ValidateDirectObject.
44082 RET C Return if there is no direct object in the user input (so the command is malformed).
A now contains the count of the number of valid direct objects.
44083 CP 1 Jump to ValidateTwoDirectObjects if the number of valid direct objects in the user input is not 1.
44085 JR NZ,ValidateTwoDirectObjects
There is only one valid direct objects in the user input and the command needs two...
Print "Please be more specific.".
44087 LD HL,23 HL=Messaging_PleaseBeMoreSpecific.
44090 CALL PrintCompressedStringAndNewline Call PrintCompressedStringAndNewline.
44093 SCF Set the carry flag.
44094 RET Return.
There are two or more valid direct objects in the user input.
ValidateTwoDirectObjects 44095 CP 3 Jump to ValidateTwoDirectObjects_TooMany if the number of valid direct objects in the user input is greater than or equal to 3.
44097 JR NC,ValidateTwoDirectObjects_TooMany
44099 AND A Set zero flag.
44100 RET Return.
There are more than two valid direct objects in the user input.
Print "Please rephrase that.".
ValidateTwoDirectObjects_TooMany 44101 LD HL,24 HL=Messaging_PleaseRephraseThat.
44104 CALL PrintCompressedStringAndNewline Call PrintCompressedStringAndNewline.
44107 SCF Set the carry flag.
44108 RET Return.
View the equivalent code in;
Prev: 44061 Up: Map Next: 44109