2013-12-05 11:40:44 +00:00
|
|
|
;*
|
|
|
|
;* clrscr
|
|
|
|
;*
|
|
|
|
;* NB: All screen functions assume Graphics Mode 1 in a default configuration.
|
|
|
|
;* Therefore, this is hard coded to use $1000-$12FF as screen VRAM.
|
|
|
|
|
2017-02-01 18:46:04 +00:00
|
|
|
.export _clrscr
|
|
|
|
.include "creativision.inc"
|
|
|
|
|
2013-12-05 11:40:44 +00:00
|
|
|
_clrscr:
|
|
|
|
|
2017-02-01 18:46:04 +00:00
|
|
|
sei ; Disable interrupts. Default INT handler reads VDP_STATUS
|
|
|
|
; and would lose any setup done here.
|
|
|
|
|
|
|
|
lda #$00 ; VRAM offset low
|
|
|
|
sta VDP_CONTROL_W
|
|
|
|
|
|
|
|
lda #$50 ; VRAM offset high ($10 OR $40)
|
|
|
|
sta VDP_CONTROL_W
|
|
|
|
|
2017-03-17 20:42:51 +00:00
|
|
|
lda #$40 ; Space char from ROM setup
|
2017-02-01 18:46:04 +00:00
|
|
|
|
|
|
|
ldx #0
|
|
|
|
ldy #3
|
|
|
|
|
|
|
|
L1: sta VDP_DATA_W
|
|
|
|
inx
|
|
|
|
bne L1
|
|
|
|
dey
|
|
|
|
bne L1
|
|
|
|
|
|
|
|
cli ; Let interrupts go again
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
sta CURSOR_X
|
|
|
|
sta CURSOR_Y
|
2017-03-17 20:42:51 +00:00
|
|
|
sta SCREEN_PTR
|
2017-02-01 18:46:04 +00:00
|
|
|
lda #$10
|
2017-03-17 20:42:51 +00:00
|
|
|
sta SCREEN_PTR+1
|
2017-02-01 18:46:04 +00:00
|
|
|
|
|
|
|
rts
|