cardiograph-computer/test-programs/fill-display.asm

23 lines
351 B
NASM

;; Fill display with $FF
LDA $00
STO $21 ; Pixel index
; store the $FF that we'll use to fill the screen
LDA $FF
STO $22
@copy-to-display
LDA ($22) ; A = mem[$22] = $FF
STO ($21) ; mem[mem[$21]] = A = $FF
; increment pixel index
LDA ($21)
ADD $01
STO $21
; if CF is set, then the display is full and we're done
CHP
JMP @copy-to-display
END