Classic Computer Magazine Archive COMPUTE! ISSUE 58 / MARCH 1985 / PAGE 116

IBM Personal Computing

Donald B. Trivette

The Most Important Peripheral

One of my friends recently bought an IBM AT. This is the Rolls Royce of IBM Personal Computers-the machine that is three times faster than the PC and PCjr, that comes with 256K of memory, and that has an optional 20-megabyte hard disk. This is the computer that I want but can neither afford nor justify. My friend doesn't really need the speed and power of the AT either-mostly he uses it to balance his checkbook, from which he deducted a tidy $5,795 to be able to do it faster than anyone else. Until he bought the AT, he got by with an IBM PC-XT, an Apple III, and a PCjr. (This guy has more computer power in his spare bedroom than many Fortune 500 companies had a decade ago.)
    Anyway, he was in the process of moving his files from the 10-megabyte PC-XT hard disk to the AT's 20-meg hard disk by copying them on floppy disks. Although this is time-consuming, it's not particularly difficult. At least it wouldn't have been difficult except my computer-rich friend was running his PC-XT without a monitor. His only monitor (gotta save a few bucks somewhere) was connected to the new AT. Do you know how much havoc you can cause running a computer without a video display? It's frightening!
    As my friend discovered, the most important peripheral attached to a computer is the display. Some would argue that the keyboard is equally important, but the keyboard isn't a peripheral in one sense-it nearly always comes with the computer, and the display almost never does. Besides, how much damage can you do without a keyboard?
    Once you've selected a PC or PCjr (or even an XT or AT), you can choose among six types of monitors. They are not completely interchangeable. An IBM Monochrome Display can be connected only to the PC; an IBM RGBjr Display can be connected only to the PCjr. For display purposes, the XT and AT are compatible with the PC. The PCjr has built-in circuitry to connect a monitor, while the more expensive PC has none. Therefore, the PC requires a separate internal display adapter before a monitor can be attached. The accompanying tables will help sort out what can be connected to what (prices don't include the cost of the video adapter boards and cables).

Display Choices
The best-and most expensive-choice for a monitor is an RGB (red-green-blue) display. An RGB monitor is capable of displaying sharp, vivid colors as well as black-and-white images. To connect this display to a PC, you'll need the color/graphics adapter board ($244). Although the PCjr has the equivalent of a color/graphics adapter built-in, IBM changed the connectors on the junior so the IBM RGB Display is not directly compatible. It requires a four-inch long adapter cable ($20).
    Because the IBM RGB Display is rather expensive ($680), IBM sells a special RGB monitor just for the PCjr-the RGBjr Display ($429). The RGBjr plugs directly into the PCjr's unusual connector. Unlike the more expensive RGB monitor, the RGBjr has an internal speaker, but it cannot be connected to the PC.
    Of course, you can also use a color or black-and-white TV set with a PC-series computer. Although a TV image is less sharp and the colors less vivid than an RGB image, a TV is a good choice for running many home-type computer programs. Besides, you probably already have one. The TV connects to the PC's color/graphics adapter via an RF modulator. IBM recommends the RF modulator made by M&R Electronics ($70). The PCjr also requires an RF modulator, but in this case IBM sells one for $30.
    A monochrome composite video monitor can also be connected to any PCjr or PC with a color/graphics adapter. This is a good choice when you don't need color but do want graphics. Such a monitor produces much sharper characters than a TV, and many people (myself included) prefer it to an RGB display for word processing. There are amber-screen and greenscreen models. According to some European studies, the newer amber screens are easier on the eyes. If you want color graphics but don't want to spend the money for an RGB display, a color composite video monitor is a good alternative to a TV. Like the monochrome composite video monitor, it connects directly to the video jack on the PCjr or the color/graphics adapter on the PC.
    The last choice for a display is a choice only for the PC; the IBM Monochrome Display will not work on the PCjr. While it displays superb characters, it has neither color nor graphics capabilities. It plugs into the PC's optional monochrome/printer adapter ($250).
    If you have the right adapters, cables, and fittings, you can connect several displays to the PCjr at the same time. I have had a color TV, a composite video monitor, and an RGB display all connected to my PCjr-and all three displaying the same screen at the same time. Multiple monitors on the PC react differently; you must select either the monochrome or color/graphics adapter by software.

Table 1: IBM PC Display Compatibility
Display Type         

