-
-
Save mbamac/6b73fb1816a7a1e947ea291391c21b92 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
nmi_vec | |
pha | |
bit via1_t1c_l ; read anything from t1c_l | |
; to turn off interrupt signal | |
lda char_to_via1; a = char_to_via2 | |
sta via1_iora ; send to via2 port A | |
clc | |
rol ; a =<< 1 | |
bne ++ ; if a == 0 then | |
lda #$1 ; a = 1 | |
++ | |
sta char_to_via2; char_to_via = a | |
+ | |
pla | |
rti | |
irq_vec | |
pha | |
bit via2_t1c_l ; read anything from t1c_l | |
; to turn off interrupt signal | |
lda delay_via ; a = delay_via | |
bne + ; if a == 0 then | |
lda #$10 ; a = $10 | |
+ | |
sec | |
sbc #1 ; a-- | |
sta delay_via ; delay_via = a | |
bne + ; | |
lda char_to_via2; a = char_to_via | |
sta via2_iora ; send to via2 port A | |
clc | |
rol ; a =<< 1 | |
bne ++ ; if a == 0 then | |
lda #$1 ; a = 1 | |
++ | |
sta char_to_via2; char_to_via = a | |
+ | |
pla | |
rti |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment