This commit was generated by cvs2svn to compensate for changes in r2,
which included commits to RCS files with non-trunk default branches. git-svn-id: svn://svn.cc65.org/cc65/trunk@3 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
47
libsrc/atari/clrscr.s
Normal file
47
libsrc/atari/clrscr.s
Normal file
@@ -0,0 +1,47 @@
|
||||
;
|
||||
; Christian Groessler, Apr-2000
|
||||
;
|
||||
; void clrscr (void);
|
||||
;
|
||||
|
||||
.export _clrscr
|
||||
|
||||
.include "atari.inc"
|
||||
|
||||
.ifdef DIRECT_SCREEN
|
||||
|
||||
.importzp ptr1
|
||||
|
||||
_clrscr:lda SAVMSC ; screen memory
|
||||
sta ptr1
|
||||
lda SAVMSC+1
|
||||
clc
|
||||
adc #>(40*24)
|
||||
sta ptr1+1
|
||||
lda #0 ; screen code of space char
|
||||
ldy #<(40*24) ; 40x24: size of default atari screen
|
||||
ldx #>(40*24)
|
||||
_clr1: sta (ptr1),y
|
||||
dey
|
||||
bne _clr1
|
||||
sta (ptr1),y
|
||||
dex
|
||||
bmi done
|
||||
ldy ptr1+1
|
||||
dey
|
||||
sty ptr1+1
|
||||
ldy #255
|
||||
jmp _clr1
|
||||
|
||||
done: sta COLCRS
|
||||
sta ROWCRS
|
||||
rts
|
||||
|
||||
.else
|
||||
|
||||
.import putchar
|
||||
_clrscr:
|
||||
lda #ATCLR
|
||||
jmp putchar
|
||||
|
||||
.endif
|
||||
Reference in New Issue
Block a user