![]() |
Routines |
| A | Initial border colour |
| B | Pitch |
| C | 16 + next border colour (XOR) |
| DE | Duration |
| 29836 | PUSH HL | |
| 29837 | LD L,B | Save the pitch parameter in L |
| 29838 | OUT (254),A | Flip the border colour and the state of the speaker |
| 29840 | XOR C | |
| 29841 | LD B,L | Pitch delay |
| 29842 | DJNZ 29842 | |
| 29844 | DEC E | Jump back unless the sound effect is finished |
| 29845 | JR NZ,29838 | |
| 29847 | DEC D | |
| 29848 | JR NZ,29838 | |
| 29850 | LD A,1 | BORDER 1 before returning |
| 29852 | OUT (254),A | |
| 29854 | POP HL | |
| 29855 | RET |