![]() |
Routines |
| Prev: 27242 | Up: Map |
|
|||||||
| 27255 | LD HL,31849 | Pick up the sound on/off indicator. | |||||
| 27258 | LD C,16 | Initialise C for the loop that follows. | |||||
| 27260 | PUSH BC | Save the loop counter (unnecessarily). | |||||
| 27261 | LD B,C | Set B and D equal to 8*C. This value determines the pitch. | |||||
| 27262 | SLA B | ||||||
| 27264 | SLA B | ||||||
| 27266 | SLA B | ||||||
| 27268 | LD D,B | ||||||
| 27269 | LD E,10 | This value determines the duration. | |||||
| 27271 | LD B,D | Produce a sound (if the sound on/off indicator is on) with pitch and duration determined by D and E. | |||||
| 27272 | LD A,31 | ||||||
| 27274 | AND (HL) | ||||||
| 27275 | OUT (254),A | ||||||
| 27277 | DJNZ 27277 | ||||||
| 27279 | LD A,7 | ||||||
| 27281 | OUT (254),A | ||||||
| 27283 | LD B,D | ||||||
| 27284 | DJNZ 27284 | ||||||
| 27286 | DEC E | ||||||
| 27287 | JR NZ,27271 | ||||||
| 27289 | POP BC | Restore the loop counter to C (unnecessarily). | |||||
| 27290 | DEC C | Finished yet? | |||||
| 27291 | JR NZ,27260 | Jump back if not. | |||||
| 27293 | RET | ||||||
| Prev: 27242 | Up: Map |