From 93dbb62e9f85c9546a73792ab8af9687b447c105 Mon Sep 17 00:00:00 2001 From: cuz Date: Wed, 7 Aug 2002 19:35:15 +0000 Subject: [PATCH] Small optimizations git-svn-id: svn://svn.cc65.org/cc65/trunk@1379 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/vic20/color.s | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/libsrc/vic20/color.s b/libsrc/vic20/color.s index 03c8bef07..4803df824 100644 --- a/libsrc/vic20/color.s +++ b/libsrc/vic20/color.s @@ -9,12 +9,11 @@ .export _textcolor, _bgcolor, _bordercolor + .importzp tmp1 .include "vic20.inc" -.bss -clr_tmp: .res 1 ; tempory storage for bitfield ops .code @@ -30,12 +29,12 @@ _bgcolor: asl asl asl - sei ; don't want anything messing around while we update - sta clr_tmp + sta tmp1 + sei ; don't want anything messing around while we update lda VIC_COLOR ; get old value and #$0F tax - ora clr_tmp + ora tmp1 sta VIC_COLOR ; set new value cli txa @@ -48,12 +47,12 @@ _bgcolor: _bordercolor: and #$07 - sei ; don't want anything messing around while we update - sta clr_tmp - lda VIC_COLOR ; get old value + sta tmp1 + sei ; don't want anything messing around while we update + lda VIC_COLOR ; get old value and #$F8 tax - ora clr_tmp + ora tmp1 sta VIC_COLOR ; set new value cli txa -- 2.39.5