Jump to content

Category:QL SuperBASIC: Difference between revisions

m
minor edits
(FP & integer oddities)
m (minor edits)
Line 4:
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. Originally SuperBASIC was intended 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. It is notable for being the first second-generation BASIC to be integrated into a microcomputer's operating system, so making the latter user-extendable—as exemplified by Linus Torvalds in his formative years.
 
Spectrum, but is 4.967296E6 on a QL. And whileWhile providing integer variables, lacking on the Spectrum as well as the ZX81, SuperBASIC limits their range to that found on the
While an advancement over ZX Spectrum BASIC, it falls short in FP precision. 2^32, or 4294967295, - 1 yields the correct result on a
ZX80, rather than making full use of the 68008's 32-bit data registers. Thus, it can only take the DIV and MOD of a whole number
Spectrum, but is 4.967296E6 on a QL. And while providing integer variables lacking on the Spectrum as well as the ZX81, their range
that is within [-\+)2^15. And while an advancement over ZX Spectrum BASIC, it nonetheless falls short in floating point precision:
is limited to that found on the ZX80, rather than exploiting SuperBASIC's type coercion to make full use of the 68008's 32-bit data
4294967295 (2^32-1) - 4.294E9 yields the correct result on a Spectrum, but is 967296 on a QL. Furthermore, 2^31+1 - 2.147E9 yields
registers. Thus, one can only take the MOD of a whole number that is within +/-2^15 (exclusive).
483650, also one too much.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.