Est. 1989 Beginner

ASIC

David A. Visti's "almost BASIC": a tiny shareware BASIC compiler for MS-DOS, first copyrighted in 1989, that dropped line numbers, compiled straight to COM files a few hundred bytes long, and grew from 40-odd statements to over 90 before its last release, version 5.00, in 1994

Created by David A. Visti

Paradigm Procedural, Imperative
Typing Static (type-suffix sigils: none, &, @, $)
First Appeared 1989
Latest Version ASIC 5.00 (1994)

ASIC is a compiler for a small subset of BASIC that ran on MS-DOS. David A. Visti wrote it on his own in Raleigh, North Carolina, and later sold it through his company, 80/20 Software. Its manual’s tagline, “It’s almost BASIC”, was also a fair summary. ASIC left out a lot that other BASICs had: floating point, boolean operators, exponentiation, and for most of its life any expression with more than one operator. In return it compiled a program in a single fast pass, straight to a .COM file that could be only a few hundred bytes long, with no line numbers in the source. From 1989 to 1994 it was passed around BBSes, magazine disks and shareware CD-ROMs, and for some hobbyists it was probably their first compiler.

History & Origins

In the late 1980s every IBM PC owner already had a BASIC, BASICA or GW-BASIC, which came with DOS. Both were interpreters with line numbers. Compiling your programs meant buying something like Microsoft QuickBASIC or Borland Turbo Basic. ASIC was aimed at the gap between those two.

ASIC 1.0 says “Copyright 1989 by David A. Visti”, and its README lists a small package: an editor with a built-in compiler (ASIC.EXE), a command-line compiler (ASICC.EXE), a manual, and one demo program, a Game of Life. The manual calls it a subset of BASICA and GW-BASIC “which supports over 40 BASIC statements, integer and string variables, and integer arrays”. Personal use was free, and only commercial users were asked for $10. The oldest surviving copies of 1.0 carry file dates of late February and early March 1990, so it is not known exactly when in 1989–90 it first went out.

The tutorial in the manual starts by comparing ASIC with GW-BASIC side by side:

1
2
3
4
REM  GWBASIC/BASICA                  ASIC
REM  10  I=I+1                       ADDONE: I=I+1
REM  20  PRINT I                             PRINT I
REM  30  IF I<100 THEN 10                    IF I<100 THEN ADDONE:

Labels end in a colon, up to 80 characters long, and replace line numbers. For many BASIC users of the time, that alone was a reason to switch.

Over the next five years ASIC went through four major versions, each with a dated notes file listing what was new. By 1993 it was published under the name 80/20 Software, still at the same Raleigh P.O. box. The last version, 5.00, is dated 7 August 1994.

Design Philosophy

The 5.00 manual describes ASIC’s design briefly:

ASIC is a single pass compiler written in C (Borland C Version 3.1). Each source statement is translated directly into machine code. ASIC compiles 100% in memory for maximum speed… ASIC generates a minimum of error checking code. This is because the ASIC philosophy stresses execution speed.

Most of ASIC’s quirks follow from that approach. Each statement becomes a short, fixed piece of machine code, so the language is limited to statements that are easy to translate that way:

  • One operation per assignment. The operator list gives A=B*C and A=B+C as examples. Version 5.00’s GW-BASIC converter shows the limit clearly: it turns X=Y*Z*Q into two statements that use a temporary variable, ASIC0@ = Y * Z and then X = ASIC0@ * Q.
  • No boolean operators. AND, OR and NOT don’t exist, and neither does the ^ exponent operator. A condition is a single comparison, and <=, <> and >= were only added in 5.00.
  • Parentheses and commas are ignored. The compatibility chapter says so directly. A = ABS (B(1)) is accepted, and so are A = ABS B 1 and A = ABS B 1,,,,,,))))). They are allowed only so that code written in GW-BASIC style still compiles.
  • Machine-level escape hatches. CODE inserts raw bytes into the output. INT86 (3.00) and GETREGS/SETREGS (5.00) give direct access to DOS and BIOS interrupts and CPU registers. PEEK, POKE, DEFSEG and VARPTR round out the set. For the things ASIC couldn’t do itself, it let you go down to the machine directly.
  • Size-conscious runtime. Long-integer and decimal support were compile-time options, off by default. The manual notes that long integers add about 475 bytes to a .COM file, and it tells you to turn the options off if you don’t need them.

Key Features

Data types

The type of a variable is fixed by the last character of its name, as in older BASICs:

SuffixTypeRangeAdded
(none)16-bit integer±32,7671.0
$string0–80 characters1.0
&32-bit long integer±2,147,483,6473.00
@“decimal” fixed point±999,999,999,999.999994.00

