Advan BASIC
- Medium
- Disk
- Year
- 1985
- Publisher
- Advan Language Designs (Baldwin, Kansas)
- Type
- Language
- Category
- Compiled BASIC with built-in player/missile, DLI and music commands
- Developer
- William Graziano
- Language
- 6502 machine language
- Requirements
- Atari 800XL/XE, or 48K 400/800 (which must reload part of the language after large programs); one disk drive. Uses its own DOS 2.5-compatible DOS.
- Tags
- basic, compiler, p-code, player-missile, dli, structured, advan-language-designs, disk
Overview
Advan BASIC is not a compiler for Atari BASIC programs. It is a separate, much richer BASIC that happens to compile everything it runs. William Graziano's small Kansas company, Advan Language Designs, sold it on disk for $49.95 when Antic reviewed it in April 1986, and later for $39.95. Charles Cherry's review opened with "This is important" and called it "a spectacular new language": no language before it had given BASIC programmers "such an effortless command of the special sound and graphics capabilities of the Atari". ANALOG praised it in August 1986 as well, and in Antic's June 1987 round-up of six 8-bit BASICs it was the one recommended for high-speed arcade games.
Programming in Advan
Editing feels like Atari BASIC: line numbers and the same screen editor. But each line is syntax-checked as you enter it, and errors are reported in English. Typing RUN compiles the whole program to pseudo-code (the screen goes blank for a moment) and then runs it. A runtime error drops you back to the editor with the offending line listed. Long programs can be compiled to disk instead.
Highlights of the language:
- Integers and reals. A
%suffix marks an integer, as inT%or105%. Integers are three or more times faster and take a third of the memory, and the two types mix freely in expressions. - Strings like Microsoft BASIC. String arrays, no need to DIM strings,
+concatenation, LEFT, RIGHT, MID, INSTR, STR$, VAL and byte/substring search functions. Arrays can have up to 64 dimensions. - Structured control. IF-THEN-ELSE, a multi-line IF-DO-ELSE-ENDIF, CASE, WHILE-WEND, REPEAT-UNTIL, WAIT, user functions and named subroutines with up to four arguments, and indentable lines.
- Player/missile graphics without POKEs. GRAPHICS can enable P/M and a custom character set. PDISPLAY defines a player from binary digits written into the program. Players can be given a speed and direction and an animation rate, after which the system moves and animates them by itself while the program gets on with other work. COLL reports collisions.
- Display list interrupts with SETINT: name the register, the value and the scan line, for up to eight interrupts that can be changed at will.
- Background music. ASOUND points a voice at a line holding the tune, SCONTROL starts and stops voices, and songs play from the vertical-blank interrupt.
- A built-in assembler. 6502 mnemonics can appear in BASIC lines, use line numbers as branch targets and reach BASIC variables directly.
- DOS commands (DIR, KILL, RENAME, LOCK, UNLOCK) from BASIC, a 130XE RAM disk, PRINT USING, and SETCOLOR with separate hue and luminance values.
Even timing was simplified. Where Atari BASIC needs three POKEs and a PEEK formula, Advan has:
10 RTIME
20 REM the benchmark goes here
30 SECONDS=TIME/60
Speed
Cherry's Sieve of Eratosthenes took 13.8 seconds in Advan, 9 seconds compiled with the MMG compiler and 67 seconds in BASIC XL. Advan's own flyer timed a 30,000-step FOR loop at 161 seconds in Atari BASIC and about 32 seconds in Advan (15 with integers). The separate Advan Optimizing Compiler ($24.95) compiles sections between FAST and FAST END statements for speed and the rest for size, with its own fast floating-point routines. In Antic's June 1987 Sieve test it ran about four times faster than MMG, 20 times faster than compiled Turbo-BASIC XL, 120 times faster than Atari BASIC and at more than half the speed of Action!.
Limitations
Advan is not compatible with Atari BASIC. Even untokenised listings differ, so a conversion program was added to the package, though some programs still need rewriting. The language takes about 17K. On XL/XE machines 14K of that moves under the OS ROM, but on a 400/800 that area is overwritten, so part of the language must be reloaded after big or graphics-heavy programs. It runs only with its own DOS 2.5-compatible DOS, which annoyed owners of double-density and high-speed drives and still bothers modern users who prefer SpartaDOS. Compiled programs need a roughly 3K runtime. At first the copy protection stopped you copying it, but the optional Utility Programs package ($29.95) could format disks with the execution module so you could give away or sell your programs. It also added a cross-referencer, a renumberer and matrix, base-conversion and DOS subroutines. A Screen Design package ($29.95) drew custom mixed-mode displays with fine scrolling. All four products were sold together for $99.95.
Using it today
The authors later released unprotected disk images, and Advan has a small modern following. Hobbyists on AtariAge have used it for player/missile games, ported starfield routines into it and run them through the optimizing compiler. Run it in Altirra or atari800 as an XL/XE with BASIC disabled, and boot the Advan disk itself rather than your usual DOS. Keep a separate work disk in the Advan DOS format. Collision checks follow the GTIA registers: COLL returns a bit for each other player hit, so test for a non-zero result and mask with AND.
Credits
- Picture: The Advan BASIC tutorial and reference manual. — Packaging scan from AtariMania (advan_basic_compiler_i.jpg) (© Advan Language Designs — used for identification/commentary)
- Antic Vol. 4 No. 12 (April 1986) — Advan Compiler BASIC: Powerful New Atari Language, Charles Cherry (magazine PDF text) — Internet Archive, 1986
- Antic Vol. 6 No. 2 (June 1987) — BASIC Bonanza / Advan Optimizer review, Charles Cherry (magazine PDF text) — Internet Archive, 1987
- Advan BASIC flyer and order form (Advan Language Designs) — Internet Archive — Internet Archive
- AtariMania — Advan BASIC Compiler — Packaging scan from AtariMania (advan_basic_compiler_i.jpg) (© Advan Language Designs — used for identification/commentary)
- AtariMania — Optimizing Compiler for Advan Language Designs Basic Compiler — AtariMania
- Antic Vol. 6 No. 9 — Shopper's Guide (Advan BASIC $39.95) — AtariMagazines.com (Kevin Savetz)
- Antic Vol. 7 No. 1 — I/O Board (scheduling system written in Advan BASIC) — AtariMagazines.com (Kevin Savetz)
- AtariAge forum — Advan BASIC collision detection (COLL) — AtariAge forum members
- AtariAge forum — starfield in Advan BASIC with the optimizing compiler — AtariAge forum members
- AtariAge forum — FastBasic thread (Advan tied to DOS 2.x) — AtariAge forum members
