Rock
Setting blink attribute problem.
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?
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?
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).]
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.
This way you can have 16 background colors.
Use fn INT 10H 1003H
bl=1 (enable blinking, 8bk colors)
bl=0 (disable blinking, 16bk colors)
bl=1 (enable blinking, 8bk colors)
bl=0 (disable blinking, 16bk colors)
------------------
FlyFire/CodeX
http://codexorg.webjump.com
FlyFire/CodeX
http://codexorg.webjump.com
http://codexorg.webjump.com
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).
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?
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:

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.
I have TechHelp! database v6.0
there was that info...
there was that info...
------------------
FlyFire/CodeX
http://codexorg.webjump.com
FlyFire/CodeX
http://codexorg.webjump.com
http://codexorg.webjump.com
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement