How Geocomp displays text using ANSI
Introduction to ANSI display codes
In the era when graphics cards could display colour, but graphical applications were uncommon, the American National Standards Institute (ANSI), established standard codes for displaying fancy colours and forms using text.
If you have a problem with a DOS application that is supposed to display coloured text or forms, maybe it’s an ANSI problem. Here is an explanation of how and when to load ANSI, using Geocomp as an example.
Most of Geocomp uses VGA for graphics, but parts use text mode graphics.
For example, in the Geocomp 10 DOS batch file, we set the prompt like this:
PROMPT=$e[1;36m$p$ $e[2;33m$ [GEOCOMP 10 DOS SHELL] $g$e[1;32m
ANSI interprets the codes so that, when you select D for DOS Shell from the Geocomp Main Menu, the DOS prompt should look something like this:
C:\GC10\DATA[GEOCOMP 10 DOS SHELL] >
When ANSI is not loaded, you see this instead:
[1;36mC:\GC10\DATA [2;33m[GEOCOMP 10 DOS SHELL] > [1;32m
You can enable ANSI by loading ANSI.SYS or ANSI.COM.
Advantages and Disdvantages of ANSI installation methods in Geocomp
Feature | no ANSI | with ANSI.SYS | with ANSI.COM |
VGA mode | OK | OK | OK |
DOS shell | garbled | OK | OK |
DC 2 | black screen | OK | OK |
DTM 2 | black screen | OK | OK |
DTM 3 | black screen | OK | OK |
DTM 4 | weird codes | OK | OK |
SDS 94 | missing prompt | OK | OK |
RDP 413 | lockup | ghosting | OK |
Drainage | black screen | OK | no arrow keys |
required memory | nil | 4192 bytes | 2544 bytes |
Licence | not required | operating system | abandonware |
Availability | not required | operating system | download |
Installation (see below) | not required | edit CONFIG.NT | edit GC10.BAT |
In summary, Geocomp users should always load ANSI.COM unless they use the Drainage menu. Geocomp 10.2 does this by default.
Installing ANSI.COM
ANSI.COM enables ANSI codes when it is running in the background.
ANSI.COM is written by Michael J. Mefford and was released on a disk on the cover of PCMagazine in 1989.
To install ANSI.COM:
- Install Geocomp, or other DOS application, if you haven’t already.
- Test whether ANSI has been enabled. For example, try the Geocomp DOS prompt as described above. If your application prompt or menu displays correctly, you don’t need to change or install ANSI.
- If you do need to install ANSI.COM:
- Download ANSI.ZIP
- Extract all the files, including ANSI.COM, into a folder to suit your application, for example C:\GC10\
- Edit the beginning of the application DOS batch file to run ANSI.COM, for example:
@ECHO OFF C:\GC10\ANSI.COM
- If ANSI.SYS is loaded during boot up, ANSI.COM is disabled. If this is a problem (for example, you use RDP 413):
- Remark out the line ending in ….\ansi.sys (depending on the Windows version, see below)
- If DOS or Windows 95, 98 or Me, restart the computer.
Installing ANSI.SYS
ANSI.SYS is a real-mode device driver that enables ANSI codes.
- Install Geocomp, or other DOS application, if you haven’t already.
- Test whether ANSI has been enabled. For example, try the Geocomp DOS prompt as described above. If your application prompt or menu displays correctly, you don’t need to change or install ANSI.
- If you do need to install ANSI.SYS, use the appropriate method for your version of Windows:
- DOS and Windows 3.1
- Edit C:\CONFIG.SYS to include this line at the end:
devicehigh=c:\dos\ansi.sys
- Restart the computer
- Edit C:\CONFIG.SYS to include this line at the end:
- Windows 95 and 98
- Edit C:\CONFIG.SYS to include this line at the end:
devicehigh=c:\windows\command\ansi.sys
- Restart the computer
- Edit C:\CONFIG.SYS to include this line at the end:
- Windows Me and XP Home
- Use ANSI.COM instead
- Windows NT, 2000 and XP Pro
- Use Windows to search for the file ANSI.SYS
- Note the location. If there is more than one, choose the one under the SystemRoot, usually in C:\Windows\System32.
- Open the CONFIG.NT in that location using an editor such as Notepad
- Go to the end of the file
- If it’s not already there, add this new line at the end:
devicehigh=%SystemRoot%\System32\ansi.sys
- Save
- Right-click on your Geocomp shortcut
- Select Properties
- Select the Program tab
- Click on Advanced
- Confirm that the Config filename is the same file that you just edited
- OK
- OK
- Windows Vista, Windows 7 and Windows 8
- DOS? What’s DOS
- DOS and Windows 3.1
Confirmation
Whichever way you install ANSI, confirm that the ANSI codes are enabled.
To confirm for Geocomp:
- Start Geocomp
- Select D DOS Shell to confirm that ANSI is loaded (see above).
If ANSI is not loaded, check for spelling mistakes. If you used ANSI.SYS, try using the full path such as
device=C:\Windows\System32\ansi.sys