Prev: D682 Up: Map Next: D69C
D692: Get Table Entry
Used by the routine at PlaySoundEffect.
Fetches a word from a table.
Input
A Number of the word
BC Address of the table
Output
HL The word
Fetch the word at twice the index.
GetTableEntry D692 LD L,A Put the number in HL.
D693 LD H,$00
D695 ADD HL,HL Double it.
D696 ADD HL,BC Add the table.
D697 LD A,(HL) Fetch the low byte.
D698 INC HL Move on to the high byte.
D699 LD H,(HL) Fetch the high byte.
D69A LD L,A Set the low byte.
D69B RET Return.
View the equivalent code in;
Prev: D682 Up: Map Next: D69C