Path: 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 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." =============================================================================