Re: blinking colors and intense.e
- Posted by "Juergen Luethje" <j.lue at gmx.de> Jun 02, 2004
- 712 views
Michael Thompson wrote: > Hi, all. I am playing with writing colored text to a DOS window, > and I find that having background colors of 8-15 cause the fore- > ground chars to blink. Searching the EUForum, I find mention of > a file named intense.e, by David Cuny, but I can't find the file > anywhere. I found the SCREEN.e in his EE files, but the code does > not seem to work. > > Is there an easy fix for this, to work in both maximized and > non-max'ed DOS screens? I am seeing this on both Win2K and XP. > (note: the blinking only occurs during a maximized DOS screen, but > not when the window is not max'ed.) The following program works for me, using the ex.exe 2.4 interpreter under Win 98:
include graphics.e include machine.e type boolean (object x) if integer(x) and (x = 0 or x = 1) then return 1 end if return 0 end type global procedure set_blink (boolean enable) -- In text mode, a text_color() value in the interval [16,31] normally -- causes a blinking foreground. -- With set_blink(OFF), these values cause a bright background instead. -- Note: The way this procedure is written here, it works only on -- EGA, MCGA, and VGA screencards, -- *not* on MDA/Herc and CGA screencards. sequence reg_list reg_list = repeat(0, REG_LIST_SIZE) reg_list[REG_AX] = #1003 -- BIOS service to disable/enable blink reg_list[REG_BX] = enable reg_list = dos_interrupt(#10, reg_list) end procedure constant OFF = 0, ON = 1 set_blink(OFF) clear_screen() for fore = 0 to 31 do text_color(fore) for back = 0 to 7 do bk_color(back) puts(1, " aaa ") end for end for if getc(0) then end if
Regards, Juergen