Article View: net.micro.pc
Article #5696Re: forcing color change from dos
From: Charles Bennett
Date: Mon, 17 Feb 1986 20:59
Date: Mon, 17 Feb 1986 20:59
49 lines
2718 bytes
2718 bytes
> Having just gotten a color monitor the my IBM-PC/XT, I've decided I
> don't like white characters on black background. How can I have
> DOS set the color of my characters on a permanent basis (i.e., every
> time I turn the system on)? I tried doing it in basic, but exiting
> basic resets the colors (it appears).
>
> Thanks,
> John Van Zandt
> Loral Instrumentation
Colors, both foreground and background but not border, can be set with
the prompt command. We set our colors by issuing a prompt string in
the autoexec.bat file. The info for screen control is given in the
DOS Tech Ref Manual in chapter 3. In chapter 3, they discuss all
manner of things for screen and key control through escape sequences.
You must have DEVICE=ANSI.SYS in your CONFIG.SYS file for these to work.
Try this on for size:
prompt $e[33;1;44m$e[s$e[1;1f$e[K$e[1;3f$d$e[1;21f$t$e[1;36f$p$e[u$n$g
Breakdown: $e[33;1;44m - set color to brown foreground(33)
highlight(1)- now yellow
to blue background(44)
$e[s - save current cursor position
$e[1;1f - position cursor at row 1, column 1
$e[K - erase from cursor to end of line inclusive
$e[1;3f - position cursor at row 1, column 3
$d - write day and date
$e[1;21f - position cursor to row 1, column 21
$t - write time
$e[1;36f - position cursor to row 1, column 36
$p - write current directory of default drive
$e[u - restore cursor position from saved location
$n - write default drive letter
$g - write the > character
This string seems long(and indeed it is), but you have at every prompt
in DOS the day, date, time, and what directory(and its path) you are
currently working in.
If these colors don't agree with you and you don't have access to a
DOS Tech Ref, send email and I will send you the complete color
code list. Enjoy.
--
-Chuck Bennett-
919-966-1134
... ...!(decvax|akgua)!mcnc!ecsvax!uchuck
Technical Details
Message-ID:
<1208@ecsvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!mcnc!ecsvax!uchuckReferences:
<1031@loral.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ecsvax.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!bellcore!decvax!mcnc!ecsvax!uchuck From: uchuck@ecsvax.UUCP (Charles Bennett) Newsgroups: net.micro.pc Subject: Re: forcing color change from dos Message-ID: <1208@ecsvax.UUCP> Date: Mon, 17-Feb-86 15:59:09 EST Article-I.D.: ecsvax.1208 Posted: Mon Feb 17 15:59:09 1986 Date-Received: Wed, 19-Feb-86 03:59:11 EST References: <1031@loral.UUCP> Organization: UNC - Chapel Hill Lines: 49