Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Commodore 64 Assembly - Rotating Border Color
- ; Target address: $C000 (49152)
- org $c000
- start:
- lda #0 ; Start with color 0 (black)
- sta color_val
- loop:
- lda color_val
- and #$0f ; Keep value in range 0-15 (16 C64 colors)
- sta $d020 ; Store into VIC-II border color register ($D020)
- jsr delay ; Wait a moment so the eye can see the color
- inc color_val ; Move to the next color
- jmp loop ; Repeat forever
- ; Simple software delay routine
- delay:
- ldx #$ff
- d1: ldy #$ff
- d2: dey
- bne d2
- dex
- bne d1
- rts
- color_val:
- byte 0
Advertisement