Connects To       
color/graphics adapter
No $680
not compatible
IBM Monochrome
monochrome adapter
No No $275
Monochrome composite video
color/graphics adapter
No Yes
No $100*
Color composite video
color/graphics adapter
$249 †
TV set
color/graphics adapter
No $300 ‡

*Approximate price of 12-inch green screen or amber monitor.
†Approximate price of 12- to 14-inch color monitor.
‡Approximate price of 12- to 19-inch color TV. Add $70 for required RF modulator.

Table 2: IBM PCjr Display Compatibility
Display Type     

Connects To   
IBM RGB $20 cable
Yes Yes No $680
IBM RGBjr Plug-ready
Yes Yes Yes $429
IBM Monochrome Not compatible
Monochrome composite video Plug-ready No Yes No $100*
Color composite video Plug-ready Yes Yes Yes $249 †
TV set RF modulator
Yes Yes Yes $300 ‡

*Approximate price of 12-inch green screen or amber monitor.
†Approximate price of 12- to 14-inch color monitor.
‡Approximate price of 12- to 19-inch color TV. Add $30 for required RF modulator.

Adding Color To DOS
One of the first things you find out when you connect a color monitor to your PC or PCjr is that the Disk Operating System (DOS) screen isn't in color. DIR, CHKDSK, COPY, and all the other commands do their stuff in dull black and white. With up to $680 invested in a color monitor, who wants to look at black and white?
    The solution is the BASIC program below. It sets the text, background, and border colors and alters DOS so that once you've left BASIC, the screen colors remain unchanged. (It requires DOS 2.0 or higher.)
    Before entering the BASIC program, you've got to do some preliminary work with DOS. Format a new disk-a work disk-using the /S option. Then, from the original IBM DOS disk, copy the file named ANSI.SYS to the work disk with the COPY command:


    Next, make a new file on the work disk and put just one command in it. To do that, use the COPY command again-this time to copy from the keyboard into the new file. Type:


