Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
ASIC programming language
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{confused|ASIC}} {{Infobox software | name = ASIC | logo = <!-- Image name is enough --> | logo alt = | screenshot = ASIC programming language.png | caption = Version 5.0 | screenshot alt = ASIC version 5.0 | collapsible = | author = Dave Visti | developer = 80/20 Software<ref>[http://files.mpoli.fi/unpacked/software/programm/pascal/paswiz21.zip/catalog.txt IBRARY: Library for the ASIC compiler. Current Version: 3.1...David A. Visti], Catalog - Updated :February 1, 1996, Charon Software</ref> | released = before 1993<!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --><ref>[http://cd.textfiles.com/psl/psl9312/PRGMMING/DOS/BASIC/ASIC.ZIP ASIC 4.0 - Download]</ref> | discontinued = yes | latest release version = 5.00 | latest release date = {{Start date and age|1994}} | latest preview version = | latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} --> | programming language = [[x86 assembly language|x86 assembly]], [[Borland Turbo C|Turbo C]] | operating system = [[MS-DOS]] | platform = | size = | language = | language count = <!-- Number only --> | language footnote = | genre = [[BASIC]] | license = [[Shareware]] | alexa = | website = <!--{{URL|example.org}}--> | standard = | AsOf = }} '''ASIC''' is a [[compiler]] and [[integrated development environment]] for a subset of the [[BASIC]] programming language. It was released for [[MS-DOS]] 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]] from [[Bulletin board system|BBS]]es. ASIC allows compiling to an [[EXE]] or [[COM file]]. A COM file for [[Hello world program]] is 360 bytes.<ref name=computereview126 /> ASIC has little or no support for [[logical operator]]s, [[control structure]]s,<ref>In ASIC 3.01 (1991), the manual lists [[For loop|FOR...NEXT]], [[Do while loop|WHILE...WEND]] and [[Conditional (computer programming)|IF...ENDIF]], but no [[switch statement]]s, and no functions or procedures with [[Parameter (computer programming)|parameters]] or [[local variable]]s, only [[GOSUB]] for [[subroutines]]. The example programs use [[Goto]] instead of WHILE.</ref> and [[floating-point arithmetic]]. These shortcomings resulted in the tongue-in-cheek motto, "ASIC: It's almost BASIC!"<ref>[http://www.palmtoppaper.com/ptphtml/19/pt190029.htm 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.] {{webarchive |url=https://web.archive.org/web/20151104080812/http://www.palmtoppaper.com/ptphtml/19/pt190029.htm |date=November 4, 2015 }}, Programmer's Corner: TIPI: A Small Programming Language for Small Comp, By Kent Peterson</ref><ref name=computereview126>[http://www.atarimagazines.com/compute/issue126/86_Area_code_magic_with.php ASIC], Area code magic with AC Hunter (computer program) (On Disk) (evaluation), by George Campbell, COMPUTE! ISSUE 126 / FEBRUARY 1991 / PAGE 86</ref> == 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]]. === Program elements === Neither indetifiers, nor keywords are [[case-sensitive]]. Any <code>DIM</code> statements, if specified, must precede all other statements except <code>REM</code> statements or blank lines. All <code>DATA</code> statements must be placed at the beginning of the program, before all other statement types, except <code>DIM</code>, <code>REM</code> statements, or blank lines). ==== Expressions ==== ASIC does not have the [[exponentiation]] operator <code>^</code>. ASIC does not have [[Boolean expression|boolean]] operators (<code>AND</code>, <code>OR</code>, <code>NOT</code> etc.). === Arrays === The size of [[Array (data structure)|array]] specified in the <code>DIM</code> statement must be a literal constant. A single <code>DIM</code> allows to declare only one array. === Input and output === <code>PRINT</code>'s arguments must be a literal or variable. <code>PRINT</code> does not allow to use combined expressions as its arguments, nor does it allow to use [[String (computer science)|strings]] [[concatenation|concatenated]] with <code>;</code> or <code>+</code>. If a <code>PRINT</code> command ends with <code>;</code> or <code>,</code>, then the next <code>PRINT</code> command will resume in the position where this one left off, just as though its argument were appended to the argument of the current <code>PRINT</code> command. The <code>PRINT</code> statement prints [[Integer (computer science)|integer]] values six characters wide. They are aligned to the right (no trailing spaces). ; <code>LOCATE row, column </code> : Moves the text cursor to the position (<code>column</code>, <code>row</code>), where 0 β€ <code>column</code> and 0 β€ <code>row</code>. The position (0, 0) is the upper left corner. === Graphics === ; <code>PSET (row,column),color</code> : Turns on the pixel of the color <code>color</code> at position (<code>column</code>, <code>row</code>), where 0 β€<code>column</code> and 0 β€ <code>row</code>. 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 <code>X = 2</code>, not <code>2 = X</code>). ==== Decisions ==== After <code>THEN</code>, there may be a sequence of statements delimited by <code>ELSE</code> or <code>ENDIF</code>. An example: <syntaxhighlight lang="basic"> IF X < 0 THEN PRINT "Negative" ELSE PRINT "Non-negative" ENDIF </syntaxhighlight> Contrary to other BASICs, statements cannot be put between <code>THEN</code> and the end of the line. An if-statement can realize the conditional jump. In this case, after <code>THEN</code> there may be a label. ==== Looping ==== In <code>FOR</code>, after <code>TO</code> there may be only a number - literal or variable - but not a combined expression. The <code>STEP</code> clause does not exist in ASIC. ==== Branching ==== In a <code>GOTO</code> statement, the label must be followed by a colon. ==== Subroutines ==== In a <code>GOSUB</code> 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: <code>STEP</code> in the [[for loop]] is not converted. The program <syntaxhighlight lang="basic"> 10 FOR i=10 TO 1 STEP -1 20 PRINT i 30 NEXT i </syntaxhighlight> is converted into <syntaxhighlight lang="QBasic"> 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 </syntaxhighlight> The [[exponentiation]] operator <code>^</code> is not converted. The program <syntaxhighlight lang="basic"> 10 a=2 20 b=a^10 30 PRINT b </syntaxhighlight> is converted into <syntaxhighlight lang="QBasic"> 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 </syntaxhighlight> ==References== {{reflist}} ==External links== <!--*Simtelnet archive for ASIC 5.0 [ftp://ftp.simtel.net/pub/simtelnet/msdos/basic/asic500.zip]{{dead link|date=May 2025|bot=medic}}{{cbignore|bot=medic}} Dead link --> *[http://publish.uwo.ca/~jkiernan/asicinfo.htm ASIC 5.00 + Libraries + Linker] * [http://rosettacode.org/wiki/Category:ASIC Category:ASIC] Tasks implemented in ASIC on [http://rosettacode.org rosettacode.org] {{BASIC}} [[Category:BASIC programming language family]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:BASIC
(
edit
)
Template:Confused
(
edit
)
Template:Infobox
(
edit
)
Template:Infobox software
(
edit
)
Template:Main other
(
edit
)
Template:Reflist
(
edit
)
Template:Template other
(
edit
)
Template:Webarchive
(
edit
)