![]()  | 
Routines | 
| Prev: C490 | Up: Map | Next: C4B7 | 
  | 
||||||||
| Parser_ValidateTwoDirectObjects | C49F | CALL Parser_ValidateDirectObject | Call Parser_ValidateDirectObject. | |||||
| C4A2 | 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.
 
 | 
||||||||
| C4A3 | CP $01 | Jump to ValidateTwoDirectObjects if the number of valid direct objects in the user input is not 01. | ||||||
| C4A5 | JR NZ,ValidateTwoDirectObjects | |||||||
| 
 
There is only one valid direct objects in the user input and the command needs two...
 
Print "Please be more specific.".
 
 | 
||||||||
| C4A7 | CALL Response_PleaseBeMoreSpecific | Call Response_PleaseBeMoreSpecific. | ||||||
| C4AA | SCF | Set the carry flag. | ||||||
| C4AB | RET | Return. | ||||||
| 
 
There are two or more valid direct objects in the user input.
 
 | 
||||||||
| ValidateTwoDirectObjects | C4AC | CP $03 | Jump to ValidateTwoDirectObjects_TooMany if the number of valid direct objects in the user input is greater than or equal to 03. | |||||
| C4AE | JR NC,ValidateTwoDirectObjects_TooMany | |||||||
| C4B0 | AND A | Set zero flag. | ||||||
| C4B1 | RET | Return. | ||||||
| 
 
There are more than two valid direct objects in the user input.
 
Print "Please rephrase that.".
 
 | 
||||||||
| ValidateTwoDirectObjects_TooMany | C4B2 | CALL Response_PleaseRephraseThat | Call Response_PleaseRephraseThat. | |||||
| C4B5 | SCF | Set the carry flag. | ||||||
| C4B6 | RET | Return. | ||||||
| 
 
View the equivalent code in Warlord.
 
 | 
||||||||
| Prev: C490 | Up: Map | Next: C4B7 |