Amiga Basic
Template:Short description Template:Use mdy dates {{#invoke:Infobox|infobox}}Template:Template other{{#invoke:Check for unknown parameters | check | showblankpositional=1 | unknown = Template:Main other | preview = Page using Template:Infobox software with unknown parameter "_VALUE_"|ignoreblank=y | AsOf | author | background | bodystyle | caption | collapsetext | collapsible | developer | discontinued | engine | engines | genre | included with | language | language count | language footnote | latest preview date | latest preview version | latest release date | latest release version | latest_preview_date | latest_preview_version | latest_release_date | latest_release_version | licence | license | logo | logo alt | logo caption | logo upright | logo size | logo title | logo_alt | logo_caption | logo_upright | logo_size | logo_title | middleware | module | name | operating system | operating_system | other_names | platform | programming language | programming_language | released | replaced_by | replaces | repo | screenshot | screenshot alt | screenshot upright | screenshot size | screenshot title | screenshot_alt | screenshot_upright | screenshot_size | screenshot_title | service_name | size | standard | title | ver layout | website | qid }}Template:Main other
Amiga Basic is an interpreted implementation of the BASIC programming language for the Amiga. It was designed and written by Microsoft. Amiga Basic shipped with AmigaOS versions 1.1 to 1.3. It succeeded MetaComCo's ABasiC included in AmigaOS 1.0 and 1.1 and was superseded by ARexx, a REXX-style scripting language, from AmigaOS version 2.0 onwards.
History and descriptionEdit
Amiga Basic provided not only the common BASIC language, but also attempted to provide an easy-to-use API for the Amiga's unique graphics and sound capabilities. OBJECT
commands, for example, made it easy to create moving objects – sprites and bobs that could be drawn with an external drawing program, Object editor, that was supplied with AmigaBASIC. An unusual feature of the language is that it theoretically allowed the calling of handwritten assembly language subprograms; however, this feature never worked because of a bug that failed to align the assembly language instructions correctly on a word boundary, as required by the Amiga's native MC68000 processor.Template:Citation needed
Compute!, a popular computer magazine published while Amiga Basic was still being shipped, included many AmigaBASIC type-in programs in their articles. These were typically implementations of simple programs such as rudimentary games, system and file utilities and desk accessories such as analog clocks and address books.
Amiga Basic itself was rendered obsolete because of incompatibilities with AmigaOS 2.0 and the hardware successors to the Motorola 68000 CPU. Some incompatibilities were due to the disregard of programming guidelines set forth by Commodore.Template:Citation needed However, there were a number of third-party compiled BASIC languages released for the Amiga that could compile Amiga Basic programs with minimal changes, like A/C BASIC or Cursor (see below). Some of these compiled BASICs continued to work with AmigaOS 2.0, and as they were compiled rather than interpreted, they generally ran much faster than the original.
Although Amiga Basic was superseded by ARexx in AmigaOS 2.0, the two languages had very different functions and capabilities. Hobbyist programmers had changed by the time of AmigaOS 2.0's release and were more likely to be interested in scripting existing third party applications than in writing new programs entirely from scratch. ARexx was seen as better fitting their needs than BASIC.
Along with Microsoft's very similar BASIC for the Macintosh, Amiga Basic was the first BASIC interpreter from Microsoft to not require line numbers,<ref>{{#invoke:citation/CS1|citation
|CitationClass=web
}}</ref><ref>{{#invoke:citation/CS1|citation
|CitationClass=web
}}</ref> adopting instead a top-down approach to executing the lines of code, and labels to indicate the GOTO
instruction where to jump. However programs that contained line numbers were able to run; the line numbers were simply treated as labels for the purpose of flow control. It was also the first Microsoft interpreted language capable of calling OS functions and dynamic libraries through the command LIBRARY
. For example: LIBRARY Graphics.library
command invokes the standard Amiga Graphics.library from which to call functions.
Hello World in Amiga BasicEdit
<syntaxhighlight lang="qbasic"> ' Hello World for Amiga Basic PRINT "Hello world!" </syntaxhighlight> You can go one better by adding the following line: <syntaxhighlight lang="qbasic"> SAY TRANSLATE$ ("HELLO WORLD") </syntaxhighlight> The Amiga will then say "Hello world" using speech synthesis in addition to displaying it on screen.
ReferencesEdit
- Notes
- Amiga Basic by Paul Fellows, published by Dabs Press, December 1992, Template:ISBN
- Amiga Basic by Henning Horst Rainer, published by Jackson Libri, 1989, Template:ISBN
- Amiga Basic Inside and Out, by Christian Spanik and Hannes Rugheimer published by Abacus Books (Abacus Software Inc.), Jan 1988, Template:ISBN
- Elementary Amiga BASIC by C. Regena, published by Compute! (Compute! Publications Inc., U.S.), April 1987, Template:ISBN
- Advanced Amiga basic by ~ Tom R. Halfhill and Charles Brannon, published by Compute! (Compute Library Selection) July 1986, Template:ISBN
External linksEdit
- Manual
- COMPUTE!, August 1987, pg 89 Fractal Mountains For Amiga, Source code for a fractal mountain generator.
- COMPUTE!, October 1987, pg 71 A Button Command, Source code for enhanced buttons, such as radio-style buttons.
- COMPUTE!, November 1987, pg 86 Masked Input For The Amiga, Source code for a masked text input box.
- Amiga Coding! Template:Webarchive