From c4fc55d8777a5045e9ae8783dff34e535dc010e6 Mon Sep 17 00:00:00 2001 From: izydorst Date: Thu, 17 Apr 2003 11:51:43 +0000 Subject: [PATCH] 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 --- libsrc/geos/conio/cclear.s | 6 +++++- libsrc/geos/conio/clrscr.s | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/libsrc/geos/conio/cclear.s b/libsrc/geos/conio/cclear.s index 216f120ff..a40404eb7 100644 --- a/libsrc/geos/conio/cclear.s +++ b/libsrc/geos/conio/cclear.s @@ -40,8 +40,12 @@ _cclear: ldx #r4 ldy #3 jsr DShiftLeft - lda #0 ; pattern + lda curPattern ; store current pattern + pha + lda #0 ; set pattern to clear jsr SetPattern jsr Rectangle + pla + jsr SetPattern ; restore pattern jsr fixcursor L9: rts diff --git a/libsrc/geos/conio/clrscr.s b/libsrc/geos/conio/clrscr.s index ed8b6b080..b1bdc17ad 100644 --- a/libsrc/geos/conio/clrscr.s +++ b/libsrc/geos/conio/clrscr.s @@ -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 -- 2.39.5