China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-15 15:48
中国DOS联盟论坛 » DOS疑难解答 & 问题讨论 (解答室) » Adding colors to characters under MS-DOS 6.22 View 2,252 Replies 5
Original Poster Posted 2009-05-14 06:51 ·  中国 广东 东莞 电信
新手上路
Credits 13
Posts 6
Joined 2007-01-19 22:16
19-year member
UID 77044
Gender Male
Status Offline
In MS-DOS 6.22, to add colors to characters, you can use the `COLOR` command. The command format is `COLOR [attr]`, where `attr` is a combination of a background color and a foreground color. For example, to make the characters red on a black background, you can use `COLOR 40` (where 4 is the foreground color code for red and 0 is the background color code for black). To make the characters green on a black background, you can use `COLOR 20` (where 2 is the foreground color code for green and 0 is the background color code for black).
Floor 2 Posted 2009-05-14 23:08 ·  中国 辽宁 葫芦岛 联通
中级用户
★★
Credits 247
Posts 147
Joined 2009-04-09 20:52
17-year member
UID 142531
Gender Male
Status Offline
Load ansi.sys
For specific details, please search online by yourself.
Floor 3 Posted 2009-05-17 12:26 ·  中国 陕西 宝鸡 电信
初级用户
★★
Credits 116
Posts 67
Joined 2007-02-23 06:12
19-year member
UID 79993
Gender Male
Status Offline
Loading ANSI.SYS can change the character color, but is that temporary? As long as you do a CLS, it returns to the original color!
Floor 4 Posted 2009-05-18 22:17 ·  中国 广东 东莞 电信
新手上路
Credits 13
Posts 6
Joined 2007-01-19 22:16
19-year member
UID 77044
Gender Male
Status Offline
I didn't set up CONFIG.SYS. I just wanted to control the font color in the batch processing, and I figured it out yesterday. Thanks to everyone. I used the ECHO command.
Floor 5 Posted 2010-12-05 12:13 ·  中国 上海 电信
新手上路
Credits 6
Posts 4
Joined 2010-11-22 16:15
15-year member
UID 178050
Gender Male
Status Offline
Can you share the code on the 4th floor? Thanks!
Floor 6 Posted 2010-12-12 14:18 ·  中国 上海 电信
金牌会员
★★★★
Credits 4,639
Posts 2,239
Joined 2005-01-30 00:00
21-year member
UID 35785
Gender Male
Status Offline
Forum Jump: