ASIC programming language


ASIC is a programming language, a BASIC dialect and shareware compiler for DOS systems. Written by Dave Visti of 80/20 Software, it achieved brief popularity in the 1990s as one of the few BASIC compilers legally available for download from BBSes. However, ASIC understood only a small subset of the BASIC language, with most versions having little or no support for logical operators, control structures, and floating-point arithmetic. These shortcomings are the reason for the software's tongue-in-cheek motto, "ASIC: It's almost BASIC!"
Notably, however, ASIC did feature a rudimentary integrated development environment and an RS-232 communications library for writing terminal and BBS software, as well not requiring line numbers. The last release of ASIC, version 5.00, was more compatible with GW-BASIC and offered a utility to convert GW-BASIC programs to ASIC syntax.
ASIC allows compiling to a DOS EXE file or COM file. The low overhead of the COM file format lets ASIC make one of the smallest compiled executables of the Hello world program, typically 360 bytes.

Features

ASIC is strongly impoverished in comparison with its contemporary BASICs.

Expressions

ASIC does not have the exponentiation operator ^.
ASIC does not have boolean operators.

Input and Output

PRINT's arguments must be a literal or variable. PRINT does not allow to use combined expressions as its arguments, nor does it allow to use strings concatenated with ; or +.
If a PRINT command ends with ; or ,, then the next PRINT command will resume in the position where this one left off, just as though its argument were appended to the argument of the current PRINT command.
; LOCATE row,column : Moves the text cursor to the position, where 0 ≤ column and 0 ≤ row. The position is the upper left corner.

Graphics

; PSET,color : Turns on the pixel of the color color at position, where 0 ≤column and 0 ≤ row. The position is the upper left corner.

Control Structures

Decisions

A boolean condition in IF may be only a comparison of numbers or strings, but not a comparison of combined expressions.

Looping

In FOR, after TO there may be only a number - literal or variable - but not a combined expression. The STEP clause does not exist in ASIC.

Utility BAS2ASI

This utility, serving to convert GW-BASIC programs to ASIC syntax, in the version 5.0 does not support some GW-BASIC features. Examples:
STEP in the for loop is not converted. The program

10 FOR i=10 TO 1 STEP -1
20 PRINT i
30 NEXT i

is converted into

REM 10 FOR i=10 TO 1 STEP -1
FOR I@ = 10 TO 1
ASIC0@ = -1 -1
I@ = I@ + ASIC0@

REM 20 PRINT i
PRINT I@

REM 30 NEXT i REM 30 NEXT i 3: Syntax error

The exponentiation operator ^ is not converted. The program

10 a=2
20 b=a^10
30 PRINT b

is converted into

REM 10 a=2
L10:
A@ = 2
REM 20 b=a^10
2: Syntax error
REM 30 PRINT b REM 30 PRINT b 3: Syntax error