pattern number is preserved so cclear and clrscr will not mess with drawing

git-svn-id: svn://svn.cc65.org/cc65/trunk@2065 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
izydorst
2003-04-17 11:51:43 +00:00
parent 04e4ecc319
commit c4fc55d877
2 changed files with 11 additions and 3 deletions

View File

@@ -18,7 +18,9 @@
_clrscr:
lda #ST_WR_FORE | ST_WR_BACK
sta dispBufferOn
lda #0
lda curPattern ; save current pattern
pha
lda #0 ; set pattern to clear
jsr SetPattern
ldx #0
stx r3L
@@ -39,4 +41,6 @@ L40: lda #>319 ; 40 columns
ldx #<319
L99: sta r4H
stx r4L
jmp Rectangle
jsr Rectangle
pla
jmp SetPattern ; restore pattern