Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FileVsetRGB()EsetColor()Setpalette()Setcolor() XBIOSSyntaxWORD Setcolor( idx, new )
WORD idx, new;
Function Setcolor() sets a ST/TT030 color register.
Opcode 7 (0x07)
Availability All TOSversions.
Parameters idx specifies the color register to modify (0-16 on an ST,
0-255 on a STe or TT030). new is a bit array specifying the
new color as follows:
Bits 15-12 Bits 11-8 Bits 7-4 Bits 3-0
Unused Red Green Blue
Each color value has its bits packed in an unusual manner to
stay compatible between machines. Bits are ordered 0, 3, 2, 1
with 0 being the least signifigant bit. If new is COL_INQUIRE
(-1) then the old color is returned.
Binding move.w new,-(sp)
move.w idx,-(sp)
move.w #$06,-(sp)
trap #14
addq.l #6,sp
Return Value Setcolor() returns the old value of the color register.
Caveats This call is extremely device-dependent. vs_color() should be
used instead.
Comments The top bit of each color nibble is unused on the original ST machines.
See Also VsetRGB(), EsetColor(), Setpalette()