]> git.sur5r.net Git - cc65/blobdiff - libsrc/vic20/color.s
Removed IRQ support from joystick drivers.
[cc65] / libsrc / vic20 / color.s
index 03c8bef07ad783998cda73b2d5fd15e47f0ac9c8..fb7cf467992c755c9f972ed95eefd0d7ce3483f1 100644 (file)
@@ -8,54 +8,53 @@
 ;
 
 
-       .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
 
 _textcolor:
-       ldx     CHARCOLOR       ; get old value
-       sta     CHARCOLOR       ; set new value
-       txa
-       rts
+        ldx     CHARCOLOR       ; get old value
+        sta     CHARCOLOR       ; set new value
+        txa
+        rts
 
 
 _bgcolor:
-       asl
-       asl
-       asl
-       asl
-       sei     ; don't want anything messing around while we update
-       sta     clr_tmp
-       lda     VIC_COLOR       ; get old value
-       and     #$0F
-       tax
-       ora     clr_tmp 
-       sta     VIC_COLOR       ; set new value
-       cli
-       txa
-       lsr
-       lsr
-       lsr
-       lsr
-       rts
+        asl
+        asl
+        asl
+        asl
+        sta     tmp1
+        sei                     ; don't want anything messing around while we update
+        lda     VIC_COLOR       ; get old value
+        and     #$0F
+        tax
+        ora     tmp1
+        sta     VIC_COLOR       ; set new value
+        cli
+        txa
+        lsr
+        lsr
+        lsr
+        lsr
+        rts
 
 
 _bordercolor:
-       and     #$07
-       sei     ; don't want anything messing around while we update
-       sta     clr_tmp
-               lda     VIC_COLOR   ; get old value
-       and     #$F8
-       tax
-       ora     clr_tmp
-       sta     VIC_COLOR       ; set new value
-       cli
-       txa
-       rts
+        and     #$07
+        sta     tmp1
+        sei                     ; don't want anything messing around while we update
+        lda     VIC_COLOR       ; get old value
+        and     #$F8
+        tax
+        ora     tmp1
+        sta     VIC_COLOR       ; set new value
+        cli
+        txa
+        rts