ASIC programming language
   HOME

TheInfoList



OR:

ASIC is a compiler and
integrated development environment An integrated development environment (IDE) is a software application that provides comprehensive facilities to computer programmers for software development. An IDE normally consists of at least a source code editor, build automation tools ...
for a subset of the BASIC programming language. It was released for
MS-DOS MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few ope ...
and compatible systems as shareware. Written by Dave Visti of 80/20 Software, it was one of the few BASIC compilers legally available for
download In computer networks, download means to ''receive'' data from a remote system, typically a server such as a web server, an FTP server, an email server, or other similar system. This contrasts with uploading, where data is ''sent to'' a remote ...
from
BBS BBS may refer to: Ammunition * BBs, BB gun metal bullets * BBs, airsoft gun plastic pellets Computing and gaming * Bulletin board system, a computer server users dial into via dial-up or telnet; precursor to the Internet * BIOS Boot Specificat ...
es. ASIC allows compiling to an
EXE Exe or EXE may refer to: * .exe, a file extension * exe., abbreviation for executive Places * River Exe, in England * Exe Estuary, in England * Exe Island, in Exeter, England Transportation and vehicles * Exe (locomotive), a British locomotive ...
or
COM file A COM file is a type of simple executable file. On the Digital Equipment Corporation (DEC) VAX operating systems of the 1970s, .COM was used as a filename extension for text files containing commands to be issued to the operating system (simi ...
. A COM file for
Hello world program ''Hello'' is a salutation or greeting in the English language. It is first attested in writing from 1826. Early uses ''Hello'', with that spelling, was used in publications in the U.S. as early as the 18 October 1826 edition of the '' Norwich ...
is 360 bytes. ASIC has little or no support for
logical operator In logic, a logical connective (also called a logical operator, sentential connective, or sentential operator) is a logical constant. They can be used to connect logical formulas. For instance in the syntax of propositional logic, the binary ...
s,
control structure In computer science, control flow (or flow of control) is the order in which individual statements, instructions or function calls of an imperative program are executed or evaluated. The emphasis on explicit control flow distinguishes an ''imp ...
s, and floating-point arithmetic. These shortcomings resulted in the tongue-in-cheek motto, "ASIC: It's almost BASIC!"ASIC is the work of David Visti and his compiler takes code that is "almost BASIC" and compiles it down to a very small executable.
, Programmer's Corner: TIPI: A Small Programming Language for Small Comp, By Kent Peterson
ASIC
Area code magic with AC Hunter (computer program) (On Disk) (evaluation), by George Campbell, COMPUTE! ISSUE 126 / FEBRUARY 1991 / PAGE 86


Features

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 into machine language. Thus, many language constructs of ASIC are equivalent to constructs of assembly language.


Expressions

ASIC does not have the
exponentiation Exponentiation is a mathematical operation, written as , involving two numbers, the '' base'' and the ''exponent'' or ''power'' , and pronounced as " (raised) to the (power of) ". When is a positive integer, exponentiation corresponds to r ...
operator ^. ASIC does not have boolean operators (AND, OR, NOT etc.).


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 In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In certain formalisations of concatenat ...
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 (column, row), where 0 ≤ column and 0 ≤ row. The position (0, 0) is the upper left corner.


Graphics

; PSET (row,column),color : Turns on the pixel of the color color at position (column, row), where 0 ≤column and 0 ≤ row. The position (0, 0) 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. After THEN, there may be a sequence of statements delimited by ELSE or ENDIF. An example: IF X < 0 THEN PRINT "Negative" ELSE PRINT "Non-negative" ENDIF Contrary to other BASICs, statements cannot be put between THEN and the end of the line. An if-statement can realize the conditional jump. In this case, after THEN there may be a label.


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.


Branching

In a GOTO statement, the label must be followed by a colon.


Subroutines

In a GOSUB statement, the label must be followed by a colon.


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 In computer science a for-loop or for loop is a control flow statement for specifying iteration. Specifically, a for loop functions by running a section of code repeatedly until a certain condition has been satisfied. For-loops have two par ...
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 Exponentiation is a mathematical operation, written as , involving two numbers, the '' base'' and the ''exponent'' or ''power'' , and pronounced as " (raised) to the (power of) ". When is a positive integer, exponentiation corresponds to r ...
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


References


External links


ASIC 5.00 + Libraries + Linker

ASIC
Tasks implemented in ASIC o
rosettacode.org
{{BASIC BASIC programming language family