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 the display of a DOS application that is supposed to have 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:
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 in Geocomp
| Feature | no ANSI | ANSI.SYS | 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 | none | 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 |
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.
- 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
- Check to see if ANSI.SYS is already installed (see below). If so:
- Remark out the line in config.sys or config.nt ending in ....\ansi.sys,
- 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.
ANSI.SYS is included with DOS and Windows, so you don't have to download anything.
Use the appropriate method below to load ANSI.SYS for any application.
- DOS and Windows 3.1
- Edit C:\CONFIG.SYS to include this line at the end:
devicehigh=c:\dos\ansi.sys
- Restart the computer
- Windows 95 and 98
- Edit C:\CONFIG.SYS to include this line at the end:
devicehigh=c:\windows\command\ansi.sys
- Restart the computer
- Windows Me and XP Home
Use ANSI.COM instead.
Here's why....
- 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 in the SystemRoot, usually 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
- DOS? What's DOS?
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
Failing that, use ANSI.COM instead.
|