Prev: 28400 Up: Map Next: 28515
28487: Crash Sound/ Border Flash
Used by the routines at 27767, 28515, 29386, 30003 and 30896.
Input
C Duration counter
Sounds_Crash 28487 LD HL,27164 Point to 27164.
28490 XOR A A=0.
Sounds_Crash_Loop 28491 LD B,(HL) B=Fetch the sound data byte.
28492 INC HL Move onto the next sound data byte.
28493 DJNZ 28493 Decrease counter by one and loop back to 28493 until counter is zero.
28495 SET 4,A Turn the speaker on (set bit 4) and set the border colour.
28497 OUT (254),A
28499 LD B,(HL) B=Fetch the sound data byte.
28500 INC HL Move onto the next sound data byte.
28501 DJNZ 28501 Decrease counter by one and loop back to 28501 until counter is zero.
28503 RES 4,A Turn the speaker off (reset bit 4) and set the border colour.
28505 OUT (254),A
28507 INC A Increment A by one.
28508 DEC C Decrease C by one.
28509 JR NZ,Sounds_Crash_Loop Jump back to Sounds_Crash_Loop until C is zero.
28511 XOR A A=0.
28512 OUT (254),A Border colour.
28514 RET Return.
Prev: 28400 Up: Map Next: 28515