BASIC-PLUS
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. BASIC-PLUS was based on BASIC-8 for the TSS/8,[1] itself based very closely on the original Dartmouth BASIC. BASIC-PLUS added a number of new structures, as well as features from JOSS concerning conditional statements and formatting. In turn, BASIC-PLUS was the version on which the original Microsoft BASIC was patterned.[2] Notable among the additions made to BASIC-PLUS was the introduction of string functions like MID$ and LEFT$, in addition to Dartmouth's original all-purpose CHANGE command. In future versions of the language, notably Microsoft's, CHANGE was removed and BASIC-PLUS's string functions became the only ways to perform these sorts of operations. Most BASICs to this day follow this convention. The language was later rewritten as a true compiler as BASIC-Plus-2, and was ported to the VAX-11 platform as that machine's native BASIC implementation. This version survived several platform changes, and is today known as VSI BASIC for OpenVMS. OperationUsers would sit at a terminal and type in programming language statements. The statements could either be entered into the system's command interpreter directly, or entered into a text editor, saved to a file, and loaded into the command interpreter from the file. Errors in source code were reported to the user immediately after the line was typed. As a smart terminal with cursor control could not be guaranteed, BASIC-PLUS used the common system of prefixing all source code with a line number. The code was edited by typing in the number and then changing the contents of the following code. A line of code could be removed by typing in its line number and nothing else, thereby setting it to an empty line. The virtual address space of an RSTS/E user was limited to a little less than 64KB of space. Using BASIC-PLUS, about half of this virtual address space was used by the combined command interpreter and run-time library (named the Run Time System on RSTS/E). This limited user programs to about 32 kB of memory. Large programs were broken into separate executable pieces by use of the To conserve memory, the system included a garbage collecting memory manager, used for both string data and byte-code. A running program could be interrupted, have variables examined and modified, and then be resumed. Syntax and featuresBASIC-PLUS is patterned closely on later versions of Dartmouth BASIC, including its powerful EditingLine numbers were positive integers from 1 to 32767.[3] Logical lines of code could be continued on multiple physical lines by using a line feed at the end of a line instead of the normal carriage return character.[4] For ease of external editing of the source file, later versions of BASIC-PLUS also allowed the Multiple statements could be placed on a single line using Standard statementsThe Strings could be delimited by single or double quotes.[10] In addition to the Statement modifiersBASIC-PLUS added the concept of "statement modifiers", JOSS-like conditions that could be applied to any statement. For instance,
Variables, expressions and matrixesVariable names in the early versions of BASIC-PLUS could be a single letter or a single letter followed by a single digit.[5] With the inclusion of "Extend mode" in later versions, variable names could be up to 29 characters long, and dot (.) was added as a permitted character. Every variable name still had to begin with a letter.[b] As in most versions of BASIC, the The language supported three data types; floating-point numbers, integers, and strings. Variables with no suffix were floating point (8 bytes, range 0.29×10−38 to 1.7×1038, up to 16 digits of precision). Integer variables (16-bit, range −32768 to +32767) were indicated with a The list of mathematical and logical operators was typical of most BASICs, with some extensions. For math, The The language also included a number of File processingThe Virtual machineBASIC-PLUS was not an interpreter but a compile and go system: each line of BASIC was translated into "PPCODE" (Push-Pop Code) as it was entered, for subsequent fast execution on its virtual machine. These translations did not tokenize the BASIC lines but rewrote them for use on a stack machine; you could not translate these representations back to BASIC statements. This avoided the need to repeatedly decode the keywords as strings: once converted to PPCODE the keywords were numbers that pointed to routines to run that function. BASIC-PLUS included a BASIC Plus 2A related product called Basic Plus 2 ("BP2" or BASIC-Plus-2), was later developed by DEC to add additional features and increased performance. It used true compilation into threaded code and wrote its output to object files compatible with the machine code object files produced by the assembler and other language systems. These object files could be kept in libraries. A linker (the TKB, also known as the taskbuilder) then created executable files from object files and the libraries. TKB also supported overlays; this allowed individual routines to be swapped into the virtual address space as needed, overlaying routines not currently being used. Additionally, BP2 programs ran under the RSX Run Time System; this RTS only occupied 8KB of the user's virtual address space, leaving 56KB for the user's program.[33] (RSTS/E version 9 introduced separate Instruction and Data space, and the "disappearing" RSX Run Time System, permitting up to 64KB of each of instruction code and data.) These two factors allowed individual BP2 programs to be much larger than BASIC-PLUS programs, often reducing the need for CHAINing among multiple programs. Unlike BASIC-PLUS (which was only available on RSTS/E), BP2 was also available for the RSX-11 operating system. BP2 programs were also more compatible with the later VAX BASIC. Comparison to MS BASICMicrosoft BASIC was patterned very closely on BASIC-PLUS.[2] Earlier versions of MS BASIC, the 1.x series, lacked integer variables, but these were added in the 2.x series that was found on many machines, including the later models of the Commodore PET and Commodore 64. The ability to place logical and loop commands in-line, like See alsoNotesReferencesCitations
Bibliography
|