![]() |
Routines |
| Prev: 38072 | Up: Map | Next: 38108 |
|
The value of A (set to zero at the start of this routine, or set to 1 before jumps from other routines into 38080) is a delay constant that determines the speed at which the sound is played.
|
||||||||
| 38075 | XOR A | Set A to 0 | ||||||
| 38076 | LD B,13 | Set B to 13 (DEC C) | ||||||
| 38078 | LD H,A | Set HL to 0... | ||||||
| 38079 | LD L,A | ... | ||||||
|
This entry point is used by the routines at 38108 and 38116.
|
||||||||
| 38080 | LD (38094),A | Modify instruction at 38093 with value of delay constant | ||||||
| 38083 | LD A,B | Load B into A | ||||||
| 38084 | LD (38102),A | Set instruction at 38102 | ||||||
| 38087 | LD (38103),HL | Set instructions at 38103 and 38104 | ||||||
| 38090 | CALL 38212 | Load A with current border colour | ||||||
| 38093 | LD C,0 | Load C with delay constant | ||||||
| 38095 | OUT (254),A | Set border colour, and reset ear/speaker | ||||||
| 38097 | XOR 16 | Invert ear/speaker bit of A | ||||||
| 38099 | LD B,C | Load C (delay constant) into B... | ||||||
| 38100 | DJNZ 38100 | ...and delay | ||||||
| 38102 | DEC C | Decrease / increase delay constant for next pass, increasing / decreasing pitch of tone respectively | ||||||
| 38103 | NOP | Do nothing, or increase delay constant | ||||||
| 38104 | NOP | Do nothing, or increase delay constant | ||||||
| 38105 | JR NZ,38095 | If delay constant is not zero, then loop back to continue playing tone | ||||||
| 38107 | RET | Return | ||||||
| Prev: 38072 | Up: Map | Next: 38108 |