Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

ASIC programming language

From Wikipedia, the free encyclopedia
Not to be confused withASIC.
ASIC
ASIC version 5.0
Version 5.0
Original authorDave Visti
Developer80/20 Software[1]
Initial releasebefore 1993[2]
Final release
5.00 / 1994; 31 years ago (1994)
Written inx86 assembly,Turbo C
Operating systemMS-DOS
TypeBASIC
LicenseShareware

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]

Features

[edit]

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.

Program elements

[edit]

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.

Expressions

[edit]

ASIC does not have theexponentiation operator^.

ASIC does not haveboolean operators (AND,OR,NOT etc.).

Arrays

[edit]

The size ofarray specified in theDIM statement must be a literal constant. A singleDIM allows declaring only one array.

Input and output

[edit]

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, 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

[edit]
PSET (row,column),color
Turns on the pixel of the colorcolor at position (column,row), where 0 ≤column and 0 ≤row. The position (0, 0) is the upper left corner.

Control Structures

[edit]

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).

Decisions

[edit]

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.

Looping

[edit]

InFOR, afterTO there may be only a number - literal or variable - but not a combined expression. TheSTEP clause does not exist in ASIC.

Branching

[edit]

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

Subroutines

[edit]

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

BAS2ASI

[edit]

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

References

[edit]
  1. ^IBRARY: Library for the ASIC compiler. Current Version: 3.1...David A. Visti, Catalog - Updated :February 1, 1996, Charon Software
  2. ^ASIC 4.0 - Download
  3. ^abASIC, Area code magic with AC Hunter (computer program) (On Disk) (evaluation), by George Campbell, COMPUTE! ISSUE 126 / FEBRUARY 1991 / PAGE 86
  4. ^In ASIC 3.01 (1991), the manual listsFOR...NEXT,WHILE...WEND andIF...ENDIF, but noswitch statements, and no functions or procedures withparameters orlocal variables, onlyGOSUB forsubroutines. The example programs useGoto instead of WHILE.
  5. ^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.Archived November 4, 2015, at theWayback Machine, Programmer's Corner: TIPI: A Small Programming Language for Small Comp, By Kent Peterson

External links

[edit]
Dialects of theBASIC programming language (list)
Classic
Microsoft
Texas Instruments
Hewlett-Packard
Locomotive Software
Microcomputers
Minicomputers
Time-sharing computers
Other
Extenders
Procedure-
oriented
Proprietary
Free and
open source
Withobject
extensions
Proprietary
Free and
open source
RAD
designers
Proprietary
Free and
open source
Defunct
Retrieved from "https://en.wikipedia.org/w/index.php?title=ASIC_programming_language&oldid=1306019559"
Category:
Hidden category:

[8]ページ先頭

©2009-2025 Movatter.jp