Exploring the EGA, Part 1 (PC Magazine August 1986 by Charles Petzold) IBM's introduction of the Enhanced Graphics Adapter (EGA) and Enhanced Color Display (ECD) in the fall of 1984 came with little warning, and as a result the rest of the industry has been slow to catch up with software support and compatible hardware. Now the EGA has established itself as the high-resolution color graphics standard for all but specialized applications. Whether you're a veteran owner or recent purchaser of an EGA, you may have been disappointed that the documentation IBM supplies with the EGA board covers only installation. Most manufacturers of EGA compatibles don't do much better. Most EGAs do not come with demonstration programs. Although the improved resolution of the EGA is obvious to the eye, it's certainly not clear what other magic is packed into the board. With only a few exceptions, the programs presented here use the BIOS Interrupt 10h video routines to communicate with the EGA. The techniques demonstrated in this article can be incorporated into programs written in high-level languages, however, since many of them (such as Turbo Pascal) also support BIOS calls. (BASIC, of course, is the most notable exception.) To go beyond whats in this article and Part II, you'll have to get a copy of the EGA Technical Reference. This is available only as an update to the two-volume IBM Options and Adapters Technical Reference (IBM part number 6322509, $125). An article on the EGA in the April 1985 issue of PC Tech Journal (Volume 3 Number 4) also has a good description of the BIOS calls. Creating the Utilities The short programs presented here are written in assembly language. For most of them, however, you do not need to use the IBM or Microsoft Macro Assembler. Instead, the programs are presented in a script format that allows you to create the executable .COM files using DEBUG (2.0 or later). First type each listing into an ASCII file with the extension .SCR. You can create the ASCII file with any word processor (or DOS's EDLIN) that can create ASCII files. (Or, since this text file was created in ASCII, you can use a word processor to "block" the programs and "move" or "write" them out to a file with the filename specified including the extension .SCR. For example, the program for EGAMODE.COM below could be blocked and copied out to the file EGAMODE.SCR.) You'll notice that each program listing has at least one blank line near the bottom. The blank line is very important, so make sure your .SCR file has a blank line in the same place. You do not have to type in the semicolons or anything to the right of the semicolons; these are comments and labels to help you understand what is going on in the program. Second, use DEBUG to create the executable .COM file with the command: DEBUG