stuffy 6502
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
; count.asm - prints "0123456789" then a newline and halts.
|
||||
; Exercises ADC, CMP, branches and a loop.
|
||||
|
||||
.export start
|
||||
|
||||
start:
|
||||
lda #'0'
|
||||
loop:
|
||||
sta $F001
|
||||
clc
|
||||
adc #$01
|
||||
cmp #$3A ; '9' + 1
|
||||
bne loop
|
||||
lda #$0A ; newline
|
||||
sta $F001
|
||||
lda #$00
|
||||
sta $F003
|
||||
rts
|
||||
Reference in New Issue
Block a user