![]() |
Routines |
Prev: 6A6A | Up: Map |
|
||||||||
6A77 | LD HL,$7C69 | Pick up the sound on/off indicator. | ||||||
6A7A | LD C,$10 | Initialise C for the loop that follows. | ||||||
6A7C | PUSH BC | Save the loop counter (unnecessarily). | ||||||
6A7D | LD B,C | Set B and D equal to 8*C. This value determines the pitch. | ||||||
6A7E | SLA B | |||||||
6A80 | SLA B | |||||||
6A82 | SLA B | |||||||
6A84 | LD D,B | |||||||
6A85 | LD E,$0A | This value determines the duration. | ||||||
6A87 | LD B,D | Produce a sound (if the sound on/off indicator is on) with pitch and duration determined by D and E. | ||||||
6A88 | LD A,$1F | |||||||
6A8A | AND (HL) | |||||||
6A8B | OUT ($FE),A | |||||||
6A8D | DJNZ $6A8D | |||||||
6A8F | LD A,$07 | |||||||
6A91 | OUT ($FE),A | |||||||
6A93 | LD B,D | |||||||
6A94 | DJNZ $6A94 | |||||||
6A96 | DEC E | |||||||
6A97 | JR NZ,$6A87 | |||||||
6A99 | POP BC | Restore the loop counter to C (unnecessarily). | ||||||
6A9A | DEC C | Finished yet? | ||||||
6A9B | JR NZ,$6A7C | Jump back if not. | ||||||
6A9D | RET |
Prev: 6A6A | Up: Map |