Prev: BFFC Up: Map Next: C01A
C010: Get Table Entry
Used by the routine at PlaySoundStep.
Reads a word from a table of words.
Input
A Index into the table
BC Address of the table
Output
HL The word
GetTableEntry C010 LD L,A Put the index in HL.
C011 LD H,$00
C013 ADD HL,HL Multiply it by two.
C014 ADD HL,BC Add the address of the table.
C015 LD A,(HL) Fetch the low byte of the word.
C016 INC HL Point at the high byte.
C017 LD H,(HL) Fetch it into H.
C018 LD L,A Assemble the low byte of the word.
C019 RET Return.
View the equivalent code in;
Prev: BFFC Up: Map Next: C01A