This article needs additional citations for verification .(April 2020) |
Original author(s) | Frank Ostrowski |
---|---|
Initial release | December 1985 |
Written in | 6502 assembly |
Platform | Atari 8-bit |
Turbo-BASIC XL is an enhanced version of the BASIC programming language for Atari 8-bit computers. It is a compatible superset of the Atari BASIC that shipped with the Atari 8-bit systems. Turbo-Basic XL was developed by Frank Ostrowski and published in the December 1985 issue of German computer magazine Happy Computer. A version for the 400/800 models was released shortly after as Frost Basic 1.4. Several modified versions working with different DOS systems have been released by other authors.
Turbo-Basic XL greatly improves execution over Atari BASIC. An Atari BASIC program loaded into Turbo-BASIC, with no changes made, would generally run about three times as fast. A Turbo-Basic XL compiler created binary executables, further speeding up program performance to about ten times faster than Atari BASIC. Turbo-Basic XL also includes an expanded editor, support for named procedures, WHILE...ENDWHILE
and similar block constructs, and added access to the underlying hardware, which, among other things, allowed operation of attached floppy drives without exiting to DOS.
Ostrowski soon got a job with GFA Systemtechnik GmbH (at the time known as Integral Hydraulik) where he adapted Turbo-Basic XL into GFA BASIC for the Atari ST, which became one of the more popular BASICs on that platform.
Since their release in 1979, the 8-bit family normally shipped with a version of Atari BASIC on a ROM cartridge, or built into the internal ROMs on later machines. This version of BASIC had a number of custom commands that allowed partial access to the system's advanced features like graphics and sound. It was notoriously slow, appearing at the very bottom of the list of microcomputer BASICs in the original version of David Ahl's Creative Computing benchmark. [1]
The poor performance of the official Atari BASIC led to a market for 3rd party BASIC interpreters with better performance or more commands. Among them was an official port of Microsoft BASIC sold by Atari, several improved versions released by Optimized Systems Software, who had written the original Atari BASIC under contract, and many others. There were also several Atari BASIC compilers from a variety of vendors.
Turbo-Basic XL was a late entry to this list, first published in December 1985 as type-in program. It was unique in that it came in both interpreter and compiler versions. It included code to take advantage of the expanded memory available on the XL series machines, and later XE series. This meant that it could not run on the original 400/800 systems, which led Ostrowski to make a port known as Frost BASIC (short for "Frank Ostrowski") that was tied to Atari DOS 2.0.
The internal disk-related commands were tied to particular versions of DOS. A number of ports to different versions of DOS became available.
This section possibly contains original research .(May 2021) |
The most notable feature of Turbo-Basic was its dramatically improved speed; an unmodified Atari BASIC program loaded into Turbo-Basic would normally run three to five times faster, and the speed advantage improved as the program size grew. This was due largely to a series of improvements on well-known problems in the original Atari BASIC code.
In most BASICs, GOTO was handled by reading the associated line number and then searching through the program for that line of code. In MS-derived BASICs the line numbers were stored as 16-bit integers and numeric constants in the code in their original ASCII format. When a line like GOTO 1000
was encountered, the interpreter would use special code to convert the "1000" into 16-bit format and then search for it. Atari BASIC worked differently, converting all numeric constants to a 6-byte floating-point format when the line was entered. This meant the "1000" was no longer in ASCII format and had to be converted from floating-point to integer format. The code for doing so was not well optimized and could take over 2 ms (average 1-1.5 ms).
FOR...NEXT loops are another common construct in BASIC programs. In most BASICs, when the FOR portion was encountered at runtime, its memory location in the source code was pushed onto a call stack so it could easily return to that location when the associated NEXT was encountered. For unknown reasons, Atari BASIC pushed the line number of the FOR onto the stack and then looked through the entire code for that line when it encountered the NEXT. For programs that did significant looping, which is often the case in BASIC, this could cause a dramatic performance hit.
Turbo-Basic implemented its FOR loops using the address, as was the case in MS BASIC, and thus ran loops with roughly the same performance as MS. It then went further and greatly improved GOTO performance as well. Line numbers were sent into a hash function that broke them into 256-line chunks. As the program was entered, the address of the first of each of these chunks was stored in a 128-value table. At runtime, when a line number lookup was needed, it would first pick the nearest-but-lower value in the table, retrieve the address, and then begin scanning for the line from that point on. The improvement was most notable in larger programs where the scanning time was increasingly expensive, which is why Turbo-Basic could hit a 5-times increase in larger programs.
The other major source of poor performance in Atari BASIC was its very slow binary-coded decimal (BCD) floating point code. The library, contained in a separate 2K ROM and considered part of the operating system as opposed to BASIC itself, had been written in a hurry and never optimized. Some of the routines, notably the multiply and exponents functions, were far slower than they could be.
Turbo-Basic fixed this by including its own complete floating-point library, which not only fixed many of these issues but also further optimized the code by unrolling small loops. For programs that used math extensively, the new library resulted in dramatic performance improvements, sending the Atari from near the bottom of the Creative Computing Benchmark lists to near the top, beating a number of machines that were much faster in hardware.
Among the extra features of Turbo-Basic XL, added to Atari BASIC, are the following:
Applesoft BASIC is a dialect of Microsoft BASIC, developed by Marc McDonald and Ric Weiland, supplied with the Apple II series of computers. It supersedes Integer BASIC and is the BASIC in ROM in all Apple II series computers after the original Apple II model. It is also referred to as FP BASIC because of the Apple DOS command FP
used to invoke it, instead of INT
for Integer BASIC.
BASIC09 is a structured BASIC programming language dialect developed by Microware on behalf of Motorola for the then-new Motorola 6809 CPU and released in February 1980. It is primarily used with the OS-9 operating system, released in 1979. Microware also released a version for OS-9/68k on the 68000 as Microware BASIC.
Atari BASIC is an interpreter for the BASIC programming language that shipped with Atari 8-bit computers. Unlike most American BASICs of the home computer era, Atari BASIC is not a derivative of Microsoft BASIC and differs in significant ways. It includes keywords for Atari-specific features and lacks support for string arrays.
Microsoft BASIC is the foundation software product of the Microsoft company and evolved into a line of BASIC interpreters and compiler(s) adapted for many different microcomputers. It first appeared in 1975 as Altair BASIC, which was the first version of BASIC published by Microsoft as well as the first high-level programming language available for the Altair 8800 microcomputer.
Integer BASIC is a BASIC interpreter written by Steve Wozniak for the Apple I and Apple II computers. Originally available on cassette for the Apple I in 1976, then included in ROM on the Apple II from its release in 1977, it was the first version of BASIC used by many early home computer owners.
Commodore BASIC, also known as PET BASIC or CBM-BASIC, is the dialect of the BASIC programming language used in Commodore International's 8-bit home computer line, stretching from the PET (1977) to the Commodore 128 (1985).
The Atari Microsoft BASIC and Atari Microsoft BASIC II variants of the 6502-version of Microsoft BASIC ported to the Atari 8-bit computers. The first version, released 1981, required 32 KB of RAM and was supplied on floppy disk. The second version, released the next year, had most of the code on a ROM cartridge with additional functions on an optional floppy.
BASIC A+ was developed by Optimized Systems Software of Cupertino, California, United States, to provide Atari 8-bit computers with an extended BASIC compatible with the simpler ROM-based Atari BASIC. This interpreter was developed by the same team that developed Atari BASIC. While Atari BASIC came on an 8 KB ROM cartridge, BASIC A+ was delivered on floppy disk and uses 15 KB of the computer's RAM, leaving 23 KB available for user programs in a 48 KB Atari 800. Being an extension of Atari BASIC, BASIC A+ came with a supplement to the former's reference manual as its documentation. In addition to being faster than its ROM-bound counterpart, BASIC A+ provides extra commands for DOS operations, player/missile graphics, and debugging.
GFA BASIC is a dialect of the BASIC programming language, by Frank Ostrowski. The name is derived from the company, which distributed the software. In the mid-1980s to the 1990s it enjoyed popularity as an advanced BASIC dialect, but has been mostly superseded by several other programming languages. Official support ended in the early 2000s.
TI BASIC is an ANSI-compliant interpreter for the BASIC programming language built into the 1979 Texas Instruments TI-99/4 home computer and its improved 1981 version, the TI-99/4A.
Atari DOS is the disk operating system used with the Atari 8-bit computers. Operating system extensions loaded into memory were required in order for an Atari computer to manage files stored on a disk drive. These extensions to the operating system added the disk handler and other file management features.
HP Time-Shared BASIC is a BASIC programming language interpreter for Hewlett-Packard's HP 2000 line of minicomputer-based time-sharing computer systems. TSB is historically notable as the platform that released the first public versions of the game Star Trek.
Optimized Systems Software (OSS) was a company that produced disk operating systems, programming languages with integrated development environments, and applications primarily for Atari 8-bit computers. The founders of OSS previously developed Atari DOS, Atari BASIC, and the Atari Assembler Editor for Atari, Inc., and many OSS products are substantially improved versions. OS A+ and DOS XL are based on Atari DOS. BASIC A+, BASIC XL, and BASIC XE are based on Atari BASIC. EASMD and MAC/65 are modeled on the Atari Assembler Editor. Action! is an ALGOL-inspired compiled programming language with an integrated full-screen editor. OSS also sold some software for the Apple II.
SpartaDOS X is a disk operating system for the Atari 8-bit family of computers that closely resembles MS-DOS. It was developed and sold by ICD, Inc. in 1987-1993, and many years later picked up by the third-party community SpartaDOS X Upgrade Project, which still maintains the software.
North Star BASIC was a dialect of the BASIC programming language for the Intel 8080 microprocessor used on the North Star Horizon and available for purchase on other S-100 bus machines of the late 1970s.
The Rugg/Feldman benchmarks are a series of seven short BASIC programming language programs that are used to test the performance of BASIC implementations on various microcomputers. They were published by Tom Rugg and Phil Feldman in the June 1977 issue of the US computer magazine, Kilobaud.
SCELBAL, short for SCientific ELementary BAsic Language, is a version of the BASIC programming language released in 1976 for the SCELBI and other early Intel 8008 and 8080-based microcomputers like the Mark-8. Later add-ons to the language included an extended math package and string handling. The original version required 8 kB of RAM, while the additions demanded at least 12 kB.
A BASIC interpreter is an interpreter that enables users to enter and run programs in the BASIC language and was, for the first part of the microcomputer era, the default application that computers would launch. Users were expected to use the BASIC interpreter to type in programs or to load programs from storage.
Acorn System BASIC and Atom BASIC are two closely related dialects of the BASIC programming language developed by Acorn Computers for their early microcomputers like the Acorn System 3 and Acorn Atom. Developed in-house, they have a number of significant idiosyncrasies compared to most BASIC dialects of the home computer era.