Created
October 24, 2021 15:20
-
-
Save podstawek/42fbc3e773a88b4764e8799048e1ba25 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* makes beeps | |
ORG $300 | |
LDA #$FF | |
STA FREQ | |
LDA #$80 | |
STA PLSWIDTH | |
PLAY LDA $C030 | |
LDY PLSWIDTH | |
PULSE DEY | |
BNE PULSE | |
LDA $C030 | |
LDX FREQ | |
COUNTDN DEX | |
BNE COUNTDN | |
JSR READKB | |
JMP PLAY | |
FREQ EQU $350 | |
PLSWIDTH EQU $352 | |
INCR INC FREQ | |
RTS | |
DECR DEC FREQ | |
RTS | |
PULSEINC DEC PLSWIDTH | |
INC FREQ | |
RTS | |
PULSEDEC INC PLSWIDTH | |
DEC FREQ | |
RTS | |
READKB LDA $C000 | |
STA $C010 | |
CMP #$88 | |
BEQ INCR | |
CMP #$95 | |
BEQ DECR | |
CMP #$C1 | |
BEQ PULSEINC | |
CMP #$DA | |
BEQ PULSEDEC | |
RTS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment