Prev: 6772 Up: Map Next: 67C6
6781: Play "hit a tree" sequence
Used by the routine at 6711.
6781 EX AF,AF' Save A
6782 LD B,$3C White PAPER, green INK
6784 LD HL,$5840 Start of playing attribute area
6787 LD DE,$5841
678A LD (HL),B Fill attribute
678B PUSH BC
678C LD B,$54
678E PUSH BC
678F BIT 0,B
6791 JR Z,$679F
6793 BIT 1,B
6795 JR Z,$679F
6797 XOR $10 Toggle speaker to play a sound
6799 OUT ($FE),A
679B BIT 3,B
679D JR Z,$679F
679F LD BC,$0008 Fill line
67A2 LDIR
67A4 XOR $10 Toggle speaker to play sound
67A6 OUT ($FE),A
67A8 POP BC
67A9 DJNZ $678E
67AB LD (HL),$38 White PAPER, black INK
67AD POP BC
67AE DJNZ $6784
67B0 LD DE,$D010
67B3 LD H,$03
67B5 XOR $10 Turn speaker on / off
67B7 OUT ($FE),A
67B9 LD B,E
67BA DJNZ $67BA
67BC DEC H
67BD JR NZ,$67B5
67BF INC E
67C0 DEC D
67C1 JR NZ,$67B3
67C3 DEC H
67C4 EX AF,AF'
67C5 RET
Prev: 6772 Up: Map Next: 67C6