Routines
| Prev: D21C | Up: Map | Next: D237 |
D224: Find a room record
|
Looks the room number up in the table at 840B.
|
||||||||||||
| D224 | PUSH DE | Save DE on the stack | ||||||||||
| D225 | LD DE,$840B | Point DE at the room table (840B) | ||||||||||
| D228 | PUSH HL | Save HL on the stack | ||||||||||
| D229 | LD L,A | Copy A into L - HL = room * 2 | ||||||||||
| D22A | LD H,$00 | Load H with $00 | ||||||||||
| D22C | ADD HL,HL | Double HL (shift it left one bit) | ||||||||||
| D22D | ADD HL,DE | ...+ the table | ||||||||||
| D22E | LD E,(HL) | Read the byte HL points at into E - Read the record address | ||||||||||
| D22F | INC HL | Step HL on to the next byte | ||||||||||
| D230 | LD D,(HL) | Read the byte HL points at into D | ||||||||||
| D231 | PUSH DE | Save DE on the stack - ...into IX | ||||||||||
| D232 | POP IX | Restore IX from the stack | ||||||||||
| D234 | POP HL | Restore HL from the stack | ||||||||||
| D235 | POP DE | Restore DE from the stack | ||||||||||
| D236 | RET | Return to the caller | ||||||||||
| Prev: D21C | Up: Map | Next: D237 |