Prev: D5EF Up: Map Next: D60B
D5FB: Get Direction Token
Used by the routines at D60B and D68C.
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 Load Table_DirectionTokens into HL.
D5FE DEC HL Adjust HL for sum.
D5FF DEC HL
D600 LD E,A Copy directional value into E.
D601 RES 7,E Reset bit 7 of 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
This entry point is used by the routine at DC6C.
GetDirectionToken_0 D607 LD E,(HL) Fetch the token address from the table and load it into DE.
D608 INC HL
D609 LD D,(HL)
D60A RET Return.
Prev: D5EF Up: Map Next: D60B