SuperBASIC

Last updated
SuperBASIC
Developer(s) Sinclair Research, Jan Jones
Initial release1984;40 years ago (1984)
Operating system QDOS
Platform Sinclair QL microcomputer
Type second-generation BASIC
License Proprietary

SuperBASIC is an advanced variant of the BASIC programming language with many structured programming additions. It was developed at Sinclair Research by Jan Jones during the early 1980s.

Contents

Originally SuperBASIC was intended as the BASIC interpreter for a home computer code-named SuperSpectrum, then under development. This project was later cancelled; however, SuperBASIC was subsequently included in the ROM firmware of the Sinclair QL microcomputer (announced in January 1984), also serving as the command line interpreter for the QL's QDOS operating system. [1] [2]

It was one of the first second-generation BASICs to be integrated into a microcomputer's operating system (unlike BBC BASIC which preceded it in 1981), making the OS user-extendable—as done by Linus Torvalds in his formative years.

Advanced features

The function below illustrates the last eight of these features. After having RUN it, entering

      PRINT weekdays$(Iso("19631122",1))

will print FRI to the screen. Until cleared (e.g. by entering NEW), the function Iso [3] will act like an extension to the operating system. Similarly, according to the QL User Guide, "many of the operating system commands are themselves defined as procedures." [4]

Example

AUTO 11,2    DEFine FN Iso(S,O)   LOCal y%,m%,d%,i$,n%,w%    REM Step 0 - to isolate components of date-stamp S="YEARMoDa"   LET y%=S(1TO 4) : m%=S(5TO 6) : d%=S(7TO 8)    REM Step 1 - to initiate Lachman's Congruence  [5]    LET i$=m%*2.56+ 193 : S=S(1TO 6)- 3    REM Step 2 - to compute the day-number within the week   LET w%=(S(1TO 2)&"32"DIV 16+ S(1TO 4)DIV 4+ y%+ i$(2TO 3)+ d%)MOD 7     REM Step 3 - to return result          SELect ON O                 ON O= 5 : n%=i$(2TO 3)                 ON O= 4 : n%=y%                 ON O= 3 : n%=m%                 ON O= 2 : n%=d%                 ON O= 1 : n%=w%                 ON O= REMAINDER : n%=-1          END SELect   RETurn n%    REM data statements   DIM weekdays$(6,3)   RESTORE 190   FOR count=0 TO 6 : READ weekdays$(count)

ctrl+space

100DIMmonth$(12,9)110RESTORE120REMQLUserGuide's "Data Read Restore" example ii130REMappropriatelyamendedrelativetoexamplei140FORcount=1TO12:READmonth$(count)150DATA"January","February","March"160DATA"April","May","June"170DATA"July","August","September"180DATA"October","November","December"190DATA"SUN","MON","TUE","WED","THU","FRI","SAT"199ENDDEFineIso

Bibliography

Related Research Articles

<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.

<span class="mw-page-title-main">Fortran</span> General-purpose programming language

Fortran is a third generation, compiled, imperative programming language that is especially suited to numeric computation and scientific computing.

The Sinclair QL is a personal computer launched by Sinclair Research in 1984, as an upper-end counterpart to the ZX Spectrum.

<span class="mw-page-title-main">ZX Spectrum</span> 1982 series of home computers

The ZX Spectrum is an 8-bit home computer developed and marketed by Sinclair Research. It is one of the most influential computers ever made, and it is also one of the best selling computers ever, with over five million units sold. It was first released in the United Kingdom on 23 April 1982, and around the world in the following years, most notably in Europe, the United States, and Eastern Bloc countries.

BBC BASIC is an interpreted version of the BASIC programming language. It was developed by Acorn Computers Ltd when they were selected by the BBC to supply the computer for their BBC Literacy Project in 1981.

<span class="mw-page-title-main">Intel MCS-48</span> Family of 8-bit microcontrollers

The MCS-48 microcontroller series, Intel's first microcontroller, was originally released in 1976. Its first members were 8048, 8035 and 8748. The 8048 is arguably the most prominent member of the family. Initially, this family was produced using NMOS technology. In the early 1980s, it became available in CMOS technology. It was manufactured into the 1990s to support older designs that still used it.

<span class="mw-page-title-main">PEEK and POKE</span> Commands in some high-level programming languages

