This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]

FastBasic#

Daniel Serpell (dsmc), June/July 2017

Background#

FastBasic is one of the newest BASICs for the Atari 8-bit platform. It is a complete re-implementation of the BASIC system, using a built-in bytecode compiler rather than a tokenizing interpreter.

Typical BASICs use an interpreter that examines every line of code as the program runs. They do this because it minimizes the amount of RAM, only one line of code is actively worked on so the amount of temporary memory required is small. To improve speed and memory usage, most BASICS "tokenize" the lines, replacing keywords with "tokens", typically a single byte. Atari BASIC does this when the line is entered, so, for instance, when it sees a PRINT in the line of code, it replaces this with a 32 (decimal), making the source more compact and easier to process when its run.

In contrast, FastBasic works on an entirely different principle. When a line is parsed in FastBasic, it effectively compiles the entire line into tokens and then leaves them in memory. This way the line does not have to be repeatedly parsed, even from tokens, which makes it much faster to run. This does generally require more memory. FastBasic is not a compiler, although it works in a similar fashion; a compiler would convert the code into assembler, FastBasic converts it to an intermediate format that can then be converted back into source. In this fashion it sits between the interpreter and compiler worlds, a concept also used in the p-code systems.

FastBasic further improves performance with several other speed-ups. Among these is the inclusion of 16-bit and 8-bit arrays, which save memory and are faster to process, and integer variables. In cases where the parser can determine that the entire math function is integer, the expensive floating-point math routines found in most BASICs are replaced by the much simpler and faster bit-fiddling routines for much greater speed. FastBasic uses whatever floating-point library is found in the system, so when it does use FP routines it can be further sped up with a replacement math ROM like FashChip or the libraries in Atari++ and Altirra.

On top of this, FastBasic uses a new full-screen editor instead of the classic line-number based systems of the past. Line-number-based editing was invented because early video terminals could not scroll, a problem few (if any) of the home computers actually had, but by the time they arrived the line-number constant was too ingrained in MS BASIC for people to think outside that box. FastBasic does, and this makes editing far easier. Gone are the days of typing in long strings of numbers to delete lines or move code around, all of this is now done using the cursor controls, as it always should have been.

FastBasic is a truly unique approach to the BASIC language on the Atari, a must-see program for everyone. AtariWiki deeply thanks dmsc from AtariAge for the license to publish his FastBasic here. Thank you dmsc, your help is very much appreciated. :-)


Latest release#

Manual#

Pictures#

dmsc FastBasic - startscreen

dmsc FastBasic - 1st menu

References#

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
zip
fastbasic-1.zip 102.6 kB 1 19-Oct-2017 00:58 Roland B. Wassenberg fastbasic-1.zip
atr
fastbasic-v1.atr 133.1 kB 1 19-Oct-2017 00:57 Roland B. Wassenberg fastbasic-v1.atr
jpg
fastbasic1.jpg 60.0 kB 1 19-Oct-2017 00:57 Roland B. Wassenberg fastbasic1.jpg
jpg
fastbasic2.jpg 162.6 kB 1 19-Oct-2017 00:57 Roland B. Wassenberg fastbasic2.jpg
« This particular version was published on 07-May-2018 22:29 by Maury Markowitz.