![]() |
Routines |
| Prev: 40134 | Up: Map | Next: 40257 |
| VisitRoom | 40227 | LD A,(IX+1) | C=IX+1 (current location). | |
| 40230 | LD C,A | |||
| 40231 | RRCA | |||
| 40232 | RRCA | |||
| 40233 | RRCA | |||
| 40234 | AND %00011111 | Keep only bits 0-4. | ||
| 40236 | LD L,A | Create an offset in HL. | ||
| 40237 | LD H,0 | |||
| 40239 | LD A,C | A=IX+1 (current location). | ||
| 40240 | RLCA | |||
| 40241 | RLCA | |||
| 40242 | RLCA | |||
| 40243 | AND %00111000 | Keep only bits 3-5. | ||
| 40245 | OR %11000110 | Set bits 1-2, 6-7. | ||
| 40247 | LD (40255),A | Write this value to 40255 which updates the bit to set. | ||
| 40250 | LD BC,38591 | HL=VisitedRooms+BC. | ||
| 40253 | ADD HL,BC | |||
| 40254 | SET 0,(HL) | With above, set the bit to mark the room as having been visited. | ||
| 40256 | RET | Return. | ||
|
View the equivalent code in;
|
||||
| Prev: 40134 | Up: Map | Next: 40257 |