Small optimizations
git-svn-id: svn://svn.cc65.org/cc65/trunk@1379 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -9,12 +9,11 @@
|
|||||||
|
|
||||||
|
|
||||||
.export _textcolor, _bgcolor, _bordercolor
|
.export _textcolor, _bgcolor, _bordercolor
|
||||||
|
.importzp tmp1
|
||||||
|
|
||||||
.include "vic20.inc"
|
.include "vic20.inc"
|
||||||
|
|
||||||
.bss
|
|
||||||
|
|
||||||
clr_tmp: .res 1 ; tempory storage for bitfield ops
|
|
||||||
|
|
||||||
.code
|
.code
|
||||||
|
|
||||||
@@ -30,12 +29,12 @@ _bgcolor:
|
|||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
asl
|
asl
|
||||||
|
sta tmp1
|
||||||
sei ; don't want anything messing around while we update
|
sei ; don't want anything messing around while we update
|
||||||
sta clr_tmp
|
|
||||||
lda VIC_COLOR ; get old value
|
lda VIC_COLOR ; get old value
|
||||||
and #$0F
|
and #$0F
|
||||||
tax
|
tax
|
||||||
ora clr_tmp
|
ora tmp1
|
||||||
sta VIC_COLOR ; set new value
|
sta VIC_COLOR ; set new value
|
||||||
cli
|
cli
|
||||||
txa
|
txa
|
||||||
@@ -48,12 +47,12 @@ _bgcolor:
|
|||||||
|
|
||||||
_bordercolor:
|
_bordercolor:
|
||||||
and #$07
|
and #$07
|
||||||
|
sta tmp1
|
||||||
sei ; don't want anything messing around while we update
|
sei ; don't want anything messing around while we update
|
||||||
sta clr_tmp
|
|
||||||
lda VIC_COLOR ; get old value
|
lda VIC_COLOR ; get old value
|
||||||
and #$F8
|
and #$F8
|
||||||
tax
|
tax
|
||||||
ora clr_tmp
|
ora tmp1
|
||||||
sta VIC_COLOR ; set new value
|
sta VIC_COLOR ; set new value
|
||||||
cli
|
cli
|
||||||
txa
|
txa
|
||||||
|
|||||||
Reference in New Issue
Block a user