1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-15 17:30:06 +00:00
cc65/libsrc/pce/clrscr.s

45 lines
935 B
ArmAsm
Raw Normal View History

2015-11-17 14:14:15 +00:00
;
; Clear (erase) the screen.
;
; Support the full 128- x 64-tile background.
;
2015-10-02 14:50:22 +00:00
.export _clrscr
.import plot
2015-08-29 13:58:57 +00:00
.include "pce.inc"
2015-09-19 13:37:39 +00:00
.include "extzp.inc"
_clrscr:
2015-08-29 13:58:57 +00:00
st0 #VDC_MAWR
st1 #<$0000
st2 #>$0000
2015-08-29 13:58:57 +00:00
st0 #VDC_VWR
ldy #$40
rowloop:
ldx #$80
colloop:
2015-11-17 14:14:15 +00:00
lda #' ' ; low byte of char. index
sta VDC_DATA_LO
2015-11-17 14:14:15 +00:00
lda #$02 ; background color, high nybble of char. index
sta VDC_DATA_HI
2015-08-29 13:58:57 +00:00
dex
bne colloop
dey
bne rowloop
2015-09-19 13:37:39 +00:00
; Go to the home position.
stz CURS_X
stz CURS_Y
2015-09-20 10:18:41 +00:00
jmp plot
;-------------------------------------------------------------------------------
; force the init constructor to be imported
.import initconio
2015-08-29 13:58:57 +00:00
conio_init = initconio