•  Back 
  •  XBIOS Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
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      : 100EsetPalette()
vs_color()
EsetColor()                                                           XBIOS

Syntax

WORD EsetColor( idx, color )
WORD idx, color;

Function      EsetColor() sets an individual color in the TT030's palette.

Opcode        83 (0x53)

Availability  This call is available when the high word of the '_VDO'
              cookie has a value of 2.

Parameters    idx specifies the color index to modify (0-255).
              color is a TT030 format color WORD bit array divided
              as follows:

              Bits 15-12    Bits 11-8     Bits 7-4      Bits 3-0

              Reserved      Red           Green         Blue

              If color is EC_INQUIRE (1) then the call does not change the
              register but still returns it value.

Binding       move.w   color,-(sp)
              move.w   idx,-(sp)
              move.w   #$53,-(sp)
              trap     #14
              addq.l   #6,sp

Return Value  EsetColor() returns the old value of the color register.

Caveats       This call is machine-dependent to the TT030. It is therefore
              recommended that vs_color() be used instead for
              compatibility.

Comments      Unlike Setpalette() this call encodes color nibbles from the
              most signifigant to least signifigant bit (3-2-1-0) as
              opposed to the compatibilty method of 0-3-2-1.

See Also      EsetPalette(), vs_color()