[comp.sys.ibm.pc] How does one enable the other 8 background colors

ed@qtc.UUCP (Ed Lisle) (06/09/87)

How does one enable the other background colors so one can have
16 forground/16 background colors in Microsoft C ?

        +------------------------------------------------------------+
        |  Ed Lisle                             |   ogcvax!          |
        |  Quantitative Technology Corporation  |   verdix!  qtc!ed  |
        |  Beaverton, OR        (503) 626-3081  |  sequent!          |
        +------------------------------------------------------------+

smvorkoetter@watmum.UUCP (06/10/87)

In article <292@qtc.UUCP> ed@qtc.UUCP (Ed Lisle) writes:
>How does one enable the other background colors so one can have
>16 forground/16 background colors in Microsoft C ?

I assume you are talking about the CGA on a PC or Clone.  If so, then
you are out of luck.  There are only 8 background colours.  There are 3
bits for the foreground colour, 1 bit for foreground intensity, 3 bits
for the background colour, and 1 bit for blinking.  If you are using
a PCjr, you can diddle with the colour map to get any of 16 colours 
substituting for any other colour, allowing any background colour (but
still only 8 background colours on the screen at once).

Stefan Vorkoetter (smvorkoetter@watmum)

bryan@druhi.UUCP (06/21/87)

In article <1005@watmum.UUCP>, smvorkoetter@watmum.UUCP writes:
> In article <292@qtc.UUCP> ed@qtc.UUCP (Ed Lisle) writes:
> >How does one enable the other background colors so one can have
> >16 forground/16 background colors in Microsoft C ?
> 
> I assume you are talking about the CGA on a PC or Clone.  If so, then
> you are out of luck.  There are only 8 background colours.  [More
> reiteration of this point deleted.]

This isn't quite true.  Bit 5 of the "Mode Select Register" of the 6845
CRT controller (used in the IBM CGA and many clones) selects blinking
versus 16 background colors.  Doing:

	MOV DX,03D8H
	OUT DX,009H

on an IBM PC with CGA will cause 80x25 color text mode to be selected
with 16 background colors and no blinking.  In this mode, setting what is
normally the "blink" bit will now intensify the background color, giving
you access to the other 8 background colors.  The ROM BIOS merely sets
bit 5 during the power-up initializations to enable blinking instead.
-- 
--------------------------------------------------------------------------
John T. Bryan              USENET:  ...!ihnp4!druhi!bryan
AT&T Information Systems   PHONE:   (303) 538-5172
Denver, CO  80234

dalegass@dalcsug.UUCP (Dale Gass) (07/05/87)

In article <1982@druhi.ATT.COM>, bryan@druhi.ATT.COM (BryanJT) writes:
> 
> This isn't quite true.  Bit 5 of the "Mode Select Register" of the 6845
> CRT controller (used in the IBM CGA and many clones) selects blinking
> versus 16 background colors.  Doing:
> 
> 	MOV DX,03D8H
> 	OUT DX,009H
> 
> on an IBM PC with CGA will cause 80x25 color text mode to be selected
> with 16 background colors and no blinking.  In this mode, setting what is
> normally the "blink" bit will now intensify the background color, giving
> you access to the other 8 background colors.  The ROM BIOS merely sets

Although the following doesn't work on my cga-clone, the IBM manuals say
that bit 4 of register 3d9 will 'Intensify the background colors in the 
alpha mode'.  Thus, an  MOV DX,03d9h   MOV AL,10  OUT DX,AL should allow
the use of the other 8 background colors (but not all 16 at once).

-dalegass@dalcsug.uucp








gotta include more new text than old text...




gotta include more new text than old text...