and then, the command:


    Finally, to save the file, press the F6 key and the Enter key. After this, there should be a file on the work disk named CONFIG.SYS as well as one named ANSI.SYS. Check to be sure.
    When DOS is started, it looks to see if there's a file named CONFIG.SYS on the boot disk. If so, it uses information from that file to set certain parameters. However, even though the CONFIG.SYS file is there, DOS doesn't yet know about it. To fix that situation, clear the computer by turning it off, waiting a few seconds, and then turning it back on. (Alternately, use the Ctrl-Alt-Del sequence.) Now, as DOS boots, it will find out about CONFIG.SYS and ANSI.SYS. (Don't put anything in an AUTOEXEC.BAT file about these files.)
    The next step is to type in the BASIC program following this column. Be especially careful when typing line 540-it contains semicolons in unusual places. Save the program on the boot disk with the filename COLORPGM.BAS before running it for the first time. If you run it without saving and there are no typing errors, the program will exit to DOS and all your typing will be lost. The irony is that if you get everything right, you lose. So save it, then test it.

Using The Color Changer
Now let's see how the program works. Lines 180-250 may look familiar. They are the BASIC color numbers; color 4 is red. However, DOS has a different numbering scheme; red is number 31 for the foreground and 41 for the background. Lines 60-130 are a conversion table to translate between BASIC and DOS colors. When you run the program, lines 270-290 ask whether you like the colors-initially black and white-shown on the screen. If you respond by typing anything other than Y or y, the program gives you a chance to make changes.
    Lines 300-410 allow you to enter numbers for the foreground (text), background, and border colors. Background colors may be only the numbers 0 through 7, however. If you forget and enter color 12 (light red), BASIC will use color 4 (red) instead. Lines 420-500 warn if you've selected an invisible combination-black text on a black background, for example. Pressing Enter leaves the color unchanged.
    Line 510 actually changes the screen colors, and line 530 loops back to display the menu again. Should this be the combination you want, answer the prompt by pressing Y. Line 540 then creates a disk file named COLOR.DOS. The filename is determined by line 40; you may want to change it to something else. Line 560 ends the program amd returns control to DOS. That's why you should save the program on disk before testing it. Should you want to stay in BASIC with the screen colors active, you'll need to delete line 560 or insert a REM as its first statement.
    Once you're back in DOS, you'll find that the screen is still in black and white. The COLOR.DOS file is the one that really changes the screen colors. To get the file to perform its magic, use the DOS TYPE command. That is, at the A> prompt, enter:


and then:


    From here on, the DOS screen will appear in the colors you selected. Whether the screen colors remain when you run another program depends on whether that program sets colors.
    If you get letters and numbers instead of a color change when you use the TYPE COLOR.DOS command, then CONFIG.SYS or ANSI.SYS has not been copied correctly to your disk, or you have not rebooted the system. You must boot the system using a disk containing these two files for the program to work.

Automating The Process
This does seem a roundabout way to change DOS colors, but it's simpler than some of the other methods. The problem is that while it's possible to set foreground and background colors for DOS, only BASIC can set the border color. When BASIC ends, it takes its colors with it-except the border color. Therefore, we use BASIC to set the border and create a file that DOS can use to set the foreground and background.
    You can use DOS batch commands to automate all this. Create a DOS batch file named COLOR.BAT. In it, put the following commands:


    Typing COLOR at the DOS prompt invokes the batch file, which loads BASIC, runs the COLORPGM program, and executes the TYPE and CLS (Clear Screen) commands.
    You might want to change the filename in line 40 from COLOR.DOS to something else in order to create and save several files of color combinations. For example, brown on white might be named BRNWHI.DOS; blue on white might be named BLUWHI.DOS. Once these files are on the DOS disk, you can change colors just by entering TYPE filename. (By the way, the file extension of DOS isn't special-use anything you like.) By including the TYPE command in an AUTOEXEC.BAT file, you can boot up DOS in color-provided the boot disk has the ANSI.SYS and CONFIG.SYS files. And remember, TYPE filename can't set the border-only the BASIC program can do that.
    The program requires DOS 2.0 or higher because earlier versions of DOS do not support the CONFIG.SYS features.

DOS Color Changer

Please refer to "COMPUTE!'s Guide To Typing In Programs" before entering this listing.

LA 5 REM Program to set colors in BASI
     C & DOS
FB 30 COLOR 7,0,0
LP 35 FG$="7":BG$="0":BD$="0"
OM 40 OPEN  "color.dos" FOR OUTPUT AS
DP 50 DIM FGDOS$(7), BGDOS$(7)
BA 60 FGDOS$(0)="30":   BGDOS$(0)="40"
LM 70 FGDOS$(1)="34":   BGDOS$(1)="44"
HB 80 FGDOS$(2)="32":   BGDOS$(2)="42"
GC 90 FGDOS$(3)="36":   BGDOS$(3)="46"
NB 100 FGDOS$(4)="31":   BGDOS$(4)="41
AN 110 FGDOS$(5)="35":   BGDOS$(5)="45
JB 120 FGDOS$(6)="33":   BGDOS$(6)="43
JN 130 FGDOS$(7)="37":   BGDOS$(7)="47
AF 140 CLS
PF 180 PRINT  "  0  Black        8 Gre
AC 190 PRINT  "  1  Blue         9 Lt.
BE 200 PRINT  "  2  Green       10 Lt.
MM 210 PRINT  "  3  Cyan        11 Lt.
LK 220 PRINT  "  4  Red         12 Lt.
NG 230 PRINT  "  5  Magenta     13 Lt.
PM 240 PRINT  "  6  Brown       14 Yel
JK 250 PRINT  "  7  White       15 Bri
       ght White"
PI 270 PRINT  "  Use these colors? Y/N
KO 280 A$=INKEY$:IF A$="" THEN 280
AF 290 IF A$="Y" OR A$="y" THEN 540
MD 310 LINE INPUT  " TEXT:  ";A$
FP 320 IF A$<>"" THEN FG$=A$
CA 340 LINE INPUT  " Background:  ";A$
ID 350 IF A$<>""    THEN BG$=A$
TO 370 LINE INPUT " Border: ";A$
NM 380 IF A$<>"" THEN BD$=A$
FD 390 FG=VAL(FG$)
QO 400 BG=VAL(BG$)
KD 420 IF FG>7 THEN HI$="1;":FG=FG-8:F
       G$=STR$(FG):FG=FG+8  ELSE HI$=
PH 440 IF BG<>FG THEN 510
DK 470 PRINT " WARNING: Characters wil
       1 be invisible."
LH 480 PRINT " Is this Okay? Y/N"
GK 490 A$=INKEY$:IF A$="" THEN 490
PD 500 IF A$="Y" OR A$="y" THEN 510 EL
       SE 140
AF 520 CLS
DC 530 GOTO 140
NI 540 PRINT #1,CHR$(27);"[";HI$;FGDOS
AN 570 END