mirror of
https://github.com/actraiser/dust-tutorial-c64-first-intro.git
synced 2025-06-18 17:05:34 -04:00
22 lines
898 B
NASM
22 lines
898 B
NASM
;============================================================
|
|
; clear screen
|
|
; a loop instead of kernal routine to save cycles
|
|
;============================================================
|
|
|
|
init_screen ldx #$00 ; start of loop
|
|
stx $d021 ; border
|
|
stx $d020 ; background
|
|
|
|
clear lda #$20 ; #$20 is the spacebar screencode
|
|
sta $0400,x ; fill four areas with 256 spacebar characters
|
|
sta $0500,x
|
|
sta $0600,x
|
|
sta $06e8,x
|
|
lda #$0c ; puts into the associated color ram dark grey ($0c)...
|
|
sta $d800,x ; and this will become color of the scroll text
|
|
sta $d900,x
|
|
sta $da00,x
|
|
sta $dae8,x
|
|
inx
|
|
bne clear
|
|
rts |