Re: Setting up new dosemu 1.3.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


jegunn wrote:
Hi, Karl.

I wrote a little dos C program many years ago to set the screen colors.
usage is

Usage: ansicolo fg bg i
Colors: blk 0 red 1 grn 2 yell 3 blu 4 mag 5 cya 6 wht 7
i is 0 for normal foreground, 1 for intensified
You need to load ansi.c or vansi.c in your config.sys.

I tried to attach the executable, but the list will not accept it. If
you want it, it is on our ftp site:

--jim gunn


If you have a c compiler, the (almost trivial) source is

#include <stdio.h>

int argc;
char **argv;
    if(argc < 3){
        printf("\nUsage: ansicolor fg bg i");
        printf("\nColors: blk 0 red 1 grn 2 yell 3 blu 4 mag 5 cya 6 wht 7");
        printf("\ni is 0 for normal foreground, 1 for intensified");
        if(argc == 4 && *argv[3] == '1') printf("\033[1m");

Hello jim.

I compiled your script but forgot how to convert a.out to a .exe file. Not even sure gcc can do that. It's been a long time since I used C in dos.

Also are you sure to use ansi.c and not ansi.sys in config.sys?

I solved the screen color problem in a different way by using 4dos which is a replacement/enhancement I've used for 20 years. It just recently became free of charge but I've paid them a lot over the years - very much worth it.

4dos can have aliases so I put the following alias in the alias file:
setcolor=color black on white	(Black is fg and white is bg)

and the following line in autoexec.bat:
prompt=`%@exec[@setcolor]$P$G`		( note backticks)

This gives me an easy to read black letters on grey screen in a KDE konsole. Since it's refreshed every time time a prompt appears the screen comes back to the proper color after an application executes.
Another good color choice is bright white on blue.

Hope this helps.  It's sure better for me ;-)


Larry Alkoff N2LA - Austin TX
Using Thunderbird on Slackware Linux
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [Linux Console]     [Linux Audio]     [Linux for Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite Camping]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Samba]     [Linux Media]     [Fedora Users]

  Powered by Linux