![]()  | 
Routines | 
| Prev: 54767 | Up: Map | Next: 54795 | 
| 
 
This routine converts a direction value into the address of its corresponding token string.
 
 
  | 
||||||||||||
| GetDirectionToken | 54779 | LD HL,53348 | Load Table_DirectionTokens into HL. | |||||||||
| 54782 | DEC HL | Adjust HL for sum. | ||||||||||
| 54783 | DEC HL | |||||||||||
| 54784 | LD E,A | Copy directional value into E. | ||||||||||
| 54785 | RES 7,E | Reset bit 7 of E. | ||||||||||
| 54787 | LD D,0 | Clear the high byte in D. | ||||||||||
| 54789 | ADD HL,DE | Add 2 times the offset to the base table address. | ||||||||||
| 54790 | ADD HL,DE | |||||||||||
| 
 
This entry point is used by the routine at 56428.
 
 | 
||||||||||||
| GetDirectionToken_0 | 54791 | LD E,(HL) | Fetch the token address from the table and load it into DE. | |||||||||
| 54792 | INC HL | |||||||||||
| 54793 | LD D,(HL) | |||||||||||
| 54794 | RET | Return. | ||||||||||
| Prev: 54767 | Up: Map | Next: 54795 |