| The Hobbit (v1.0) | Routines |
| Prev: 9EBF | Up: Map | Next: 9EDD |
|
Returns the room of object A (its first location byte), or $FF if it is a door or other multi-place object, or if A is $FF.
|
||||||||||||
| 9ECB | CP $FF | Is there no object at all ($FF)? | ||||||||||
| 9ECD | RET Z | If so, there is no room to report either | ||||||||||
| 9ECE | CALL $9B25 | IX = the object's own record | ||||||||||
| 9ED1 | LD A,$01 | Does it occupy just one place (an ordinary object, not a door or the like)? | ||||||||||
| 9ED3 | CP (IX+$00) | |||||||||||
| 9ED6 | LD A,$FF | Assume not: return $FF, meaning "no single room" | ||||||||||
| 9ED8 | RET NZ | |||||||||||
| 9ED9 | LD A,(IX+$10) | It does: A = its one location, the answer | ||||||||||
| 9EDC | RET | |||||||||||
| Prev: 9EBF | Up: Map | Next: 9EDD |