![]()  | 
Routines | 
| Prev: AC1D | Up: Map | Next: AC4D | 
  | 
||||||||
| Parser_ValidateTwoDirectObjects | AC2F | CALL Parser_ValidateDirectObject | Call Parser_ValidateDirectObject. | |||||
| AC32 | 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.
 
 | 
||||||||
| AC33 | CP $01 | Jump to ValidateTwoDirectObjects if the number of valid direct objects in the user input is not 01. | ||||||
| AC35 | JR NZ,ValidateTwoDirectObjects | |||||||
| 
 
There is only one valid direct objects in the user input and the command needs two...
 
Print "Please be more specific.".
 
 | 
||||||||
| AC37 | LD HL,$0017 | HL=Messaging_PleaseBeMoreSpecific. | ||||||
| AC3A | CALL PrintCompressedStringAndNewline | Call PrintCompressedStringAndNewline. | ||||||
| AC3D | SCF | Set the carry flag. | ||||||
| AC3E | RET | Return. | ||||||
| 
 
There are two or more valid direct objects in the user input.
 
 | 
||||||||
| ValidateTwoDirectObjects | AC3F | CP $03 | Jump to ValidateTwoDirectObjects_TooMany if the number of valid direct objects in the user input is greater than or equal to 03. | |||||
| AC41 | JR NC,ValidateTwoDirectObjects_TooMany | |||||||
| AC43 | AND A | Set zero flag. | ||||||
| AC44 | RET | Return. | ||||||
| 
 
There are more than two valid direct objects in the user input.
 
Print "Please rephrase that.".
 
 | 
||||||||
| ValidateTwoDirectObjects_TooMany | AC45 | LD HL,$0018 | HL=Messaging_PleaseRephraseThat. | |||||
| AC48 | CALL PrintCompressedStringAndNewline | Call PrintCompressedStringAndNewline. | ||||||
| AC4B | SCF | Set the carry flag. | ||||||
| AC4C | RET | Return. | ||||||
| 
 
View the equivalent code in; 
 
 | 
||||||||
| Prev: AC1D | Up: Map | Next: AC4D |