black on white is an interesting problem. You cannot get a bright
background in normal hardware setting - you would get a blinking
one instead. The ansi escape sequence selects "reverse blinking"
or "black on white blinking", because NORMAL background colors are
not bright... The "bold" bit is bright foreground, and the "blink"
bit can be either blinking foreground or bright background - this
depends on your hardware setting, but most people use "blinking".
Looks like dosemu cannot do blinking foreground so it does bright?
Anyway, when I do "prompt $e[0;7;5m" then I do indeed get black on
white in dosemu, but only for text. It seems that our command.com
does not set empty space on the screen to the selected colors...
When you do "cls" and then do "ver", you see that the rest of the
screen is black. I think this is quite normal even with MS ANSI.
Another interesting problem is that when the screen scrolls, the
color which "scrolls in" from the bottom is black on grey instead
of black on white. This is what creates the effect you describe.
> However what happens is that the c:> has the correct bright white
> correct but the rest of the screen is a dirtyish grey. When I type
> characters after c:> all the chars on that line have a nice white
> background but the untyped part of every line is that dirty grey.
Actually NANSI does this deliberately. I guess the author did not
want the scrolling up fill the screen with blinking eventually:
Function "get_blank_attrib" is described as:
; Determine new attribute and character for a new blank region.
; Use current attribute, just disallow blink and underline.
; (Pretty strange way to do it. Might want to disallow rev vid, too.)
It contains this line in the file nansi.asm:
and ah, 7fh ; disallow blink
It also limits the attribute to "either 1 or 7" (underline or
normal, all other values suppressed) if you are in monochrome.
I suggest to comment out that line :-). What should we do about
the monochrome case, by the way? Can that stay as it is now?
Larry, could you comment out the abovementioned 7fh line and
recompile your NANSI file? That will need ASM (ArrowASM, is
part of our distro), exe2bin (also in our distro) and tlink
(from Turbo C 2, freeware, maybe replaceable with VAL...). If
this is too complex for you, let me know, then I can compile
a fresh file for you here and send it to you.
PS: You can also easily patch / fix your binary file as follows:
Writing 1345 bytes.
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
Freedos-user mailing list