ASIC never had floating point. The @ decimal type (the manual calls it 64-bit) keeps exactly five decimal places and truncates anything beyond them. The 4.00 notes said it was “more accurate than the floating point type math used in other language products”, meaning it has no binary rounding errors, which suits money calculations. Arithmetic on mixed types follows its own rule, which the manual warns about. ASIC converts the operands to the type of the result before computing. So B=2*2.6 gives 4 in ASIC, where GW-BASIC would give 5.

Control flow

ASIC 1.0 had only GOTO, GOSUB/RETURN, FOR/NEXT and single-line IF ... THEN label:. ASIC 3.00 added block IF/THEN/ELSE/ENDIF and WHILE/WEND, each nestable 25 levels deep. FOR has no STEP and always counts up by 1. Unlike GW-BASIC, a FOR loop always runs its body at least once.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
REM ASIC 5.00
DIM TOTALS@(12)
FOR MONTH = 1 TO 12
    TOTALS@(MONTH) = 0@
NEXT MONTH
X = 5
IF X < 0 THEN
    PRINT "Negative"
ELSE
    PRINT "Non-negative"
ENDIF
END

Output formats

Up to version 3.x ASIC produced only .COM files, which are limited to one 64 KB segment for code, data and stack. ASIC 4.00 added two more formats:

  • EXE, allowing 64 KB of code plus 64 KB of data and a stack of up to 64 KB, built directly by ASIC without a linker, and
  • OBJ, to be linked with the MS-DOS LINK program. Through CALL SUB, this allowed assembly routines and, from 5.00, separately compiled ASIC subroutines to be combined into one program. The manual says up to about 500 KB of external object code can be linked this way.

The environment

From the start, ASIC’s main interface was its own editor with the compiler built in, with a separate command-line compiler for people who preferred their own editor. Version 2.0 added a source-level debugger with breakpoints, single-stepping, and viewing and changing variables. Version 3.00 added on-line help for keywords and menus. Version 4.00 added mouse support, file pickers and a DOS shell, and 5.00 added auto-indent and a pop-up ASCII chart.

Hardware access

ASIC was always close to the PC hardware. Version 2.0 added serial-port statements (OPENCOM, COMSTAT, SEND, RECEIVE), which made it practical for terminal-style programs, as well as port I/O with INP and OUT. Graphics began with CGA modes. Version 3.00 added EGA/VGA 16-colour modes and the VGA 320×200 256-colour mode, with PSET, PRESET and POINT taking coordinates in row/column order, the opposite of GW-BASIC.

Hello, World

1
2
PRINT "Hello, World!"
END

Compiled as a .COM file, this was the sort of program ASIC turned into an executable of a few hundred bytes. The 4.00 notes describe output “as small as a few hundred bytes”. No size comparison with other compilers appears in the ASIC documentation, but QuickBASIC programs of the time generally needed a runtime library (a separate BRUN module or one linked into the EXE), which made even trivial programs considerably larger.

Evolution

VersionDate (from the version notes or file dates)Headline changes
1.0©1989; oldest copies dated Feb–Mar 1990Editor with built-in compiler, command-line compiler, 40+ statements, integers and strings, COM output
2.025 Sep 1990Debugger, serial ports, READ/DATA, BLOAD/BSAVE, CODE, 60+ statements
3.00Summer 1991Long integers, block IF, WHILE/WEND, INT86, EGA/VGA, on-line help
3.01 / 3.02Sep / Dec 1991Point releases
4.0025 Mar 1993Decimal type, string arrays, EXE and OBJ output, CALL SUB, mouse
4.01c. mid-1994Point release
5.007 Aug 1994BAS2ASI converter, ASIC SUB/ENDSUB, <= <> >=, GETREGS/SETREGS, 90+ statements

The pricing changed along the way. Version 1.0 was free for personal use. Version 2.0 became $10 shareware, and 5.00 asked $20 plus $5 shipping, with a printed manual for another $10. The 5.00 README promises registered users half-price updates. No later update has been found.

The BAS2ASI converter in 5.00 shows how far ASIC remained from GW-BASIC. It splits compound expressions into temporary variables, turns single- and double-precision numbers into ASIC decimals, and marks what it can’t translate with a * so that the compiler stops on it. The converter made moving code to ASIC easier, but not automatic.

Current Relevance

ASIC has not changed since 1994, and 80/20 Software has left no trace since then. The compiler is a 16-bit DOS program. The last manual lists an IBM PC or 100% compatible with 425 KB of free memory as the requirement. Today it runs in DOS emulators and virtual machines rather than on modern operating systems directly. There is no official or community Docker image.

