mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2024-12-28 05:29:33 +00:00
24 lines
451 B
Plaintext
24 lines
451 B
Plaintext
|
|
processor 6502
|
|
seg program
|
|
org $803
|
|
|
|
.start
|
|
sta $c050 ; set graphics
|
|
sta $c052 ; no mixed mode
|
|
sta $c057 ; set hires
|
|
|
|
ldx #0
|
|
.loop inc $2000,x ; increment hgr byte
|
|
inx
|
|
bne .loop
|
|
lda .loop+2 ; increment hi byte of instruction
|
|
clc
|
|
adc #1
|
|
sta .loop+2 ; self-modifying code
|
|
cmp #$40
|
|
bne .loop
|
|
lda #$20 ; reset to $2000
|
|
sta .loop+2
|
|
jmp .start
|