Prev: 70D9 Up: Map Next: 70EA
70DF: Get the address of an action table entry
Returns HL = $AA3F + 8 x A, the address of the 8-byte entry for action number A in the action table (AA47 is action 1; there is no action 0). The action number of the command being carried out is kept at B5D8.
Input
A Action number
Output
HL Action table entry
70DF LD L,A HL = the action number...
70E0 LD H,$00
70E2 ADD HL,HL ...times 8, since each entry in the action table is 8 bytes...
70E3 ADD HL,HL
70E4 ADD HL,HL
70E5 LD DE,$AA3F ...added to the start of the action table itself
70E8 ADD HL,DE
70E9 RET
Prev: 70D9 Up: Map Next: 70EA