This package provides a BASIC interpreter for video terminal environments.
A manual for the language is provided as BASIC.
Note: This is a fairly abridged history, only detailing what is relevant to this BASIC.
BASIC was invented in 1964 at Dartmouth University in the United States of America.
Many things now associated with it were actually external commands in Dartmouth's GE-255 time‐sharing operating system, not statements in BASIC itself.
Only base e was supported for logarithms and exponentiation, and INPUT was not in the earliest version.
All statements were in upper case, and variable names had to be a single, uppercase, letter.
2nd Edition Unix was supposed to come with DEC's PDP BASIC as basic(6) (§6 was ‘user‐maintained programs’ back then) but did not.
Instead, it had Ken Thompson's bas(1), the reason given being that it was ‘smaller and faster’.
A few of Dartmouth's GE-255 TSS commands had been turned into built‐in BASIC statements, including list and run; and it changed = to ==, re‐spelled everything as lower case, and further re‐spelled BYE as done.
It was almost certainly ‘smaller and faster’ because it lacked arrays, lacked input, and lacked file I/O other than standard I/O, all of which the DEC PDP BASIC had and more besides.
By the Home Computer Era of the 1970s and 1980s, BASIC was supplied in ROM as the environment into which many machines (e.g. the BBC Microcomputer, the Acorn Electron, the Dragon 32 and 64, the Sinclair ZX 80, ZX 81, ZX Spectrum, and QL) bootstrapped. Many of what in the Dartmouth Era were external commands in Dartmouth TSS had been turned into built‐in BASIC statements, because many of these computers did not come with an operating system per se. Some dialects (most notably Acorn BASIC) had also lifted the draconian Dartmouth restrictions on variable names. And base 10 logarithms were also supported.
There were three main dialects of BASIC:
Microsoft since the 1970s had been selling its BASIC to OEMs to brand as the (ROM) BASIC for their machines. Microsoft BASIC was the root of IBM's BASIC and BASICA, Commodore PET BASIC, Commodore VIC20 and C64 BASIC, Dragon 32 and 64 BASIC, Oric-1 BASIC, and many others.
IBM's BASICA utility was invented in 1981 for PC-DOS and the original IBM PC, where BASIC was also in ROM (as it continued to be in the later PC/XT and PC/AT).
The ‘A’ stood for Advanced
per the MS-DOS Users's Guide.
Microsoft BASIC was also GWBASIC, the ‘GW’ standing for Gee Whiz
.
GWBASIC was invented for MS-DOS, for PC clones where BASIC was not in ROM, in 1983, and was showcased at Las Vegas Comdex in the Autumn of that year.
On MS-DOS there was still a BASICA command, but it was simply a copy of the GWBASIC program.
Acorn BASIC was the ancestor of BBC Microcomputer BASIC. Like Dartmouth BASIC, many of the things that in other BASICs were language statements were part of a separate underlying operating system, which was comparatively very extensive.
Much of the graphics in BBC BASIC was based upon operating system VDU primitives; ‘star commands’ provided everything from disc catalogues through tape drive control to user‐defined function keys; and the BASIC interpreter had a built‐in assembler, with in‐line assembly language in BASIC programs, CALL and USR statements, and special variables such as A%, X%, and Y% for accessing 6502 processor registers.
Sinclair BASIC was used on the Sinclair ZX80, ZX81, ZX Spectrum; with a significantly updated ‘SuperBASIC’ dialect on the Sinclair QL, designed for QDOS and with features specific to it.
Borland's Turbo BASIC came along later in 1986, bought from its original developers by Borland, and in 1989 reverting to them, under the corporate brand of Spectra Software, and the name Power BASIC. True BASIC came out in 1985, and even though it was made by the people who invented the language and who had been heavily involved in the ANSI process to standardize it, was ironically in the contemporary computer magazines usually described in terms of how different it was to the defacto standard BASICA/GWBASIC of PC/MS-DOS and what habits users would have to change.
This BASIC dialect is modelled somewhat on the aforementioned, before the sea change that was Visual BASIC for DOS and the GUI BASICs from Microsoft et al.. Its main influences are the early Microsoft BASIC, Sinclair SuperBASIC for the QL, and a bit of Acorn (later BBC) BASIC and VSI (VAX) BASIC. Some things, dealing in things that the Home Computer Era did not have, have been added; and some things very peculiar to home computers of that era (e.g. a directly attached joystick or a keyboard whose matrix can be directly strobed to see what keys are depressed) have been ignored. Moreover, it is for video terminal environments, and there is no pretense that the system has punched card inputs that have to be collated by line number, or files that are loaded from compact cassette tape.
It has roots in 1960s Dartmouth BASIC, but it differs from it in several of the same ways that Home Computer Era BASICs had evolved to be different from Dartmouth BASIC. Dartmouth BASIC would seem surprisingly limited and odd to even the users of BASIC in the Home Computer Era let alone to a user in the 21st century. Nor is this dialect ANSI BASIC, the ‘American Standard’ BASIC that was formally approved in 1987 just in time to be completly overtaken by a new wave of Borland and Microsoft BASICs for MS-DOS and Microsoft Windows which changed large parts of the language.
Being for video terminal environments on an actual operating system, the toolset and language differ from the Home Computer Era BASICs in several significant respects.
This toolset provides several standalone commands instead of building them into the language, and the many external utilities dealing with programming and general file management are expected to be used for tasks such as merging source files, editing files, printing listings, deleting files, showing the disc catalogue, and so forth.
With the notable exception of Acorn/BBC/ARM BASIC, the Home Computer Era BASICs did not run on top of an operating system.
The original 1960s Dartmouth BASIC did, however, and this is the main way that this BASIC takes after the Dartmouth original.
That operating system was DTSS, Dartmouth's GE-255 time‐sharing operating system.
As the Dartmouth people explained in 2005, it was in fact the operating system that provided many commands that in the Home Computer BASICs had to be actual BASIC statements, including HELLO, GOODBYE, CAT, LIST, RENAME, NEW, and RUN.
In Acorn/BBC/ARM BASIC, there are of course the ‘star commands’ that are part of the underlying operating system, such as *EDIT the BBC MOS's full screen editor, and *LOAD, and *RUN which load and run arbitrary machine‐code programs.
BBC BASIC x86 dutifully provided a runtime with versions of these that mapped to underlying MS/PC/DR–DOS functionality.
Everything is Unicode, encoded as Wobbly Transformation Format — 8–bit (WTF–8). This includes all string data in programs, the output printed by a program, and the contents of program source code files.
Programs from the Home Computer Era are saved to files in 8–bit encoding systems that sometimes iconv will not even have a conversion for. Tools exist for helping with the parts of the conversion of Commodore BASIC (for the PET, C64, or VIC-20) programs.