mirror of
https://github.com/cc65/cc65.git
synced 2024-11-04 02:05:13 +00:00
35 lines
766 B
ArmAsm
35 lines
766 B
ArmAsm
|
;
|
||
|
; Christian Groessler, May-2014
|
||
|
;
|
||
|
; void clrscr (void);
|
||
|
;
|
||
|
|
||
|
.export _clrscr
|
||
|
.include "atari5200.inc"
|
||
|
.importzp ptr1
|
||
|
|
||
|
SCRSIZE = 480 ; 20x24: size of default conio atari5200 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
|
||
|
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_5200
|
||
|
sta ROWCRS_5200
|
||
|
rts
|