HOME

TheInfoList



OR:

SuperBASIC is an advanced variant of the
BASIC programming language Basic or BASIC may refer to: Science and technology * BASIC, a computer programming language * Basic (chemistry), having the properties of a base * Basic access authentication, in HTTP Entertainment * ''Basic'' (film), a 2003 film * Basic, on ...
with many
structured programming Structured programming is a programming paradigm aimed at improving the clarity, quality, and development time of a computer program by making specific disciplined use of the structured control flow constructs of selection ( if/then/else) and repet ...
additions. It was developed at
Sinclair Research Sinclair Research Ltd is a British consumer electronics company founded by Clive Sinclair in Cambridge in the 1970s. In 1980, the company entered the home computer market with the ZX80 at £99.95, at that time the cheapest personal computer ...
by Jan Jones during the early 1980s. Originally SuperBASIC was intended as the
BASIC interpreter A BASIC interpreter is an Interpreter (computing), interpreter that enables users to enter and run programs in the BASIC programming language, language and was, for the first part of the microcomputer era, the default Application software, applica ...
for a
home computer Home computers were a class of microcomputers that entered the market in 1977 and became common during the 1980s. They were marketed to consumers as affordable and accessible computers that, for the first time, were intended for the use of a s ...
code-named ''SuperSpectrum'', then under development. This project was later cancelled; however, SuperBASIC was subsequently included in the
ROM Rom, or ROM may refer to: Biomechanics and medicine * Risk of mortality, a medical classification to estimate the likelihood of death for a patient * Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac * ...
firmware In computing Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, h ...
of the
Sinclair QL The Sinclair QL (for ''Quantum Leap'') is a personal computer launched by Sinclair Research in 1984, as an upper-end counterpart to the ZX Spectrum. The QL was the last desktop microcomputer from Sinclair Research aimed at the serious home use ...
microcomputer A microcomputer is a small, relatively inexpensive computer having a central processing unit (CPU) made out of a microprocessor. The computer also includes memory and input/output (I/O) circuitry together mounted on a printed circuit board (P ...
(announced in January 1984), also serving as the
command line interpreter A command-line interface (CLI) is a means of interacting with software via commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user-friendly alternativ ...
for the QL's QDOS
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
. It was one of the first second-generation BASICs to be integrated into a microcomputer's operating system (unlike
BBC BASIC 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. It was originally supplied on ...
which preceded it in 1981), making the OS user-extendable—as done by
Linus Torvalds Linus Benedict Torvalds ( , ; born 28 December 1969) is a Finnish software engineer who is the creator and lead developer of the Linux kernel. He also created the distributed version control system Git. He was honored, along with Shinya Yam ...
in his formative years.


Reception

''
BYTE The byte is a unit of digital information that most commonly consists of eight bits. Historically, the byte was the number of bits used to encode a single character of text in a computer and for this reason it is the smallest addressable un ...
'' in September 1984 approved of SuperBASIC's improvements over
Sinclair BASIC Sinclair BASIC is a dialect of the programming language BASIC used in the 8-bit home computers from Sinclair Research, Timex Sinclair and Amstrad. The Sinclair BASIC interpreter was written by Nine Tiles Networks Ltd. Designed to run in on ...
but criticized its "very, very slow" performance on the Byte Sieve, writing that "With a 7.5-MHz 68008, you'd think it would take some effort to get a language to run that slowly". The magazine also noted that SuperBASIC's seven-digit precision made it unsuitable for business use ("you can represent numbers far larger than the number of quarks in the universe, but not the pennies on your balance sheet if your turnover exceeds £99,000").


Advanced features

* RESPR for resident procedures, e.g. to extend QDOS * choice of parameters passed to procedures * procedures return parameters as chosen * IF - THEN - ELSE - END IF * FOR - NEXT - EXIT - END FOR * REPeat - NEXT - EXIT - END REPeat * SELect ON - ON - REMAINDER - END SELect * arbitrarily RETurn from within procedures & functions * data type coercion between numeric and string variables * actual parameters passing data type to formal parameters *
array An array is a systematic arrangement of similar objects, usually in rows and columns. Things called an array include: {{TOC right Music * In twelve-tone and serial composition, the presentation of simultaneous twelve-tone sets such that the ...
operations: slicing, joining etc. * LOCal arrays & (string) variables * AUTOmatic line numbering * relative RESTORE & DATA 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 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."


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 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) 100 DIM month$(12,9) 110 RESTORE 120 REM QL User Guide's "Data Read Restore" example ii 130 REM appropriately amended relative to example i 140 FOR count=1 TO 12 : READ month$(count) 150 DATA "January","February","March" 160 DATA "April","May","June" 170 DATA "July","August","September" 180 DATA "October","November","December" 190 DATA "SUN","MON","TUE","WED","THU","FRI","SAT" 199 END DEFine Iso


Bibliography

* Donald Alcock: ''Illustrating Superbasic on the Sinclair QL.'' Cambridge University Press, 1985. * Roy Atherton: ''Good Programming with QL Superbasic.'' Longman Software, 1984. * A. A. Berk: ''QL SuperBasic''. Granada Publishing, 1984. * * Jan Jones: ''QL SuperBasic: The Definitive Handbook''. McGraw-Hill, 1984 (
e-book An ebook (short for electronic book), also spelled as e-book or eBook, is a book publication made available in electronic form, consisting of text, images, or both, readable on the flat-panel display of computers or other electronic devices. Al ...
reissue 2014) * Dick Meadows, Robin Bradbeer, Nigel Searle: ''Introduction to Superbasic on the Sinclair QL.'' Hutchinson Computer Publishing, 1984. * Dick Meadows, Robin Bradbeer, Nigel Searle: ''Making the Most of the Sinclair QL: QL Superbasic and Its Applications.'' Hutchinson Computer Publishing, 1985. * Andrew Nelson: ''Exploring the Sinclair QL: An Introduction to SuperBasic.'' Interface Publications, 1984. * John K. Wilson: ''QL Superbasic: A Programmer's Guide.'' Micro Press, 1984.


References


External links


''The Quantum Leap - to where?''
a chapter from ''Sinclair and the 'Sunrise' Technology'' {{BASIC BASIC interpreters Discontinued BASICs Sinclair Research Programming languages created by women BASIC programming language family