In computing, PEEK and POKE are commands used in some high-level programming languages for accessing the contents of a specific memory cell referenced by its memory address. PEEK gets the byte located at the specified memory address. POKE sets the memory byte at the specified address. These commands originated with machine code monitors such as the DECsystem-10 monitor; these commands are particularly associated with the BASIC programming language, though some other languages such as Pascal and COMAL also have these commands. These commands are comparable in their roles to pointers in the C language and some other programming languages.

QDOS is the multitasking operating system found on the Sinclair QL personal computer and its clones. It was designed by Tony Tebby whilst working at Sinclair Research, as an in-house alternative to 68K/OS, which was later cancelled by Sinclair, but released by original authors GST Computer Systems. Its name is not regarded as an acronym and sometimes written as Qdos in official literature.

SMSQ/E is a computer operating system originally developed in France by Tony Tebby, the designer of the original QDOS operating system for the Sinclair QL personal computer. It began life as SMSQ, a QDOS-compatible version of SMS2 intended for the Miracle Systems QXL emulator card for PCs. This was later developed into an extended version, SMSQ/E, for the Atari ST. It consists of a QDOS compatible SMS kernel, a rewritten SuperBASIC interpreter called SBasic, a complete set of SuperBASIC procedures and functions and a set of extended device drivers originally written for the QL emulator for the Atari ST.

Sinclair Research Ltd was a British consumer electronics company founded by Clive Sinclair in Cambridge. It was originally incorporated in 1973 as Westminster Mail Order Ltd, renamed Sinclair Instrument Ltd, then Science of Cambridge Ltd, then Sinclair Computers Ltd, and finally Sinclair Research Ltd. It remained dormant until 1976, when it was activated with the intention of continuing Sinclair's commercial work from his earlier company Sinclair Radionics, and adopted the name Sinclair Research in 1981.

<span class="mw-page-title-main">One Per Desk</span>

The One Per Desk, or OPD, was an innovative hybrid personal computer/telecommunications terminal based on the hardware of the Sinclair QL. The One Per Desk was built by International Computers Limited (ICL) and launched in the United Kingdom in 1984. It was the result of a collaborative project between ICL, Sinclair Research and British Telecom begun in 1983, originally intended to incorporate Sinclair's flat-screen CRT technology.

Tony Tebby is a computer programmer and the designer of Qdos, the computer operating system used in the Sinclair QL personal computer, while working as an engineer at Sinclair Research in the early 1980s.

<span class="mw-page-title-main">BBC Micro</span> Series of British microcomputers by Acorn

The British Broadcasting Corporation Microcomputer System, or BBC Micro, is a series of microcomputer designed and built by Acorn Computers Limited in the 1980s for the Computer Literacy Project of the BBC. Designed with an emphasis on education, it was notable for its ruggedness, expandability, and the quality of its operating system. The machine was the focus of a number of educational BBC TV programmes on computer literacy, starting with The Computer Programme in 1982, followed by Making the Most of the Micro, Computers in Control in 1983, and finally Micro Live in 1985.

<span class="mw-page-title-main">68K/OS</span> Operating system for the Sinclair QL microcomputer

68K/OS was a computer operating system developed by GST Computer Systems for the Sinclair QL microcomputer.

YS MegaBasic is a BASIC programming language interpreter for the 1982 Sinclair Research ZX Spectrum microcomputer, written by Mike Leaman. The interpreter was available by mail-order from Your Spectrum magazine, hence the name "YS MegaBasic".

BASIC 1.0 is the standard BASIC language for Thomson computers, which is the reference for the entire range. This is an implementation of Microsoft BASIC (BASIC-69). It was used to introduce children from France to programming in the 1980s. Three languages were mainly taught: LSE, BASIC and LOGO. School textbooks programs were given in BASIC 1.0 for Thomson and sometimes in ExelBasic for the Exelvision EXL 100.

<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.

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.

References

  1. "Illustrating Super-BASIC on the Sinclair QL". Computing History. Retrieved 2023-02-06.
  2. Apostolo, Alberto. "Sinclair QL: mistakes, misfortune and so many regrets". RetroMagazineWorld. Retrieved 2023-02-06.
  3. gopher://sdf.org/0/users/retroburrowers/TemporalRetrology/QL/JG
  4. Berry, Stephen (1984). QL User Guide (2nd ed.). Cambridge: Sinclair Research Ltd.
  5. "Motorola 68000", Wikipedia, 2023-01-11, retrieved 2023-02-06