|  | Routines | 
| Prev: 29960 | Up: Map | Next: 30123 | 
| 
Used by the routine at 27865.
 | ||||
| 30101 | LD A,158 | Load A with 158... | ||
| 30103 | LD (43138),A | ...and place into formatting data at 43138 | ||
| 30106 | LD A,(65529) | Load A with Magic Knight's current room | ||
| 30109 | OR A | Return if room number is zero (i.e. Magic Knight is in the lift)... | ||
| 30110 | RET Z | ... | ||
| 30111 | DEC A | ...else... | ||
| 30112 | RRCA | ...subtract one and divide by eight... | ||
| 30113 | RRCA | ... | ||
| 30114 | RRCA | ... | ||
| 30115 | AND 7 | ...to give floor number | ||
| 30117 | ADD A,158 | Add floor number to 158 | ||
| 30119 | LD (43138),A | Load into formatting data at 43138 | ||
| 30122 | RET | Return | ||
| Prev: 29960 | Up: Map | Next: 30123 |