The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: Magnum on November 15, 2011, 12:55:19 AM

Title: Colored prompt
Post by: Magnum on November 15, 2011, 12:55:19 AM
I am trying to find a way to load ansi.sys in order to display a colored prompt.

The COLOR command isn't cutting it.  :bg

I have modified ansi.nt and config.nt with no luck.

I am hoping there is a way, I sure miss a lot of things that DOS had.

Title: Re: Colored prompt
Post by: dedndave on November 15, 2011, 03:10:48 AM
ansi.sys is a 16-bit driver
cmd.exe is a 32-bit program
you may be able to load it by modifying a shortcut to cmd.exe, however - never tried it on an nt system   :P

at any rate, create a shortcut to cmd.exe
then, right-click on the shortcut - Properties - Colors tab   :U
Title: Re: Colored prompt
Post by: dedndave on November 15, 2011, 03:57:29 AM
if you want to change colors on the fly, as in a batch file...
make a little program that reads the command line and sets the console attributes using SetConsoleTextAttribute
Title: Re: Colored prompt
Post by: Magnum on November 17, 2011, 08:41:48 PM
Dave,

This works great on XP Sp3.

It even works with prompt commands and doskey macros.

http://gynvael.coldwind.pl/?id=188&lang=en

Now I am looking for a red white and blue prompt that had an american flag as well.
Title: Re: Colored prompt
Post by: dedndave on November 18, 2011, 01:50:35 AM
 :P