Last active
August 10, 2019 13:51
-
-
Save spacekitcat/765757ad4341e1c96f5562cd9829136c to your computer and use it in GitHub Desktop.
Code demonstrating a 16-bit counter written for the 6502, an 8-bit processor
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
lda #$00 | |
sta $a0 | |
lda #$00 | |
sta $a1 | |
LSB_INC: | |
ldy $a0 ; Debug, shows the LSB in the Y register | |
inc $a0 | |
BNE LSB_INC | |
LSB_RESET: | |
ldx $a1 ; Debug, shows the MSB in the X register | |
lda #$00 | |
sta $a0 | |
MSB_INC: | |
inc $a1 | |
BNE LSB_INC | |
EXIT: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment