]> git.sur5r.net Git - cc65/blobdiff - libsrc/tgi/tgi_setcolor.s
remove superfluous ".code" line
[cc65] / libsrc / tgi / tgi_setcolor.s
index abf054abcb97ebd1daff5b3cf88f6d1f45a49fb5..8e6fdc55554bb3eaadbd470c605e89fc2609cf44 100644 (file)
@@ -7,8 +7,13 @@
 
         .include        "tgi-kernel.inc"
 
-        .export         _tgi_setcolor
+.proc   _tgi_setcolor
 
-_tgi_setcolor   = tgi_setcolor  ; Call the driver
+        cmp     _tgi_colorcount ; Compare to available colors
+        bcs     @L1
+        sta     _tgi_color      ; Remember the drawing color
+        jmp     tgi_setcolor    ; Call the driver
+@L1:    jmp     tgi_inv_arg     ; Invalid argument
 
+.endproc