Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Code demonstrating a 16-bit counter written for the 6502, an 8-bit processor
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