Turbo-Basic XL
   HOME

TheInfoList



OR:

Turbo-BASIC XL is an enhanced version of the
BASIC Basic or BASIC may refer to: Science and technology * BASIC, a computer programming language * Basic (chemistry), having the properties of a base * Basic access authentication, in HTTP Entertainment * Basic (film), ''Basic'' (film), a 2003 film ...
programming language for
Atari 8-bit computers The Atari 8-bit computers, formally launched as the Atari Home Computer System, are a series of home computers introduced by Atari, Inc., in 1979 with the Atari 400 and Atari 800. The architecture is designed around the 8-bit MOS Technology 650 ...
. It is a compatible superset of the
Atari 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 way ...
that shipped with the computers. Turbo-Basic XL was developed by Frank Ostrowski and published in the December 1985 issue of
German German(s) may refer to: * Germany, the country of the Germans and German things **Germania (Roman era) * Germans, citizens of Germany, people of German ancestry, or native speakers of the German language ** For citizenship in Germany, see also Ge ...
computer magazine Computer magazines are about computers and related subjects, such as networking and the Internet. Most computer magazines offer (or offered) advice, some offer programming tutorials, reviews of the latest technologies, and advertisements. ...
''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 In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
created binary
executable In computer science, executable code, an executable file, or an executable program, sometimes simply referred to as an executable or binary, causes a computer "to perform indicated tasks according to encoded instruction (computer science), in ...
s, 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, and similar block constructs, and added access to the underlying hardware, which, among other things, allowed operation of attached
floppy drive A floppy disk or floppy diskette (casually referred to as a floppy, a diskette, or a disk) is a type of disk storage composed of a thin and flexible disk of a magnetic storage medium in a square or nearly square plastic enclosure lined with a ...
s without exiting to
DOS DOS (, ) is a family of disk-based operating systems for IBM PC compatible computers. The DOS family primarily consists of IBM PC DOS and a rebranded version, Microsoft's MS-DOS, both of which were introduced in 1981. Later compatible syste ...
. 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 GFA BASIC is a dialect of the BASIC programming language, by Frank Ostrowski. The name is derived from the company ("GFA Systemtechnik GmbH"), which distributed the software. In the mid-1980s to the 1990s it enjoyed popularity as an advanced BA ...
for the
Atari ST Atari ST is a line of personal computers from Atari Corporation and the successor to the company's Atari 8-bit computers, 8-bit computers. The initial model, the Atari 520ST, had limited release in April–June 1985, and was widely available i ...
, which became one of the more popular BASICs on that platform.


Background

Since their release in 1979, the
8-bit In computer architecture, 8-bit integers or other data units are those that are 8 bits wide (1 octet). Also, 8-bit central processing unit (CPU) and arithmetic logic unit (ALU) architectures are those that are based on registers or data bu ...
family normally shipped with a version of Atari BASIC on a
ROM cartridge A ROM cartridge, usually referred to in context simply as a cartridge, cart, cassette, or card, is a replaceable part designed to be connected to a consumer electronics device such as a home computer, video game console or, to a lesser extent, ...
, 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 A microcomputer is a small, relatively inexpensive computer having a central processing unit (CPU) made out of a microprocessor. The computer also includes memory and input/output (I/O) circuitry together mounted on a printed circuit board (P ...
BASICs in the original version of David Ahl's
Creative Computing benchmark The Creative Computing Benchmark, also called Ahl's Simple Benchmark, is a Benchmark (computing), computer benchmark that was used to compare the performance of the BASIC programming language on various machines. It was first introduced in the Nove ...
. The poor performance of the official Atari BASIC led to a market for 3rd party
BASIC interpreter A BASIC interpreter is an Interpreter (computing), interpreter that enables users to enter and run programs in the BASIC programming language, language and was, for the first part of the microcomputer era, the default Application software, applica ...
s with better performance or more commands. Among them was an official port of
Microsoft BASIC 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 v ...
sold by Atari, several improved versions released by
Optimized Systems Software 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 A ...
, 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 A type-in program or type-in listing was computer source code printed in a home computer magazine or book. It was meant to be entered via the keyboard by the reader and then saved to cassette tape or floppy disk. The result was a usable game, ut ...
. 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 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 operat ...
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.


Performance

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
integer An integer is the number zero (0), a positive natural number (1, 2, 3, ...), or the negation of a positive natural number (−1, −2, −3, ...). The negations or additive inverses of the positive natural numbers are referred to as negative in ...
s and numeric constants in the code in their original
ASCII ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
format. When a line like 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 In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a ''significand'' (a Sign (mathematics), signed sequence of a fixed number of digits in some Radix, base) multiplied by an integer power of that ba ...
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 In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
was pushed onto a
call stack In computer science, a call stack is a Stack (abstract data type), stack data structure that stores information about the active subroutines and block (programming), inline blocks of a computer program. This type of stack is also known as an exe ...
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 A hash function is any Function (mathematics), function that can be used to map data (computing), data of arbitrary size to fixed-size values, though there are some hash functions that support variable-length output. The values returned by a ...
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 In computing and electronic systems, binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each digit is represented by a fixed number of bits, usually four or eight. Sometimes, special bit patterns are used f ...
(BCD)
floating point In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a ''significand'' (a signed sequence of a fixed number of digits in some base) multiplied by an integer power of that base. Numbers of this form ...
code. The
library A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
, contained in a separate 2K ROM and considered part of the
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
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 The Creative Computing Benchmark, also called Ahl's Simple Benchmark, is a Benchmark (computing), computer benchmark that was used to compare the performance of the BASIC programming language on various machines. It was first introduced in the Nove ...
lists to near the top, beating a number of machines that were much faster in hardware.


New features

Among the extra features of Turbo-Basic XL, added to Atari BASIC, are the following: * enhanced sound and graphics commands * more flexible I/O commands, including disk access *
structured programming Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making specific disciplined use of the structured control flow constructs of selection ( if/then/else) and repet ...
constructs * simple
debugging In engineering, debugging is the process of finding the Root cause analysis, root cause, workarounds, and possible fixes for bug (engineering), bugs. For software, debugging tactics can involve interactive debugging, control flow analysis, Logf ...
facilities


See also

* BASIC A+


References

*


External links


''Turbo-Basic XL listings
listings from ''Happy Computer'' magazine {{BASIC 1985 software Atari 8-bit computer software Turbo-Basic XL Turbo-Basic XL Turbo-Basic XL Programming languages created in 1985 BASIC programming language family