Feelin’ my age (part 4): Sinclair SuperBASIC on the QL

In the 3rd post in this series, Remembering UCSD P-system Pascal, I babbled on about my experience with UCSD P-system Pascal and mentioned the Sinclair QL and its built in dialect of BASIC - SuperBASIC. I still have a soft spot for that BASIC.

Sinclair QL with the infamous microdrive tape cartridges. Photo from the Internet Archive

Before acquiring the QL the whole of my programming had been done in BASIC. I'd read about other languages but never used them. These BASICs were quite primitive or, in the case of the Level 1 BASIC on my 4Kb TRS-80 Model 1, extremely primitive.

SuperBASIC was so different. Later it occurred to me that it leaned more towards Pascal. It's certainly has much better support for structured programming than the standard basics. For example it had:

  • Multi-line IF - THEN - ELSE - END IF statements.

  • A generalised repeat loop construct: REPeat - NEXT - EXIT - END REPeat. This can be exited anywhere within the loop. An IF - THEN - EXIT statement test immediately after the REPeat statement acts as a while loop while a similar test immediately before an END REPeat statement acts like a repeat loop.

  • Multi-line indexed loops syntax - FOR - NEXT - EXIT - END FOR.

  • Case statements: SELect ON - ON - REMAINDER - END SELect.

  • Return from anywhere within procedures, functions and loops with EXIT.

  • LOCal arrays & variables.

I happily programmed using SuperBASIC for years without using a single GOTO statement. Although SuperBASIC has line numbers, you rarely had to refer to them.

The main thing to understand about the bad press that the QL attracted is that, true to form, Sinclair released it without bothering to finish it. And that means SuperBASIC was not what it could or should have been from the word go. Fortunately third parties came along with new ROMs & expansion cards that massively improved both the machine and SuperBASIC. 

Miracle Systems Gold Card with 2MB RAM, 16MHz 68000 processor and extended SuperBASIC - photo credit: Centre for Computing History

Another vendor released a SuperBASIC compiler. This meant that we could develop and test in the interpreter and release compiled code. Ideal.

Another feature of the QL was that SuperBASIC was used on the OS's command line. And I believe that procedure definitions could be used to effectively extend the OS. I seem to remember (but take this with a pinch of salt) that I used to load a SuperBASIC script after every boot to configure the OS and the windows just how I liked them. Because the script had no line numbers, the statements were executed immediately by the OS. If you know different, please let me know.

Eventually affordable Pascal and C compilers came along for the QL, which is where I developed my interest in, and love for, Pascal. Conversely it was then that I also realised how much I disliked C. Nah, forget the past tense, I still dislike C! I also determined that I needed to know more about this programming game.

So I popped off on a part-time college course where I learned BBC BASIC, Pascal (yey!) & COBOL (feelin' my age again). Multiuser minicomputers and BBC micros all the way. We also learned something fellow oldies may remember that's called Jackson Structured Programming - the design methodology de-jour back then, designed originally to make COBOL batch file processing easier to maintain and modify.  Anyone else ever encounter that?

I did write an accounts package in compiled SuperBASIC for a preserved railway where a friend of mine was Treasurer. It was customised to his needs and remained in use for some years. Thinking about it, that was my one and only commission, albeit unpaid! Therefore I resolutely remain an amateur.

Maybe somewhere I've still got some 3.5 inch floppies with QL code on them, but I'm not sure. All that remains are some screen shots of some of my programs. Screen shots here being meant literally: they are photographs shot on 35mm film of my monitor screen. Feelin' old again!

My attempt at the Travelling Salesman algorithm in SuperBASIC
Google Maps eat your heart out!

So what's your favourite language of old, and is it still around?

Still thriving?

I'm pleased to see that the QL, and more particularly SuperBASIC, is still being used and supported by the retro computer community. Would I call it thriving? Nope, but it still appears to be alive and kicking.

Sadly, I'm not one of those who are still using it. But I'm glad that someone is.

Aside: An Encounter with Turbo Pascal

As an aside I remember writing a solution to the 8 queens program in Turbo Pascal on the PC as a competition entry. And here's another reason to feel old: entries had to be printed out or hand written and submitted by post. Didn't win, BTW.

That program eventually got converted into a Delphi 1 Windows 3.1 program and was rewritten again for Win 32. The Windows version still exists on my Google Drive and there's a mothballed page about it on my website.

Delphi version of the 8 queens solution program first written in Turbo Pascal

There was also a Turbo Pascal implementation of John Conway's Game of Life that also got converted to Windows. That still has a mothballed page too.

Comments

  1. Anonymous6:21 pm

    Now i'm delphi programmer but i started with QL too!!!!!!

    ReplyDelete
    Replies
    1. I wonder how many of us there are?

      Delete

Post a Comment

Comments are very welcome, but please don't comment here if:

1) You have a query about, or a bug report for, one of my programs or libraries. Most of my posts contain a link to the relevant repository where there will be an issue tracker you can use.

2) You have a query about any 3rd party programs I feature, please address them to the developer(s) - there will be a link in the post.

3) You're one of the tiny, tiny minority who are aggressive or abusive - in the bin you go and reported you will be!

Thanks

Popular posts from this blog

Initialising dynamic arrays

Deleting elements from a dynamic array

New String Property Editor Planned For RAD Studio 12 Yukon 🤞