HOME

TheInfoList



OR:

ASIC is a
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
and
integrated development environment An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
for a subset of the
BASIC Basic or BASIC may refer to: Science and technology * BASIC, a computer programming language * Basic (chemistry), having the properties of a base * Basic access authentication, in HTTP Entertainment * Basic (film), ''Basic'' (film), a 2003 film ...
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 op ...
and compatible systems as
shareware Shareware is a type of proprietary software that is initially shared by the owner for trial use at little or no cost. Often the software has limited functionality or incomplete documentation until the user sends payment to the software developer. ...
. 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 systems. This contrasts with uploading, where data is ''sent to'' a remote ...
from BBSes. ASIC allows compiling to an
EXE Exe or EXE may refer to: * .exe, a file extension * exe., abbreviation for Executive (disambiguation)#Role, title, or function, executive Places * River Exe, in England * Exe Estuary, in England * Exe Island, in Exeter, England Transportation a ...
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 (sim ...
. 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 Cou ...
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. Connectives can be used to connect logical formulas. For instance in the syntax of propositional logic, the ...
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 '' ...
s, and
floating-point arithmetic In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a ''significand'' (a Sign (mathematics), signed sequence of a fixed number of digits in some Radix, base) multiplied by an integer power of that ba ...
. 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 In computer programming, machine code is computer code consisting of machine language instructions, which are used to control a computer's central processing unit (CPU). For conventional binary computers, machine code is the binaryOn nonb ...
. Thus, many language constructs of ASIC are equivalent to constructs of
assembly language In computing, assembly language (alternatively assembler language or symbolic machine code), often referred to simply as assembly and commonly abbreviated as ASM or asm, is any low-level programming language with a very strong correspondence bet ...
.


Program elements

Neither indetifiers, nor keywords are
case-sensitive In computers, case sensitivity defines whether uppercase and lowercase letters are treated as distinct (case-sensitive) or equivalent (case-insensitive). For instance, when users interested in learning about dogs search an e-book, "dog" and "Dog ...
. Any DIM statements, if specified, must precede all other statements except REM statements or blank lines. All DATA statements must be placed at the beginning of the program, before all other statement types, except DIM, REM statements, or blank lines).


Expressions

ASIC does not have the
exponentiation In mathematics, exponentiation, denoted , is an operation (mathematics), operation involving two numbers: the ''base'', , and the ''exponent'' or ''power'', . When is a positive integer, exponentiation corresponds to repeated multiplication ...
operator ^. ASIC does not have boolean operators (AND, OR, NOT etc.).


Arrays

The size of
array An array is a systematic arrangement of similar objects, usually in rows and columns. Things called an array include: {{TOC right Music * In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
specified in the DIM statement must be a literal constant. A single DIM allows to declare only one array.


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. The PRINT statement prints
integer An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
values six characters wide. They are aligned to the right (no trailing spaces). ; 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

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 be X = 2, not 2 = X).


Decisions

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 GW-BASIC is a dialect of the BASIC programming language developed by Microsoft from IBM BASICA. Functionally identical to BASICA, its BASIC interpreter is a fully self-contained executable and does not need the Cassette BASIC ROM found in the ori ...
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 (computer science), statement for specifying iteration. Specifically, a for-loop functions by running a section of code repeatedly until a certain condition has been satisfi ...
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 In mathematics, exponentiation, denoted , is an operation (mathematics), operation involving two numbers: the ''base'', , and the ''exponent'' or ''power'', . When is a positive integer, exponentiation corresponds to repeated multiplication ...
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