This is cool. Granted, the language presented here is absolutely horrid, but at the same time so much better than what was available at the time. The ZX Spectrum was a quirky ball of low-cost hacks (the Ferranti ULA that implemented most hardware stuff was driven beyond its intended use hard, with brilliant-yet-horrible features such as using the same pin for audio input and output...). Its BASIC lacked most features that are taken for granted these days, like control blocks: GOTO-another-line-number was the only way back in the days, and the resulting spaghetti code was... rough.
Inline assembly, which also hadn't been invented yet other than by embedding raw opcodes in DATA statements, is absolutely required to get the performance required for gaming: I still cherish my HiSoft Devpac tape (officially purchased and shipped from the UK at great expense and requiring extensive negotiations with the local customs people, for whom this entire 'software' thing was a bit new...) and Z80 assembly reference (pirated from a library with the school photocopier). So, in one sense, the limited BASIC was a blessing: it required you to really get to know your machine, which is probably the first and last time in my life that happened: I've not considered the timing implications of the CRT and optimized my code around that for a long time.
Nice to see people are still enjoying a 44-year-old platform!
ivolimmen 1 hours ago [-]
Even though the language is 'horrid' I have a weird attraction to it. I have been programming in various BASIC languages for more than 20 years. The last years I maintained a self developed application for my Mom in Visual Basic. Somehow I got things done in that language.
Boriel 1 hours ago [-]
I’m the author of the compiler. I started it 18yrs ago, well before AI, mainly as a PoC.
But people started to ask for more and more features …
The compiler tries hard to mimic the original Sinclair BASIC but also allows a more modern syntax similar to QBasic / FreeBASIC.
EdgyGreybeard 34 minutes ago [-]
So, yeah, apparently my comment comes off a bit more negative than intended, but: absolutely great work, and the improvements make this an actually-very-usable solution for the platform.
Zardoz84 1 hours ago [-]
Don't talk bad about ZX Basic. It had :
- IF THEN
- FOR
- GOSUB / RETURN
- DEFN
- GOTO
- READ / DATA
That was the same thing that any 8 bit BASIC of the era.
I have yet my books of learning BASIC (for kids), and there for ZX Spectrum, Commodore, Apple 2, etc... And only had that. The only thing that I remeber lacking compared againts other BASICs, was the ON GOTO, ON GOSUB and ELSE . On the control of flow in BASIC... That is all.
I will not see something more advanced (and without numbering the lines), like while and do loops, or select case, proper subrutines and functions, until I touch Turbo BASIC (and QBASIC)
gsliepen 15 minutes ago [-]
There was a wild range in capabilities in the various BASIC implementations of that time. I grew up with an Amstrad CPC6128, it came with Locomotive BASIC (https://en.wikipedia.org/wiki/Locomotive_BASIC), which was very capable: at one point I had written a multiplayer game with background music in it, without needing a single PEEK, POKE or CALL. The few times I saw Commodore BASIC programs it was littered with those three.
Rendered at 07:51:21 GMT+0000 (Coordinated Universal Time) with Vercel.
Inline assembly, which also hadn't been invented yet other than by embedding raw opcodes in DATA statements, is absolutely required to get the performance required for gaming: I still cherish my HiSoft Devpac tape (officially purchased and shipped from the UK at great expense and requiring extensive negotiations with the local customs people, for whom this entire 'software' thing was a bit new...) and Z80 assembly reference (pirated from a library with the school photocopier). So, in one sense, the limited BASIC was a blessing: it required you to really get to know your machine, which is probably the first and last time in my life that happened: I've not considered the timing implications of the CRT and optimized my code around that for a long time.
Nice to see people are still enjoying a 44-year-old platform!
- IF THEN
- FOR
- GOSUB / RETURN
- DEFN
- GOTO
- READ / DATA
That was the same thing that any 8 bit BASIC of the era.
I have yet my books of learning BASIC (for kids), and there for ZX Spectrum, Commodore, Apple 2, etc... And only had that. The only thing that I remeber lacking compared againts other BASICs, was the ON GOTO, ON GOSUB and ELSE . On the control of flow in BASIC... That is all.
I will not see something more advanced (and without numbering the lines), like while and do loops, or select case, proper subrutines and functions, until I touch Turbo BASIC (and QBASIC)