Geocomp Systems
Support
Thin Black line
Products
News
Support Current page marker
Training
Contact
Free Software
Purchase  
Links
Home

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

Featureno ANSIwith ANSI.SYSwith ANSI.COM
VGA modeOKOKOK
DOS shellgarbledOKOK
DC 2black screenOKOK
DTM 2black screenOKOK
DTM 3black screenOKOK
DTM 4weird codesOKOK
SDS 94missing promptOKOK
RDP 413lockupghostingOK
Drainageblack screenOKno arrow keys
required memorynil4192 bytes2544 bytes
Licencenot requiredoperating systemabandonware
Availabilitynot requiredoperating systemdownload
Installation (see below)not requirededit CONFIG.NTedit 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:

  1. Install Geocomp, or other DOS application, if you haven't already.
  2. 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.
  3. If you do need to install ANSI.COM:
    1. Download ANSI.ZIP
    2. Extract all the files, including ANSI.COM, into a folder to suit your application, for example C:\GC10\
    3. Edit the beginning of the application DOS batch file to run ANSI.COM, for example:
      @ECHO OFF
      C:\GC10\ANSI.COM
      
  4. If ANSI.SYS is loaded during boot up, ANSI.COM is disabled. If this is a problem (for example, you use RDP 413):
    1. Remark out the line ending in ....\ansi.sys (depending on the Windows version, see below)
    2. 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.

  1. Install Geocomp, or other DOS application, if you haven't already.
  2. 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.
  3. If you do need to install ANSI.SYS, use the appropriate method for your version of Windows:
    • DOS and Windows 3.1
      1. Edit C:\CONFIG.SYS to include this line at the end:
        devicehigh=c:\dos\ansi.sys
        
      2. Restart the computer
    • Windows 95 and 98
      1. Edit C:\CONFIG.SYS to include this line at the end:
        devicehigh=c:\windows\command\ansi.sys
        
      2. Restart the computer
    • Windows Me and XP Home
      1. Use ANSI.COM instead. Here's why....
    • Windows NT, 2000 and XP Pro
      1. Use Windows to search for the file ANSI.SYS
      2. Note the location. If there is more than one, choose the one under the SystemRoot, usually in C:\Windows\System32.
      3. Open the CONFIG.NT in that location using an editor such as Notepad
      4. Go to the end of the file
      5. If it's not already there, add this new line at the end:
        devicehigh=%SystemRoot%\System32\ansi.sys
      6. Save
      7. Right-click on your Geocomp shortcut
      8. Select Properties
      9. Select the Program tab
      10. Click on Advanced
      11. Confirm that the Config filename is the same file that you just edited
      12. OK
      13. OK
    • Windows Vista, Windows 7 and Windows 8
      • DOS? What's DOS?

    Confirmation

    Whichever way you install ANSI, confirm that the ANSI codes are enabled.

    To confirm for Geocomp:

    1. Start Geocomp
    2. 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
brown bar