2000-05-28 13:40:48 +00:00
|
|
|
;
|
|
|
|
; Christian Groessler, Apr-2000
|
|
|
|
;
|
|
|
|
; void clrscr (void);
|
|
|
|
;
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
.export _clrscr
|
|
|
|
.include "atari.inc"
|
|
|
|
.importzp ptr1
|
|
|
|
.import setcursor
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2013-06-20 23:53:13 +00:00
|
|
|
SCRSIZE = 960 ; 40x24: size of default atari screen
|
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
_clrscr:lda SAVMSC ; screen memory
|
|
|
|
sta ptr1
|
|
|
|
lda SAVMSC+1
|
|
|
|
clc
|
2013-06-20 23:53:13 +00:00
|
|
|
adc #>(SCRSIZE-1)
|
2013-05-09 11:56:54 +00:00
|
|
|
sta ptr1+1
|
|
|
|
lda #0 ; screen code of space char
|
|
|
|
sta OLDCHR
|
2013-06-20 23:53:13 +00:00
|
|
|
ldy #<(SCRSIZE-1)
|
|
|
|
ldx #>(SCRSIZE-1)
|
2013-05-09 11:56:54 +00:00
|
|
|
_clr1: sta (ptr1),y
|
|
|
|
dey
|
|
|
|
bne _clr1
|
|
|
|
sta (ptr1),y
|
|
|
|
dex
|
|
|
|
bmi done
|
2013-06-20 23:53:13 +00:00
|
|
|
dec ptr1+1
|
2013-05-09 11:56:54 +00:00
|
|
|
dey
|
|
|
|
jmp _clr1
|
2000-05-28 13:40:48 +00:00
|
|
|
|
2013-05-09 11:56:54 +00:00
|
|
|
done: sta COLCRS
|
|
|
|
sta ROWCRS
|
|
|
|
jmp setcursor
|