TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: KEVIN CAMPBELL
from: KURT KUZBA
date: 1997-07-15 23:57:00
subject: Palette in textmode?

KC>   I'm not sure of the attribute format though.
   It looks something like this:
unsigned short ScreenAttribute =
   BLINK_STATUS     << 15 |   // can be 0 or 1
   BACKGROUND_COLOR << 12 |   // can be 1 to 7
   FOREGROUN_COLOR  <<  8 |   // can be 1 to 15
   CHARACTER_DATA;            // can be 0 to 255
   Or, if you prefer a more graphical diagram... :)
    15    14  13  12  11  10   9   8   7   6   5   4   3   2   1   0
 `--v--' `----v----' `-------v------' `--------------v--------------'
  BLINK  BACKGROUND     FOREGROUND            CHARACTER DATA
   The character data is first in memory, and then its color data.
   They may be represented in this manner, using an unsigned short
   because of the lo-byte/hi-byte format of memory usage common to
   the xxx86 and 65xx processors.
> ] Bilbo ergo sum.  I am, but only by force of Hobbit..........
---
---------------
* Origin: *YOPS ]I[* 3.1 GIG * RA/FD/FE RADist * Milwaukee, WI (1:154/750)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.