Prev: D5EF Up: Map Next: D607
D5FB: Get Direction Token
This routine converts a direction value into the address of its corresponding token string.
Input
A Direction value
Output
DE Address of token string
GetDirectionToken D5FB LD HL,$D064 Use the direction tokens at Table_DirectionTokens.
D5FE DEC HL Step HL back two bytes.
D5FF DEC HL
D600 LD E,A Clear bit 7 of the direction.
D601 RES 7,E
D603 LD D,$00 Clear the high byte in D.
D605 ADD HL,DE Add 02 times the offset to the base table address.
D606 ADD HL,DE
View the equivalent code in;
Prev: D5EF Up: Map Next: D607