SBasic was compatible with the syntax of Basic, a programming language commonly used in the 1970s through the 1980s, as well as Fortran77. However, the language relaxed many of the requirements of Basic and had more flexibility than Fortran. For instance, line numbers were optional, and permitted non-numeric characters. In addition, SBasic offered developers structured programming concepts, including recursion and nesting. Many PL-1 programs could be compiled with little modification, though SBasic did not offer an extensive function library.
Among the more advanced features was the ability to "base" a variable or array, making the memory location dynamic and modifiable during execution. SBasic programs had the ability to access memory areas reserved for the operating system unless prohibited from doing so by the operating system itself. (Kaypro's CP/M had no such prohibitions.) This enabled direct utilization and modification of DMA and other memory areas. This feature also permitted a program to modify itself at run-time. This capability also allowed modifying the instruction pointer, so a program could effectively link other executable modules that were read during execution as data.
Unlike Basic interpreters that stored "p-code" that was parsed by an execution module, SBasic was a two-pass compiler, ultimately producing .com files that were executable. The language was written in a subset of itself and compiled using a .com kernel, then stored on diskette (or hard drive on the last KayPro model). The source was distributed with some KayPro models. This encouraged open-source-like modification of the language, with some early pre-Internet user groups exchanging physical diskettes by regular mail.
Jerry Pournelle in 1983 wrote that SBASIC "is quite nice", stating that it "rivals CB-80". He presumed that Kaypro users would "will begin by using Microsoft MBASIC, then start translating their programs into S-BASIC and learn more about structured programming". Pournelle added, "If I had to give an award for the most unreadable computer document I've ever seen, the original S-BASIC manual would win hands down"; however, Kaypro had rewritten it and "is a great deal more sensible".
- http://fixunix.com/cp-m/400-sbasic.html[dead link]
- Pournelle, Jerry (June 1983). "Zenith Z-100, Epson QX-10, Software Licensing, and the Software Piracy Problem". BYTE. 8 (6). p. 411. Retrieved 20 October 2013.
- Miller, A.R. (April 1981), "SBasic: A Structured, Compiling Language for CP/M", Interface Age, Cerritos, California: McPheters, Wolfe & Jones, 6 (4): 92–96, 0-71486-02631 04, archived from the original on February 23, 2012, retrieved 21 May 2009
- UV-Visible spectrophotometer - Spectral Software, retrieved 21 May 2009
- Paul, Liberatore, Simplifying Routine Analyses using Spectral SBasic Programming Language—Chlorophyll Analysis (PDF), GBC Scientific Application Notes—UV-Visible
- Garland, S.J. (1976), Structured programming, graphics, and SBASIC, Hanover, New Hampshire: Kiewit Computation Center. SP028 (reference)
- Hardy, S. (February 1978), Graphics in BASIC and structured BASIC, Hanover, New Hampshire: Kiewit Computation Center. TM110. (reference)
|This programming-language-related article is a stub. You can help Wikipedia by expanding it.|