Turbo-BASIC XL
- Year
- 1985
- Publisher
- Happy Computer (Markt & Technik), 1. Atari Sonderheft
- Type
- Language
- Category
- Extended BASIC interpreter + compiler (disk, XL/XE)
- Developer
- Frank Ostrowski
- Language
- 6502 machine language
- Requirements
- Atari XL/XE with 64K (uses RAM under the OS ROM); disk drive; Atari BASIC disabled (hold OPTION on boot)
Overview
Turbo-BASIC XL is probably the most popular replacement BASIC for the Atari XL and XE. It was written by Frank Ostrowski, who later wrote GFA BASIC for the Atari ST. It was first published as a type-in and disk program in the West German magazine Happy Computer: It appeared in the magazine's first Atari special issue (1. Atari Sonderheft), dated December 1985. It soon spread through user groups and bulletin boards as free software. Three things made it popular. It loads and runs ordinary Atari BASIC programs, it runs them about three times faster, and it came with a compiler that speeds compiled programs up much further.
Features
Ron Fetzer's expanded English documentation, based on a translation by Dave and Laura Yearke of the Western New York Atari Users Group, counts 42 extra commands and 22 extra functions over Atari BASIC. It gives 34,021 bytes of free RAM, 1,747 more than Atari BASIC, because the interpreter runs from RAM under the XL/XE operating system ROM. Up to 256 variable names are allowed. The highlights are:
- Structured programming:
REPEAT … UNTIL,WHILE … WEND,DO … LOOP(all left withEXIT), multi-lineIF … ELSE … ENDIF, and named procedures withPROC name … ENDPROC, called withEXEC name. - Labels instead of line numbers:
# NAMEmarks a line, andGO# NAME,RESTORE #NAMEandTRAP #NAMEjump to it. Names may contain underscores, such asSTART_PROG. - DOS from BASIC:
DIR,DELETE,RENAME,LOCK,UNLOCK,BLOADandBRUN, with wildcards. There is no separate Turbo DOS: typingDOSdrops you to DOS 2.5. - Graphics and sound:
CIRCLE,PAINT,FCOLOR/FILLTO,TEXTfor text on graphics screens, andDSOUNDfor 16-bit sound channels. - Memory and I/O:
DPOKE/DPEEK, a fastMOVE(and-MOVE), andBGET/BPUT,%GET/%PUTfor block and number I/O. - Maths and strings:
DIV,MOD,FRAC,TRUNC,HEX$,DEC,$nnnnhex constants, the bitwise operators&,!andEXOR,INSTR,INKEY$,TIME/TIME$, and the handy constants%0–%3. - Editing aids:
RENUM,DEL,DUMPto list variables,TRACE,PAUSE,CLS, and--to print a separator line in listings.
The documentation's own procedure example, slightly condensed:
10 CLS
20 EXEC TOO_HARD
30 EXEC JUST_RIGHT
40 END
50 --
60 PROC TOO_HARD
70 ? "THIS BED IS TOO HARD!"
80 ENDPROC
90 --
100 PROC JUST_RIGHT
110 ? "THIS ONE IS JUST RIGHT!"
120 ENDPROC
Turbo-BASIC keeps Atari BASIC's single-dimension strings and allows only numeric arrays (one or two dimensions). A disk containing a program called AUTORUN.BAS runs it automatically when Turbo-BASIC boots.
Behind the scenes
The language reached North America through user groups. In October 1988 Antic's New Products column listed Ron Fetzer's Complete Turbo-BASIC Kit, a $5 disk containing the interpreter, a 37-page documentation file, tutorials on arrays and sorting, and two utilities. The column called Turbo BASIC "the powerful public domain programming language". The conventional file extensions are .TUR for saved Turbo-BASIC programs and .CTB for compiled ones.
The language has kept being worked on. In 2014 AtariAge member MrFish published a cleaned-up PDF of the expanded documentation with a memory map and compiler instructions. In the same thread readers corrected the old documentation's claim that Ostrowski came "from Holland". In 2017 the FastBasic author dmsc posted a full MADS disassembly of version 1.5 that rebuilds the original binary byte for byte, which made patches and bug fixes practical. Cartridge versions exist as well. A 2020 thread compares a Video 61 cartridge, an S/XEGS RAM-cart build and a SIC! cartridge image that runs on modern flash carts such as the Ultimate Cart.
Using it today
- Booting: put the Turbo-BASIC disk in drive 1 and switch on an XL/XE with OPTION held down so the built-in BASIC is disabled. On a disk with DOS 2.5 you can also rename
TURBOBAS.COMtoAUTORUN.SYS. - Emulators: use an XL/XE configuration with 64K and BASIC switched off, and boot the ATR. Turbo-BASIC is still a favourite in modern BASIC 10-liner competitions.
- DOS choice: Turbo-BASIC needs the RAM under the OS, so it conflicts with DOS versions that put their own code there. Users of the time remember SpartaDOS setups causing exactly that conflict. Atari DOS 2.5, MyDOS, or small DOSes such as LiteDOS leave the most room. LiteDOS, for instance, frees 8K more memory under Turbo-BASIC XL.
Credits
- Picture: Turbo-BASIC XL 1.5 title screen. — Screenshot from AtariMania (Turbo-BASIC XL)
- AtariMania — Turbo-BASIC XL — Screenshot from AtariMania (Turbo-BASIC XL)
- Antic Vol. 7 No. 6 (Oct 1988) — New Products: Turbo BASIC Kit — AtariMagazines.com (Kevin Savetz), 1988
- AtariAge — Turbo-BASIC XL: Expanded Documentation (2014) — AtariAge forum members, 2014
- AtariAge — TurboBasic XL v1.5 MADS source (disassembly) (2017) — AtariAge forum members, 2017
- AtariAge — Cartridge Version(s) of Turbo Basic XL (2020) — AtariAge forum members, 2020
- comp.sys.atari.8bit FAQ (Michael Current) — file extensions, LiteDOS note — Michael Current (comp.sys.atari.8bit FAQ)
