![]() |
Routines |
| Prev: 9B81 | Up: Map | Next: 9BA9 |
|
Used by the routines at NEXT_OBJECT_KEEP_A, ROOM_LEFT, FIND_NAMED_OBJECT, ROOM_BY_NAME, FIND_EXIT and EXIT_TO.
Adds 3 to IX and returns Z at the $FF that ends a list. Shared with other lists of three-byte entries, which is why it also loads IY from bytes 1 and 2 -- for an exit those are the object it goes through and the destination, not an address.
|
||||
| NEXT_EXIT | 9B93 | EXX | Keep the caller's BC, DE and HL | |
| 9B94 | LD DE,$0003 | On three bytes to the next entry | ||
| 9B97 | ADD IX,DE | |||
| 9B99 | LD D,(IX+$02) | IY = bytes 1 and 2 of it, which for an object index entry is the record's address | ||
| 9B9C | LD E,(IX+$01) | |||
| 9B9F | PUSH DE | |||
| 9BA0 | POP IY | |||
| 9BA2 | LD A,(IX+$00) | Z if this is the $FF that ends the list | ||
| 9BA5 | CP $FF | |||
| 9BA7 | EXX | |||
| 9BA8 | RET | |||
| Prev: 9B81 | Up: Map | Next: 9BA9 |