Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Text - Blinking foreground or high intensity background?

0 views
Skip to first unread message

Mark Mykkanen

unread,
Sep 17, 1995, 3:00:00 AM9/17/95
to
bits
7 6 5 4 3 2 1 0

1 . . . . . . . Foreground Blink/Background Intensity
1 . . . . . . Background Red
. 1 . . . . . Background Green
. . 1 . . . . Background Blue
. . . 1 . . . Foreground Intensity
. . . . 1 . . Foreground Red
. . . . . 1 . Foreground Green
. . . . . . 1 Foreground Blue

How do you change the 7th bit to/from foreground blinking and background
intensity?


--
--- - Mark Mykkanen
---- University of Minnesota
----- mykk...@gold.tc.umn.edu


John E. Davis

unread,
Sep 17, 1995, 3:00:00 AM9/17/95
to
Has anyone managed to implement this (see below) under Linux yet? Many text
mode applications are screaming for high intensity background. The
blink/high intensity background bit could be toggled via an escape sequence
or an ioctl. --John

On 17 Sep 95 04:12:06 EDT, gcli...@ulkyvx.louisville.edu
<gcli...@ulkyvx.louisville.edu> wrote:
: > How do you change the 7th bit to/from foreground blinking and background
: > intensity?
:
: There might be a BIOS function, but I'll tell you how to do it directly.
: You have to read register 10h of the attribute controller; modify bit
: 3 of the result (1 = blinking, 0 = intensity) and write it back. Such
: a sequence might look like:
:
: cli ; Let's not be interrupted
: in al,3dah ; (VGA, color; use 3bah for monochrome)
: ; This in is required to reset the attribute controller
: ; state so that the next write to port 03c0h is guaranteed to
: ; be a register address.
: mov al,10h
: out 3c0h,al ; We want to access register 10h
: in al,3c1h ; Read the data
: and al,0f7h ; Clear bit 3,this sets intensity mode
: push ax
: in al,3dah ; You may not need to do this again; my book
: ; is unclear about what happens when you read port 3c1h
: mov al,10h ;
: out 3c0h,al ; Set register 10h again
: pop ax
: out 3c0h,al ; Yes this should be 3c0h, we are writing now
: mov al,20h ; Needed by the hardware
: out 3c0h,al
: in al,3dah ; Leave the attrib controller in a known state
: sti ; Interrupts ok now


Jonnes

unread,
Sep 21, 1995, 3:00:00 AM9/21/95
to
In <DF1C1...@news.cis.umn.edu>, mykk...@gold.tc.umn.edu (Mark Mykkanen)
wrote:

>bits
>7 6 5 4 3 2 1 0

>1 . . . . . . . Foreground Blink/Background Intensity
> 1 . . . . . . Background Red
> . 1 . . . . . Background Green
> . . 1 . . . . Background Blue
> . . . 1 . . . Foreground Intensity
> . . . . 1 . . Foreground Red
> . . . . . 1 . Foreground Green
> . . . . . . 1 Foreground Blue

>How do you change the 7th bit to/from foreground blinking and background
>intensity?

I know there is a way to do it directly, but since it ain't time crucial
you can use bios, ie:

mov ax,1003h
mov bl,0
int 10h

And that's that!

Hope this helps


0 new messages