🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #2873

Re: How does BIOS define character attributes?

#2873
From: lsalomo
Date: Wed, 31 Oct 1990 17:15
40 lines
2066 bytes
From article <6558@uceng.UC.EDU>, by dsims@uceng.UC.EDU (david l sims):
> I want to use BIOS call 10H, function 09H (write attribute/character at
> current cursor position). Register BL is supposed to hold the
> attribute of the character that I want to write. However, I've searched
> my BIOS manual high and low, and I can't find anything describing
> this "character attribute."
> 
> Does anyone know how this character attribute is defined?
> I'm using alpha mode only, but if
> there's any information on graphics attributes as well, I would
> appreciate having it.

The attribute for a character is of the following format:

Bit     7  6  5  4  3  2  1  0
Meaning bl bc bc bc fc fc fc fc

where

bl - blink if set
bc - background color (0-7)
fc - foreground color (0-15)  Note that the high bit is the intensity bit,
     so 8-15 is actually the high intensity version of 0-7

You'll have to play with the colors to figure out the mapping.  I do remember
0=black,6=brown,7=light grey,8=dark grey,14=yellow,15=white.

Also note that there is a way to out() a specific number to the video chip
to tell it to interpret the blink bit as an intensity bit, but I do not
remember the details (consult the hardware tech. ref. for your machine).

Cheers,
Q - the "Q"uestor for knowledge (, a degree, etc.)

lsalomo@hubcap.clemson.edu
ibmman@prism.clemson.edu
ibmman@clemson.clemson.edu
=============================================================================
"Gee Wally, I think there's something wrong with the Beaver."
=============================================================================
Technical Details
Message-ID: <11279@hubcap.clemson.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!know!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!hubcap!lsalomo
References: <6558@uceng.UC.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!know!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!hubcap!lsalomo
From: lsalomo@hubcap.clemson.edu (lsalomo)
Newsgroups: comp.os.msdos.programmer
Subject: Re: How does BIOS define character attributes?
Message-ID: <11279@hubcap.clemson.edu>
Date: 31 Oct 90 17:15:25 GMT
References: <6558@uceng.UC.EDU>
Organization: Clemson University, Clemson, SC
Lines: 40