![]()  | 
Routines | 
| Prev: AF39 | Up: Map | Next: AF70 | 
| 
 
Used by the routines at PrintObjects and CheckRoomObjects.
 
 
  | 
||||||||||||
| ValidateObject | AF56 | PUSH AF | Stash AF and BC on the stack. | |||||||||
| AF57 | PUSH BC | |||||||||||
| AF58 | INC BC | Adjust the object counter. | ||||||||||
| AF59 | LD A,($A7E6) | A=*Count_Objects. | ||||||||||
| AF5C | SUB C | Calculate the index and store the result in E. | ||||||||||
| AF5D | LD E,A | |||||||||||
| AF5E | LD IX,($A7CC) | IX=*Pointer_ItemDescriptions. | ||||||||||
| AF62 | CALL GetTableEntry | Call GetTableEntry. | ||||||||||
| AF65 | POP BC | Restore the object counter from the stack. | ||||||||||
| AF66 | LD A,H | Jump to InvalidObject if the object is invalid. | ||||||||||
| AF67 | OR L | |||||||||||
| AF68 | JR Z,InvalidObject | |||||||||||
| AF6A | POP AF | Restore the object type from the stack. | ||||||||||
| AF6B | AND A | Clear the Z flag. | ||||||||||
| AF6C | RET | Return. | ||||||||||
| InvalidObject | AF6D | POP AF | Restore AF from the stack. | |||||||||
| AF6E | CP A | Set the Z flag. | ||||||||||
| AF6F | RET | Return. | ||||||||||
| 
 
View the equivalent code in The Jewels Of Babylon.
 
 | 
||||||||||||
| Prev: AF39 | Up: Map | Next: AF70 |