From: Larry Alkoff <labradley@mindspring.com>
To: jegunn <jeg@astro.princeton.edu>
Cc: "Karl." <kmw1@free.net.nz>, dosemu <linux-msdos@vger.kernel.org>
Subject: Re: Setting up new dosemu 1.3.3
Date: Wed, 12 Apr 2006 00:08:01 -0500 [thread overview]
Message-ID: <443C8B31.8090603@mindspring.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0604112230070.25628@quilla.localdomain>
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
next prev parent reply other threads:[~2006-04-12 5:08 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-10 17:05 Setting up new dosemu 1.3.3 Larry Alkoff
2006-04-10 20:25 ` Claudia Neumann
2006-04-10 21:15 ` Larry Alkoff
2006-04-11 9:11 ` Bart Oldeman
2006-04-11 17:20 ` Mike McCarty
2006-04-11 22:12 ` Larry Alkoff
2006-04-12 1:34 ` Karl.
2006-04-12 2:02 ` Larry Alkoff
2006-04-12 2:18 ` Karl.
2006-04-12 2:40 ` jegunn
2006-04-12 5:08 ` Larry Alkoff [this message]
2006-04-12 7:12 ` Mike McCarty
2006-04-12 14:24 ` Larry Alkoff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=443C8B31.8090603@mindspring.com \
--to=labradley@mindspring.com \
--cc=jeg@astro.princeton.edu \
--cc=kmw1@free.net.nz \
--cc=linux-msdos@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox