Data General Extended BASIC

Last updated
Extended BASIC
Developer(s) Data General
Initial release1970;53 years ago (1970)
Platform Data General Nova
Type BASIC
License Commercial proprietary software

Data General Extended BASIC, also widely known as Nova Extended BASIC, was a BASIC programming language interpreter for the Data General Nova series minicomputers. It was based on the seminal Dartmouth BASIC, including the Fifth Edition's string variables and powerful MAT commands for matrix manipulation. In contrast to the compile-and-go Dartmouth BASIC, Extended BASIC was an interpreter.

Contents

To this, Extended BASIC added substring manipulation using array slicing, which was common on BASICs of the era, found on HP Time-Shared BASIC, Sinclair BASIC, Atari BASIC and others. This contrasts with the Microsoft BASIC style which uses string functions like LEFT$, and thus makes porting string code somewhat difficult.

Data General later purchased rights to a much-expanded BASIC which was released as Data General Business Basic. This added powerful database functionality and largely replaced Extended BASIC on DG platforms.

Description

Mathematics

The internal floating point number format normally used two 16-bit words for a total of 32-bits, stored least significant bit first. Bit 0 was the sign, 1 through 7 was the exponent stored in excess-64 format, and 8 through 31 the mantissa stored as hexadecimal digits. [1] Numbers could alternately use a double-precision format that extended the mantissa only, adding another 32-bits. That meant the double-precision format did not extend the range of numbers that could be stored, only the accuracy of those numbers. [2] Possible numbers ranged from 5.4×10−79 to 7.2×1075. Numbers with less than six digits were displayed as decimals, while those with more were displayed in exponent format. [1]

Variable names could consist of a single letter, or a letter and a single digit. Two-letter names were not allowed. Arrays could be DIMmed in 1 (array) or 2 (matrix) dimensions, and the lower bound was always 1. [2] As was common at the time, variables with no DIM defaulted to a 1-D array of 10 elements. Confusingly, if a variable wasDIMed, it was not the same as a variable with the same name that had not been DIMed; A(1) and A might be the same or different variables depending on how they were created. [3]

Mathematics operators were the standard set, with the addition of a unary plus. [3] Relational operators for comparisons were also the standard set, there was no # for not-equals as found in some contemporary BASICs. [3]

Matrix math

Extended BASIC added the suite of matrix math operations from Dartmouth BASIC's Fifth Edition. These were, in essence, macros that performed operations that would otherwise be accomplished with FOR...NEXT loops. [4]

The system included a number of pre-rolled matrixes, like ZER for a zero-matrix, CON for a matrix of all 1's, and IDN for the identity matrix. Most mathematical operations were supported, for instance, MAT A=A*2 multiplies every element in A by 2. MAT A=DET A takes the determinant, and MAT A=INV(A) inverts it. [4]

Strings

String literals (constants) were entered between double-quotes. Characters within strings could be escaped by placing their ASCII value between angle-brackets, for instance, "This prints a quote, <34>." String variables, like their numeric counterparts, consisted of only a single letter, or one letter and one digit. [5]

As is the case for all variables in Extended BASIC, string variables were normally allocated ten spaces, but could be extended up to a maximum of 32 k with an explicit DIM. Because the array syntax was used to declare the length of the string, string arrays were not possible. Assigning a string to a variable that was too small too hold it resulted in any excess being truncated. [6]

String manipulation was carried out using array slicing syntax. A$(10) referred to the substring from position 10 to the end of the string, while A$(10,20) referred to characters 10 through 20. Concatenation used the comma, so A$=A$,B$ added B$ to the end of A$. [7] This was an uncommon syntax, even when it was being introduced, most BASICs using slicing used that for concatenation as well, for instance, A$(LEN(A$))=B$ would append B$ at the end of A$, while those using string functions, like Microsoft BASIC, already widely used the plus sign for this operation.

This syntax change was because Extended BASIC allowed math operators to be applied to strings, up to the first non-numeric character. For instance, A="1234"+"2345" would put 3579 into A, without the need to explicitly convert them to numerics, normally handled with the VAL function in most dialects. Non-numerics were simply ignored, A="1234"+"FRED" put 1234 into A. [8]

Extended BASIC lacked the CHANGE command from Dartmouth that converted an entire string to or from ASCII values in an array, for instance, CHANGE "HELLOWORLD" TO B which results in B being assigned 10 numbers, each one an ASCII value.

Statements

Extended BASIC is otherwise similar to Dartmouth and Microsoft BASIC in the variety of commands it supports and their syntax. Exceptions include CON instead of CONT, DELAY instead of PAUSE (which was not common anyway). Two additions were ON ERR THEN... which allowed errors to be trapped, a feature that became common on other BASICs, and ON ESC THEN... which allowed the break key (escape in this case) to be trapped as well. [9] RETRY was similar to CON, but allowed a single line to be re-run after a break, instead of continuing the entire program. [10] TIME set the time limit for TINPUT statements to respond, which was a "timed input" otherwise identical to INPUT. [11]

Extended BASIC added a variety of immediate mode editing statements that are not really part of the language per se. These included ERASE to remove a range of lines from a program, ENTER to read the contents of a text file into the program, and RENUMBER. [12] CARDS was similar to ENTER, but read the lines from the card reader.

It also added a number of statements for dealing with the underlying file system, including FILE which lists files in the user's directory and LIBRARY which does the same with wildcards, GDIR which printed the name of that directory, LOAD and SAVE for the program code, RENAME and DELETE, and DISK, which printed the free space. PUNCH was like SAVE, but sent the file to the card punch. WHATS printed the attributes of a given file. [13]

