Prev: A0AE Up: Map Next: A0C8
A0BA: Exits: The Direction Word
Used by the routines at MessageListTheObjects, DisplayExits and Event_TheDeepBog.
Looks a direction id up at A20E plus twice the id. The words run from NORTH to DOWN. Bit 7 of the id is ignored.
ExitsTheDirectionWord A0BA LD HL,$A20E Point at the token-address table at A20E.
This entry point is used by the routine at Message_NameFromThisRecord.
ExitsTheDirectionWord_0 A0BD LD E,A Clear bit 7 of the token id.
A0BE RES 7,E
A0C0 LD D,$00 The direction-word offset's high byte is zero.
A0C2 ADD HL,DE Add the token id.
A0C3 ADD HL,DE Add the token id again. Each entry in A20E is one word.
A0C4 LD E,(HL) Read the low byte of A20E.
A0C5 INC HL Step to the high byte of the direction token.
A0C6 LD D,(HL) Read the high byte of the direction token at A20E plus twice the direction id.
A0C7 RET Return.
View the equivalent code in;
Prev: A0AE Up: Map Next: A0C8