]> git.sur5r.net Git - cc65/blobdiff - libsrc/tgi/tgi_getmaxcolor.s
Use _seterrno to make the code shorter.
[cc65] / libsrc / tgi / tgi_getmaxcolor.s
index dda4fb2439c4677a9d90e374ccfc6cc06a28ccef..2e2b2ad0e8332cb092a81f559e60dbfa963d9a33 100644 (file)
@@ -5,17 +5,17 @@
 ; /* Return the maximum supported color number (the number of colors would
 ;  * then be getmaxcolor()+1).
 ;  */
+;
 
         .include        "tgi-kernel.inc"
-        .export         _tgi_getmaxcolor
 
+.proc   _tgi_getmaxcolor
 
-_tgi_getmaxcolor:
-        ldx     _tgi_colors
+        ldx     _tgi_colorcount
         dex
         txa
         ldx     #0
         rts
 
-
+.endproc