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:

ftp://astro.princeton.edu/jeg/ansicolo/ansicolo.exe

--jim gunn

****************************************************************************

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

#include <stdio.h>


main(argc,argv)
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");
        printf("\n");
    }else{
        printf("\033[0;3%s;4%sm",argv[1],argv[2]);
        if(argc == 4 && *argv[3] == '1') printf("\033[1m");
        printf("\033[2J");
    }
}

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 commmand.com 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

--
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  http://vger.kernel.org/majordomo-info.html

[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