2002-06-21 14:16:32 +00:00
|
|
|
;
|
2020-06-04 16:58:05 +00:00
|
|
|
; 2002-06-21, Ullrich von Bassewitz
|
|
|
|
; 2020-06-04, Greg King
|
2002-06-21 14:16:32 +00:00
|
|
|
;
|
|
|
|
; void __fastcall__ tgi_setcolor (unsigned char color);
|
|
|
|
; /* Set the current drawing color */
|
|
|
|
|
|
|
|
|
|
|
|
.include "tgi-kernel.inc"
|
|
|
|
|
2003-02-11 12:37:46 +00:00
|
|
|
.proc _tgi_setcolor
|
|
|
|
|
2002-06-22 21:40:24 +00:00
|
|
|
cmp _tgi_colorcount ; Compare to available colors
|
2002-06-22 13:10:02 +00:00
|
|
|
bcs @L1
|
2020-06-04 16:58:05 +00:00
|
|
|
@L0: sta _tgi_color ; Remember the drawing color
|
2002-06-22 13:10:02 +00:00
|
|
|
jmp tgi_setcolor ; Call the driver
|
2002-06-22 21:40:24 +00:00
|
|
|
|
2020-06-04 16:58:05 +00:00
|
|
|
@L1: ldx _tgi_colorcount
|
|
|
|
beq @L0 ; Zero means 256 colors
|
|
|
|
jmp tgi_inv_arg ; Invalid argument
|
2002-06-21 14:16:32 +00:00
|
|
|
|
2020-06-04 16:58:05 +00:00
|
|
|
.endproc
|