blob: 5881aea172ee3add1eb59233103684137c2746fb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
;
; Christian Groessler, Apr-2000
;
; void clrscr (void);
;
.export _clrscr
.include "atari.inc"
.importzp ptr1
SCRSIZE = 960 ; 40x24: size of default atari screen
_clrscr:lda SAVMSC ; screen memory
sta ptr1
lda SAVMSC+1
clc
adc #>(SCRSIZE-1)
sta ptr1+1
lda #0 ; screen code of space char
sta OLDCHR
ldy #<(SCRSIZE-1)
ldx #>(SCRSIZE-1)
_clr1: sta (ptr1),y
dey
bne _clr1
sta (ptr1),y
dex
bmi done
dec ptr1+1
dey
jmp _clr1
done: sta COLCRS
sta ROWCRS
rts
|