Other operating system-related statements included WHO to print a list of logged-in users, MSG to bother them, PAGE to set the right margin (page width), and SIZE to print the memory used by the program, the opposite of what would be returned in MS BASIC with FRE(). [14]

Functions

Functions closely matched Dartmouth and Microsoft BASIC, with a few additions. CPU() returned a numeric value encoding the positions of the front-panel switches. [15] EOF(x) returned whether or not file x had reached the end-of-file. POS(X$,Y$,Z) returned the position of B$ within A$, anywhere after the optional position Z, similar to the MS-standard INSTR. [16] Note that this overrides the POS found in MS, which returns the current column position of the cursor.

Related Research Articles

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 used to invoke it, instead of INT for Integer BASIC.

<span class="mw-page-title-main">BASIC</span> Family of programming languages

BASIC is a family of general-purpose, high-level programming languages designed for ease of use. The original version was created by John G. Kemeny and Thomas E. Kurtz at Dartmouth College in 1963. They wanted to enable students in non-scientific fields to use computers. At the time, nearly all computers required writing custom software, which only scientists and mathematicians tended to learn.

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.

<span class="mw-page-title-main">Atari BASIC</span> Dialect of the BASIC programming language

Atari BASIC is an interpreter for the BASIC programming language that shipped with the Atari 8-bit family of 6502-based home 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, for example.

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.

Dartmouth BASIC is the original version of the BASIC programming language. It was designed by two professors at Dartmouth College, John G. Kemeny and Thomas E. Kurtz. With the underlying Dartmouth Time Sharing System (DTSS), it offered an interactive programming environment to all undergraduates as well as the larger university community.

BASIC-PLUS is an extended dialect of the BASIC programming language that was developed by Digital Equipment Corporation (DEC) for use on its RSTS/E time-sharing operating system for the PDP-11 series of 16-bit minicomputers in the early 1970s through the 1980s.

<span class="mw-page-title-main">TI BASIC (TI 99/4A)</span> Programming language for TI-99 home computers

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.

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.

Color BASIC is the implementation of Microsoft BASIC that is included in the ROM of the Tandy/Radio Shack TRS-80 Color Computers manufactured between 1980 and 1991. BASIC is a high level language with simple syntax that makes it easy to write simple programs. Color BASIC is interpreted, that is, decoded as it is run.

Southampton BASIC System (SOBS) was a dialect of the BASIC programming language developed for and used on ICT 1900 series computers in the late 1960s and early 1970s; it was implemented as an incremental BASIC interpreter under the MINIMOP operating system at the University of Southampton and also ran under MAXIMOP.

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.

SUPER BASIC, sometimes SBASIC for short, is an advanced dialect of the BASIC programming language offered on Tymshare's SDS 940 systems starting in 1968 and available well into the 1970s.

SDS BASIC, also known as CP-V BASIC, Batch BASIC or Sigma BASIC depending on the version, is a BASIC programming language compiler for Scientific Data Systems's (SDS) Sigma series mainframe computers, originally released in 1967. Xerox purchased SDS in 1969 and began rebranding it as Xerox Data Systems, and finally just Xerox, at which time the language became known as Xerox BASIC.

<span class="mw-page-title-main">BASIC interpreter</span> Interpreter that enables users to enter and run programs in the BASIC language

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.

Wang BASIC is a series of BASIC programming languages for computers from Wang Laboratories. The term can be used to refer to the BASIC on any Wang machine, but is mostly associated with the versions on the Wang 2200 minicomputer series of the early 1970s. When these machines were updated to the VP series in 1976, BASIC-2 was introduced and remained the pattern for future machines in the 2200 series. A planned BASIC-3 was never released.

Minimal BASIC is a dialect of the BASIC programming language developed as an international standard. The effort started at ANSI in January 1974, and was joined in September by a parallel group at ECMA. The first draft was released for comments in January 1976 and the final standard, known alternately as ANSI X3.60-1978 or ECMA-55, was published in December 1977. The US Bureau of Standards introduced the NBSIR 77-1420 test suite to ensure implementations met the definition.

Full BASIC, sometimes known as Standard BASIC or ANSI BASIC, is an international standard defining a dialect of the BASIC programming language. It was developed by the American National Standards Institute (ANSI) X3.60 group in partnership with the European ECMA. It describes an advanced version of BASIC with many features including structured programming, matrix math, input/output for file handling, and many other options.

CALL/360:BASIC was an IBM dialect of the BASIC programming language for the System/360 and later platforms. It was based on mid-1960s versions of Dartmouth BASIC but added a number of extensions. Most of these were related to file handling, which, at that time, Dartmouth lacked. It also added support for the mathematical symbols found on some IBM terminals, so that <= could be entered directly as . Differences are otherwise minor.

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.

References

Citations

  1. 1 2 Manual 1978, p. 2.1.
  2. 1 2 Manual 1978, p. 2.2.
  3. 1 2 3 Manual 1978, p. 2.3.
  4. 1 2 Manual 1978, Chapter 5.
  5. Manual 1978, p. 2.4.
  6. Manual 1978, p. 2.5.
  7. Manual 1978, p. 2.6.
  8. Manual 1978, p. 2.7.
  9. Manual 1978, p. 3.26.
  10. Manual 1978, p. 3.43.
  11. Manual 1978, p. 3.48.
  12. Manual 1978, p. 3.42.
  13. Manual 1978, p. 3.50.
  14. Manual 1978, p. 3.46.
  15. Manual 1978, p. 4.3.
  16. Manual 1978, p. 4.7.

Bibliography