VOGONS


First post, by feipoa

User metadata
Rank l33t++
Rank
l33t++

I have this DOS program which I need to run in my autoexec.bat. The program changes the DOS font colour from the standard white to reddish pink. How do I change it back to the default white? Ideally, I would like to put a program in the autoexec.bat which changes the font back to white. I am using MS DOS 7.1 as part of the Windows 98SE installation.

Plan your life wisely, you'll be dead before you know it.

Reply 1 of 8, by luckybob

User metadata
Rank l33t++
Rank
l33t++

I haven't tried it "real" dos, but I know I can type in "color 02" in a batch file and it changes the text to a nice lime green. I use it in my minecraft server batch file.

It is a mistake to think you can solve any major problems just with potatoes.

Reply 2 of 8, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

Try "mode co80", if DOS 7.1 includes MODE.COM as came with earlier DOS versions. This resets the video mode and should return the palette to the default.

Reply 3 of 8, by konc

User metadata
Rank l33t
Rank
l33t

"color" is not available on win98.

As far as I know for dos 6.22 the options were
-Load ansi.sys and use the codes you want in your .bat (sucks, slows down the display)
-Debug and change command.com (too much trouble for a font color)
-Use some resident external utility (sucks too for obvious reasons)

Since you don't want to change the color but to restore it, there is no need to go through any of these. What we used to do for such programs back then was to run the mode.com command to reset the display to the default rows/columns which also restores the default color. You can add it as the last line of your .bat.

I can't remember the syntax, if you don't find your way around I can search it for you. It was like something mode con 80...

Edit: yeap, as I was typing this the answer was posted 😀 That's the trick!

Reply 4 of 8, by elianda

User metadata
Rank l33t
Rank
l33t

Actually the good ansi drivers access text mode directly. This gives a good speed up compared to the usual BIOS output, even more when BIOS is unshadowed.
For reference: ftp://78.46.141.148/dos/driver/ansi/NNANSI.DOC

Retronn.de - Vintage Hardware Gallery, Drivers, Guides, Videos. Now with file search
Youtube Channel
FTP Server - Driver Archive and more
DVI2PCIe alignment and 2D image quality measurement tool

Reply 5 of 8, by feipoa

User metadata
Rank l33t++
Rank
l33t++

mode c080 saved the day.

Plan your life wisely, you'll be dead before you know it.

Reply 6 of 8, by xjas

User metadata
Rank l33t
Rank
l33t

If you wanted to keep the contents of the screen you could write a one-line BASIC program:

echo 'COLOR 7'>color.bas

and then in the autoexec.bat:

qbasic /run color.bas

Or for extra street cred just compile it with QB4.5 and run the exe.

twitch.tv/oldskooljay - playing the obscure, forgotten & weird - most Tuesdays & Thursdays @ 6:30 PM PDT. Bonus streams elsewhen!

Reply 7 of 8, by alexanrs

User metadata
Rank l33t
Rank
l33t

Well, the ultimate streed cred would be creating a COM file with DEBUG 🤣

Reply 8 of 8, by Malvineous

User metadata
Rank Oldbie
Rank
Oldbie

Nice! Glad it fixed your problem 😀

@xjas: I don't think the BASIC COLOR solution would work, because it looks like it's the palette that's being changed rather than the colour. You'd need to use the PALETTE statement (if it works in text mode) to reset colour 7 back to the default.