North Star BASIC
Paradigm | imperative |
---|---|
Designed by | Charles A. Grant, Mark Greenberg |
Developer | North Star Computers |
Influenced | |
BaZic, Megabasic, S.A.I.L.B.O.A.T. |
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.[1]
Overview
The BASIC interpreter was implemented by Dr. Charles A. Grant and Dr. Mark Greenberg, of North Star Computers, Inc.
One notable difference with other dialects of BASIC of the time was the way in which substrings were addressed using an array-like syntax, a concept sometimes referred to as "slicing". For example, <syntaxhighlight lang="text" class="" style="" inline="1">A$(13,17)</syntaxhighlight> in North Star BASIC corresponded to <syntaxhighlight lang="text" class="" style="" inline="1">MID$(A$,13,5)</syntaxhighlight> in Microsoft BASIC-derived dialects.[2] This slicing technique is analogous to the one used in Fortran, and was introduced to BASIC with HP Time-Shared BASIC and later used on Atari BASIC and Sinclair BASIC, among others. Strings could be of any length, limited only by available memory, but had to be "<syntaxhighlight lang="text" class="" style="" inline="1">DIM</syntaxhighlight>ensioned" before use.[3]
While the language was very similar to other BASICs overall, one interesting addition was the addition of an <syntaxhighlight lang="text" class="" style="" inline="1">EXIT</syntaxhighlight> keyword to pop out of a <syntaxhighlight lang="text" class="" style="" inline="1">FOR</syntaxhighlight> loop.[4] Different dialects of BASIC handled this in different ways, the equivalent in Integer BASIC and Atari BASIC was <syntaxhighlight lang="text" class="" style="" inline="1">POP</syntaxhighlight>. <syntaxhighlight lang="text" class="" style="" inline="1">FILL</syntaxhighlight> could be used to fill a block of memory with a given value.[5]
Most other differences were minor. <syntaxhighlight lang="text" class="" style="" inline="1">GOTO</syntaxhighlight> was supported, but the alternate form <syntaxhighlight lang="text" class="" style="" inline="1">GO TO</syntaxhighlight> was not. Computed-gotos, <syntaxhighlight lang="text" class="" style="" inline="1">ON X GOTO...</syntaxhighlight> did not support <syntaxhighlight lang="text" class="" style="" inline="1">GOSUB</syntaxhighlight>. <syntaxhighlight lang="text" class="" style="" inline="1">INPUT</syntaxhighlight> allowed a prompt; <syntaxhighlight lang="text" class="" style="" inline="1">INPUT "TYPE IN YOUR AGE",A</syntaxhighlight>. <syntaxhighlight lang="text" class="" style="" inline="1">INPUT1</syntaxhighlight> worked identically to <syntaxhighlight lang="text" class="" style="" inline="1">INPUT</syntaxhighlight>, but suppressed the following question-mark.[4] <syntaxhighlight lang="text" class="" style="" inline="1">NEW</syntaxhighlight> became <syntaxhighlight lang="text" class="" style="" inline="1">SCR</syntaxhighlight>atch, <syntaxhighlight lang="text" class="" style="" inline="1">PEEK</syntaxhighlight> became <syntaxhighlight lang="text" class="" style="" inline="1">EXAM</syntaxhighlight>, and <syntaxhighlight lang="text" class="" style="" inline="1">INSTR</syntaxhighlight> became <syntaxhighlight lang="text" class="" style="" inline="1">MATCH</syntaxhighlight>.[6] The language used the backslash (\) instead of a colon (:) to delimit statements on a single line.
The language also added a number of direct-mode commands like <syntaxhighlight lang="text" class="" style="" inline="1">BYE</syntaxhighlight> to exit BASIC and return to DOS, <syntaxhighlight lang="text" class="" style="" inline="1">REN</syntaxhighlight> to renumber the lines in the program, and <syntaxhighlight lang="text" class="" style="" inline="1">NULL</syntaxhighlight> which defined how many nulls to print after pressing return, to use as fill characters.[7]
Version 5 was assembled for 8-digit floating-point precision. North Star would re-assemble the interpreter for customers with a different precision, up to 14 digits.[8]
Some other dialects of BASIC were created that were based on and inspired by North Star BASIC, such as BaZic (a rewrite of North Star BASIC, taking advantage of the faster Zilog Z80 instructions),[1] Megabasic and S.A.I.L.B.O.A.T. (a basic optimized for Z80 and X86 MS-DOS). Some of these were available for other hardware and operating systems, including Unix, CP/M and DOS.
References
Citations
- ^ 1.0 1.1 Richard Milewski, "Micro Mike's baZic release 1", InfoWorld, April 27, 1981
- ^ Manual 1977, p. 11.
- ^ Manual 1977, p. 10.
- ^ 4.0 4.1 Manual 1977, p. 8.
- ^ Manual 1977, p. 9.
- ^ David A. Lien, "The BASIC Handbook" Compusoft Pub., 1981
- ^ Manual 1977, p. 5.
- ^ Manual 1977, p. 2.
Bibliography
- North Star BASIC version 6 (PDF). North Star Corporation. 1977. Archived from the original (PDF) on 2020-03-05. Retrieved 2011-11-21.
External links
- North Star BASIC manual, Version 5
- The User's Guide to North Star BASIC