Prev: 8124 Up: Map Next: 8182
814C: Play a note in the tune
Used by the routine at 80E8.
Input
BC Frequency
HL Length
814C DI
814D LD A,($8182)
8150 EX AF,AF'
8151 LD ($8163),BC
8155 INC BC
8156 LD D,B
8157 LD E,C
8158 DEC BC
8159 LD ($8172),DE
815D DEC BC
815E LD A,B
815F OR C
8160 JR NZ,$816C
8162 LD BC,$0077
8165 EX AF,AF'
8166 ADD A,$10
8168 OUT ($FE),A
816A EX AF,AF'
816B DEC HL
816C DEC DE
816D LD A,D
816E OR E
816F JR NZ,$817A
8171 LD DE,$0078
8174 EX AF,AF'
8175 ADD A,$10
8177 OUT ($FE),A
8179 EX AF,AF'
817A LD A,H
817B OR L
817C JR Z,$8180
817E JR $815D
8180 EI
8181 RET
Prev: 8124 Up: Map Next: 8182