| ASIC | |
|---|---|
Version 5.0 | |
| Original author | Dave Visti |
| Developer | 80/20 Software[1] |
| Initial release | before 1993[2] |
| Final release | 5.00 / 1994; 31 years ago (1994) |
| Written in | x86 assembly,Turbo C |
| Operating system | MS-DOS |
| Type | BASIC |
| License | Shareware |
ASIC is acompiler andintegrated development environment for a subset of theBASIC programming language. It was released forMS-DOS and compatible systems asshareware. Written by Dave Visti of 80/20 Software, it was one of the few BASIC compilers legally available fordownload fromBBSes. ASIC allows compiling to anEXE orCOM file. A COM file for theHello world program is 360 bytes.[3]
ASIC has little or no support forlogical operators,control structures,[4] andfloating-point arithmetic. These shortcomings resulted in the tongue-in-cheek motto, "ASIC: It's almost BASIC!"[5][3]
ASIC is strongly impoverished in comparison with its contemporary BASICs. The features of ASIC are selected to make a program be easily and directly compiled intomachine language. Thus, many language constructs of ASIC are equivalent to constructs ofassembly language.
Neither identifiers nor keywords arecase-sensitive.
AnyDIM statements, if specified, must precede all other statements exceptREM statements or blank lines.
AllDATA statements must be placed at the beginning of the program, before all other statement types, exceptDIM,REM statements, or blank lines.
ASIC does not have theexponentiation operator^.
ASIC does not haveboolean operators (AND,OR,NOT etc.).
The size ofarray specified in theDIM statement must be a literal constant. A singleDIM allows declaring only one array.
PRINT's arguments must be a literal or variable.PRINT does not allow combined expressions as its arguments, norstringsconcatenated with; or+.
If aPRINT command ends with; or,, then the nextPRINT command will resume in the position where this one left off, just as though its argument were appended to the argument of the currentPRINT command.
ThePRINT statement printsinteger values six characters wide. They are aligned to the right (no trailing spaces).
LOCATE row, columncolumn,row), where 0 ≤column and 0 ≤row. The position (0, 0) is the upper left corner.PSET (row,column),colorcolor at position (column,row), where 0 ≤column and 0 ≤row. The position (0, 0) is the upper left corner.A boolean condition may be only a comparison of numbers or strings, but not a comparison of combined expressions. A literal cannot be the left operand of comparison (e.g. can beX = 2, not2 = X).
AfterTHEN, there may be a sequence of statements delimited byELSE orENDIF. An example:
IFX<0THENPRINT"Negative"ELSEPRINT"Non-negative"ENDIF
Contrary to other BASICs, statements cannot be put betweenTHEN and the end of the line.
An if-statement can realize the conditional jump. In this case, afterTHEN there may be a label.
InFOR, afterTO there may be only a number - literal or variable - but not a combined expression. TheSTEP clause does not exist in ASIC.
In aGOTO statement, the label must be followed by a colon.
In aGOSUB statement, the label must be followed by a colon.
This utility, serving to convertGW-BASIC programs to ASIC syntax, in the version 5.0 does not support some GW-BASIC features. Examples:
STEP in thefor loop is not converted. The program
10FORi=10TO1STEP-120PRINTi30NEXTi
is converted into
REM10FORi=10TO1STEP-1FORI@=10TO1ASIC0@=-1-1I@=I@+ASIC0@REM20PRINTiPRINTI@REM30NEXTiREM30NEXTi3:Syntaxerror
Theexponentiation operator^ is not converted. The program
10a=220b=a^1030PRINTb
is converted into
REM10a=2L10:A@=2REM20b=a^102:SyntaxerrorREM30PRINTbREM30PRINTb3:Syntaxerror