![]() |
Routines |
| Prev: 47881 | Up: Map | Next: 47930 |
|
The value of A (set to zero at the start of this routine, or set to 1 before jumps from other routines into 47902) is a delay constant that determines the speed at which the sound is played.
|
||||||||
| 47897 | XOR A | Set A to 0 | ||||||
| 47898 | LD B,13 | Set B to 13 (DEC C) | ||||||
| 47900 | LD H,A | Set HL to 0... | ||||||
| 47901 | LD L,A | ... | ||||||
|
This entry point is used by the routines at 47930 and 47938.
|
||||||||
| 47902 | LD (47916),A | Modify instruction at 47915 with value of delay constant | ||||||
| 47905 | LD A,B | Load B into A | ||||||
| 47906 | LD (47924),A | Set instruction at 47924 | ||||||
| 47909 | LD (47925),HL | Set instructions at 47925 and 47926 | ||||||
| 47912 | CALL 48018 | Load A with current border colour | ||||||
| 47915 | LD C,0 | Load C with delay constant | ||||||
| 47917 | OUT (254),A | Set border colour, and reset ear/speaker | ||||||
| 47919 | XOR 16 | Invert ear/speaker bit of A | ||||||
| 47921 | LD B,C | Load C (delay constant) into B... | ||||||
| 47922 | DJNZ 47922 | ...and delay | ||||||
| 47924 | DEC C | Decrease / increase delay constant for next pass, increasing / decreasing pitch of tone respectively | ||||||
| 47925 | NOP | Do nothing, or increase delay constant | ||||||
| 47926 | NOP | Do nothing, or increase delay constant | ||||||
| 47927 | JR NZ,47917 | If delay constant is not zero, then loop back to continue playing tone | ||||||
| 47929 | RET | Return | ||||||
| Prev: 47881 | Up: Map | Next: 47930 |