oh no! my text is blinking!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
datajack

oh no! my text is blinking!

Post by datajack »

my function fr setting the code color is

Code: Select all


int attrib = 0x0F;

void settextcolor(unsigned char forecolor, unsigned char backcolor)
{
   attrib = (backcolor << 4 ) | (forecolor & 0x0F);
}
when i use the function to chang the text and back ground color, my text blinks at boottime how is this stopped...
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:oh no! my text is blinking!

Post by Pype.Clicker »

the highest bit of attributes is the "blinking bit" unless you program the VGA card to support 16 background colours instead. check "freevga" document if you want to know more about it or just stick to the 8 first colours for the background.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re:oh no! my text is blinking!

Post by Brendan »

Hi,

If you're in real mode you can disable the blinking (and enable 16 background colours) using BIOS Int 0x10, AX=0x1003. See:

http://www.ctyme.com/intr/rb-0117.htm

At least, this is what I've been using...


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
raywill

Re:oh no! my text is blinking!

Post by raywill »

Just set the eighth bit 0.
Post Reply