Jump to content

  • Log In with Google      Sign In   
  • Create Account

Setting blink attribute problem.


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 bosjoh   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 September 1999 - 06:39 AM

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.


Sponsor:

#2 Rock2000   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 September 1999 - 05:10 AM

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


#3 bosjoh   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 September 1999 - 08:11 AM

No, that is used to set the background+forground colors.


#4 Sphet   Members   -  Reputation: 631

Like
Likes
Like

Posted 23 September 1999 - 11:46 AM

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?


#5 Rock2000   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 September 1999 - 01:44 PM

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).]


#6 bosjoh   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 September 1999 - 06:40 PM

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.

#7 FlyFire   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 September 1999 - 06:49 AM

Use fn INT 10H 1003H
bl=1 (enable blinking, 8bk colors)
bl=0 (disable blinking, 16bk colors)

------------------
FlyFire/CodeX
http://codexorg.webjump.com


#8 bosjoh   Members   -  Reputation: 122

Like
Likes
Like

Posted 24 September 1999 - 09:34 AM

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?


#9 FlyFire   Members   -  Reputation: 122

Like
Likes
Like

Posted 25 September 1999 - 06:39 AM

I have TechHelp! database v6.0
there was that info...

------------------
FlyFire/CodeX
http://codexorg.webjump.com





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS