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:
50
libsrc/pet/clrscr.s
Normal file
50
libsrc/pet/clrscr.s
Normal file
@@ -0,0 +1,50 @@
|
||||
;
|
||||
; Ullrich von Bassewitz, 26.11.1998
|
||||
;
|
||||
; void clrscr (void);
|
||||
;
|
||||
|
||||
.export _clrscr
|
||||
.import plot
|
||||
.importzp ptr1
|
||||
.import xsize
|
||||
|
||||
.include "pet.inc"
|
||||
|
||||
_clrscr:
|
||||
|
||||
; Set the screen base address
|
||||
|
||||
lda #$00
|
||||
sta ptr1
|
||||
lda #$80
|
||||
sta ptr1+1
|
||||
|
||||
; Determine, how many pages to fill
|
||||
|
||||
ldx #4
|
||||
lda xsize
|
||||
cmp #40
|
||||
beq L1
|
||||
ldx #8
|
||||
|
||||
; Clear the screen
|
||||
|
||||
L1: lda #$20 ; Screen code for blank
|
||||
ldy #$00
|
||||
L2: sta (ptr1),y
|
||||
iny
|
||||
bne L2
|
||||
inc ptr1+1
|
||||
dex
|
||||
bne L2
|
||||
|
||||
; Set the cursor to 0/0
|
||||
|
||||
lda #0
|
||||
sta CURS_X
|
||||
sta CURS_Y
|
||||
jmp plot
|
||||
|
||||
rts
|
||||
|
||||
Reference in New Issue
Block a user