![]() |
Routines |
| Prev: 6AAD | Up: Map | Next: 6AD7 |
|
Used by the routine at WaitForKey.
Turns A and B into a duration and a pitch and hands them to the ROM beeper. The key click uses A equal to 1E. Action 0 of the bytecode jumps straight to the same ROM routine, whose address is the operand of the jump below.
|
||||
| Beep | 6AC4 | AND A | Duration A is the low byte of HL, and B is the pitch. | |
| 6AC5 | LD L,A | |||
| 6AC6 | LD A,B | |||
| 6AC7 | LD D,$00 | The high byte of the duration, and D, start at zero. | ||
| 6AC9 | LD H,D | |||
| 6ACA | ADD A,A | Shift the pitch two places, keeping the overflow in D. | ||
| 6ACB | ADD A,A | |||
| 6ACC | RL D | |||
| 6ACE | LD E,A | Save that pitch. | ||
| 6ACF | PUSH DE | |||
| 6AD0 | CALL $30A9 | Call HL=HL*DE to scale the duration by the pitch. | ||
| 6AD3 | POP DE | Restore the pitch for the beeper from the stack. | ||
| 6AD4 | JP $03B5 | Jump to BEEPER. | ||
| Prev: 6AAD | Up: Map | Next: 6AD7 |