• Advertisement

Archived

This topic is now archived and is closed to further replies.

Setting blink attribute problem.

This topic is 6694 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I had to fool with this in college, but don't you set the attribs on a char by char basis, writing to either the odd byte or odd nibble of the video text segment?

Rock

Share this post


Link to post
Share on other sites
Advertisement
I always remember blink being the top bit of the odd byte in the video display, hence there being more colors for foreground then background.. background uses 3 bits, foreground 4, and blink = 1.

or is it 1 for inverse?

Share this post


Link to post
Share on other sites
Yup, you hit it on the head. The high bit is the blink bit, 3 bit background color, and 4 foreground. I don't think the color modes support inverse (not on a char by char basis anyway). That may be an attrib in mono modes (never used it).

Rock

[This message has been edited by Rock2000 (edited September 23, 1999).]

Share this post


Link to post
Share on other sites
Yes you can set the back and foreground colors with the odd byte. With blink on you have 8 background colors (the other ones activate blink). But there is a way to set the videocard attributes to turn blink off.
This way you can have 16 background colors.

Share this post


Link to post
Share on other sites
That's the better way.
I couldn't find it, still using an old program with info on interrupts, I/O ports etc. (Maybe you've heard of it, techhelp).

Anyone knows a better (newer) program of the same kind?

Share this post


Link to post
Share on other sites
Back to good ol' textmode .
I'm writing a I/O library for a schoolmate (in Borland C++ 5.0).
Now I've stumbled upon this error:
When setting the blink attribute to ZERO (off) the screen turns black. Writing to the video segment won't help. This is my code:

asm{
mov dx, 0x3DA
in al, dx
mov dx, 0x3C0
mov al, 0x10
out dx, al
mov al, 4
out dx, al
};

Hope anybody can help me out.

Share this post


Link to post
Share on other sites

  • Advertisement