The software itself has survived well. Every major version, from 1.0 to 5.00, is preserved on shareware CD-ROMs from the 1990s. The 5.00 package is on the Internet Archive, and hobbyist pages have kept it available alongside the IBRARY and ASILIB libraries. Rosetta Code has a small ASIC category of about 30 tasks.

Why It Matters

Wikipedia’s article calls ASIC one of the few BASIC compilers that could legally be downloaded from a BBS. For a DOS user in the early 1990s, it was often the cheapest way to get from interpreted GW-BASIC to a real executable. Along the way it showed people some ideas that were still new to them: labels instead of line numbers, block structure, a source-level debugger, and linking against assembly code.

Its limits are also instructive. By keeping only what a single-pass compiler could translate one statement at a time, Visti produced a language that is still recognisably BASIC but is really a readable front end for fairly direct machine code. That explains both the tiny executables and the motto “It’s almost BASIC”.

Timeline

1989
David A. Visti of Raleigh, North Carolina, writes ASIC 1.0, a BASIC compiler for IBM PCs with its own full-screen editor, and puts "Copyright 1989" on it. Its manual calls it a subset of BASICA and GW-BASIC with "over 40 BASIC statements, integer and string variables, and integer arrays", with labels in place of line numbers. It is free for personal use; commercial users are asked for $10. The oldest copies that survive carry file dates of February and March 1990, so the exact release date is not known
1990
ASIC 2.0 (version notes dated 25 September 1990) becomes proper shareware with a $10 fee. It adds a source-level debugger with breakpoints and single-stepping, hot keys, serial-port statements (OPENCOM, COMSTAT, SEND, RECEIVE), READ/DATA/RESTORE, BLOAD/BSAVE, COMMAND$, DATE$, TIME$, TIMER, INP/OUT, directory statements, and CODE for inserting raw machine code. That brings it to more than 60 statements
1991
February: COMPUTE! (issue 126) puts ASIC on its PC disk. The magazine says the compiler makes "tiny, lightning-fast, stand-alone programs", but notes that it "can only calculate with whole numbers" and draws only in CGA resolutions
1991
ASIC 3.00 ships in the summer (its files are dated July and August 1991). It adds 32-bit long integers, block IF/THEN/ELSE/ENDIF, WHILE/WEND, hex and binary constants, INT86 for DOS and BIOS interrupts, random-access and append file modes, the usual string functions (LEFT$, RIGHT$, INSTR and others), EGA/VGA graphics modes, and on-line help for keywords and menus. Point releases 3.01 and 3.02 follow in September and December 1991
1993
ASIC 4.00 (version notes dated 25 March 1993), now published under the name 80/20 Software. It adds what the notes call "the most long awaited feature", a fixed-point Decimal type holding up to ±999,999,999,999.99999 with five decimal places. It also adds string arrays, EXE output as well as COM, OBJ output linked with the MS-DOS linker, CALL SUB for assembly-language routines, per-program project files, and mouse support in the editor. Version 4.01 follows (its files are dated June 1994)
1994
ASIC 5.00 (version notes dated 7 August 1994) is the last release. It adds BAS2ASI, a converter from GW-BASIC to ASIC; SUB/ENDSUB for separately compiled ASIC subroutines with up to 30 parameters; the <=, <> and >= operators; underscores in names; and FILELEN, GETDRIVE, GETREGS and SETREGS. The manual now counts "over 90 BASIC statements". Registration is $20 plus $5 shipping, and a printed manual costs $10 more

Notable Uses & Legacy

TIPI for the Atari Portfolio

Kent Peterson started TIPI, a small Forth-like stack language for palmtop computers, in December 1992, and wrote its interpreter in ASIC. He wrote in The Palmtop Paper that he chose it over QuickBasic and PowerBasic "because it produces such tiny EXEs", which mattered on a machine as small as the Portfolio

COMPUTE! magazine disk (February 1991)

COMPUTE! chose ASIC for its PC disk in issue 126. It presented ASIC as a cheap way for BASICA and GW-BASIC users to get line-number-free source and compiled COM files, instead of buying QuickBASIC or Power BASIC

IBRARY (Tom Hanlin)

A shareware library of assembly-language routines for ASIC programs by Tom Hanlin. It was linked in through the OBJ output and CALL SUB added in ASIC 4.00, and filled gaps the language itself could not

ASILIB (Douglas Herr)

A larger shareware assembly library for ASIC by Douglas Herr, still offered next to the compiler and IBRARY on hobbyist sites such as John Kiernan's ASIC page

Language Influence

Influenced By

BASICA GW-BASIC

Running Today

Run examples using the official Docker image:

docker pull
Last updated: