|  | Routines | 
| Prev: 35674 | Up: Map | Next: 35723 | 
| 
The value of A (set to zero at the start of this routine, or set to 1 before jumps from other routines into 35695) is a delay constant that determines the speed at which the sound is played.
 
 | ||||||||
| 35690 | XOR A | Set A to 0 | ||||||
| 35691 | LD B,13 | Set B to 13 (DEC C) | ||||||
| 35693 | LD H,A | Set HL to 0... | ||||||
| 35694 | LD L,A | ... | ||||||
| 
This entry point is used by the routines at 35723 and 35731.
 | ||||||||
| 35695 | LD (35709),A | Modify instruction at 35708 with value of delay constant | ||||||
| 35698 | LD A,B | Load B into A | ||||||
| 35699 | LD (35717),A | Set instruction at 35717 | ||||||
| 35702 | LD (35718),HL | Set instructions at 35718 and 35719 | ||||||
| 35705 | CALL 35819 | Load A with current border colour | ||||||
| 35708 | LD C,0 | Load C with delay constant | ||||||
| 35710 | OUT (254),A | Set border colour, and reset ear/speaker | ||||||
| 35712 | XOR 16 | Invert ear/speaker bit of A | ||||||
| 35714 | LD B,C | Load C (delay constant) into B... | ||||||
| 35715 | DJNZ 35715 | ...and delay | ||||||
| 35717 | DEC C | Decrease / increase delay constant for next pass, increasing / decreasing pitch of tone respectively | ||||||
| 35718 | NOP | Do nothing, or increase delay constant (modified by instruction at 35702) | ||||||
| 35719 | NOP | Do nothing, or increase delay constant (modified by instruction at 35702) | ||||||
| 35720 | JR NZ,35710 | If delay constant is not zero, then loop back to continue playing tone | ||||||
| 35722 | RET | Return | ||||||
| Prev: 35674 | Up: Map | Next: 35723 |