The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: nrdev on May 24, 2009, 08:28:40 PM

Title: colors
Post by: nrdev on May 24, 2009, 08:28:40 PM
where can I find the more info about colors for 16 bit dos applications and their hex codes?
Title: Re: colors
Post by: Tedd on May 24, 2009, 10:09:09 PM
Any reference covering standard VGA.


VGA_TCOL_BLACK      equ 00h
VGA_TCOL_BLUE       equ 01h
VGA_TCOL_GREEN      equ 02h
VGA_TCOL_CYAN       equ 03h
VGA_TCOL_RED        equ 04h
VGA_TCOL_MAGENTA    equ 05h
VGA_TCOL_ORANGE     equ 06h
VGA_TCOL_GREY       equ 07h
VGA_TCOL_DKGREY     equ 08h
VGA_TCOL_LTBLUE     equ 09h
VGA_TCOL_LTGREEN    equ 0Ah
VGA_TCOL_LTCYAN     equ 0Bh
VGA_TCOL_LTRED      equ 0Ch
VGA_TCOL_LTMAGENTA  equ 0Dh
VGA_TCOL_YELLOW     equ 0Eh
VGA_TCOL_WHITE      equ 0Fh

VGA_BCOL_BLACK      equ 00h
VGA_BCOL_BLUE       equ 10h
VGA_BCOL_GREEN      equ 20h
VGA_BCOL_CYAN       equ 30h
VGA_BCOL_RED        equ 40h
VGA_BCOL_MAGENTA    equ 50h
VGA_BCOL_ORANGE     equ 60h
VGA_BCOL_GREY       equ 70h

VGA_B_FLASH         equ 80h

Each character cell has one of VGA_TCOL_ and VGA_BCOL_ for setting the text and background colours. VGA_B_FLASH is an optional extra.
Default text would be: VGA_TCOL_GREY+VGA_BCOL_BLACK (grey text on black background.) Whereas, VGA_TCOL_WHITE+VGA_BCOL_RED+VGA_B_FLASH gives flashing white text on a red background.
Title: Re: colors
Post by: dedndave on May 24, 2009, 11:10:28 PM
found a few more links for you to look at

http://www.codebreakers-journal.com/content/view/140/93/
http://digiassn.blogspot.com/2006/03/asm-working-with-video-palette.html
http://webpages.charter.net/danrollins/techhelp/0113.HTM

that last one tells about other int 10h functions
one of them you will be interested in is int 10h function 1002h
Title: Re: colors
Post by: nrdev on May 25, 2009, 12:40:49 PM
ok, thanks.