5 trivial SBASIC programs

Anything QL Software or Programming Related.
Post Reply
Tinyfpga
Gold Card
Posts: 252
Joined: Thu Sep 27, 2018 1:59 am

5 trivial SBASIC programs

Post by Tinyfpga »

I have been trying to learn to program in SBASIC using documents found in Dilwyn's site. Without an ancient SMS2 setup floppy I had, I think I would have found writing multitasking programs for SMSQE almost impossible.

As it is, I have only scratched the surface of what is possible, as there is so much to understand. More than half the time my code does not work, and for so many reasons.
SMS is a seriously complex system and without a single comprehensive manual I have found writing programs very difficult.

I started with an SMS2 startup floppy from nearly 30 years ago and then, bit by bit, tested SBASIC instructions to see what they actually did. One of the most useful documents was the QL beginner's or the QL concept guides (I can't remember which). Even these docs presented a problem for me because they were written from the perspective of running code examples in a low resolution interpreter.

Some of the trivial but possibly mildly amusing programs I have written can be found in a zipped WIN disk as follows:
WIN8.zip
(456.33 KiB) Downloaded 59 times
Bunch of apps.JPG
The bat and ball game might run on a QL and could be entered (if it works) into the "Crap games for QL" competition if someone wants to do this. The idea is move the "bat" to stop the bouncing ball escaping through the slit using the arrow keys. Esc kills the program

The "Bounce" program produces ever changing linear patterns that are adjusted by pressing or holding down a key.

The babbler is an improved (slightly) version of the one I posted earlier.

The art and ball programs are activated by clicking on the B or +.


Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: 5 trivial SBASIC programs

Post by Derek_Stewart »

Hi,

I do not see what the difference is between your SMS2 environment and a SMSQ/E environment.

Actually SMSQ/E is an enhanced SMS2 system, with a SBAISC interpreter that SMS2 lacks.

All your programmes can be run with QPTR extensions in SMSQ/E, the QBASIC to give a similiar compiled ouput. But QD/SBAS Thing in QD can give a multitasking SBASIC output of the same programmes.


Regards,

Derek
Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: 5 trivial SBASIC programs

Post by Derek_Stewart »

Hi,

Here is QPC2 v5.01 SMSQ/E v3.38, running the SMS2 programmes from QD 2018 with QD/SBAS Interpreter Thing for each Basic file:
QPC2-WIN8_progs.png
Works in SMSQmulator, Q68, or anything that is running SMSQ/E

If I had used QBASIC, the output would be compiled programmes rather than the QD/SBAS Interpreted ouptut. But Multi-tasking Basic is very easy on a modern QL.

Not too bad for compatibility...


Regards,

Derek
Tinyfpga
Gold Card
Posts: 252
Joined: Thu Sep 27, 2018 1:59 am

Re: 5 trivial SBASIC programs

Post by Tinyfpga »

I like your SMSQ/E setup. Could you create a WIN zip file of the setup that you are displaying and post it? It looks like you are running SMSQE on a version of Linux installed on a PC, is this correct?. Did you ever try my BASIC speed test program on your system?

Personally I have no use for an interpreter and prefer SMS2 because it doesn't have one. Tony Tebby did not like the use of an interpreter as a way of interacting with a computer and so he, as QJUMP Limited, started work on what is now known as the Pointer Environment to replace it. When he built SMS2, he embedded the PE user interface as a replacement for the interpreter. The interpreter was re-introduced into SMS at the request of Jochen Mertz, not because Tony Tebby thought it a good idea.

I feel that the time spent (wasted?) re-introducing the interpreter as a user interface would have been better spent developing the user interface for Stella. Unlike SMSQ/E, which is only of interest to a very small number of enthusiasts, Stella might (still could) have been of interest to a much larger audience.

One of the problems that TT faced at the time of his work on Stella, was that there was no realistic hardware to run it on. As you probably know Stella was written on an Atari ST but this was not a computer with a future. What was not possible in the early nineties, is possible now with FPGA. It is hardware such as Peter Graf's Zero that demonstrates what can be built today.

Of course I have to use the interpreter in SMSQ/E at startup but that is the only time I use it. I quite like EXing a _bas file but it does not work unless I add line numbers which I don't like doing. I am not sure what QBASIC or QD/SBAS are but I will see if there are any advantages in using them.

As you say SMSQ/E is mainly SMS2 + embedded interpreter. SMS2 was designed to be compatible (ish) with QDOS and so SMS2 applications run well on SMSQ/E, as you so aptly demonstrate. The main advantage of SMSQ/E is the fact that it can be used, at high resolutions on Q68s, PCs and Pis. The only significant difference (other than the interpreter) between SMS2 and SMSQ/E is the use of an embedded SBASIC parser developed by (I think) Qview.


Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: 5 trivial SBASIC programs

Post by Derek_Stewart »

Hi,

I usually use a Linux Mint 19.3 Cinnamon setup which runs QPC2, Qemulator, under Wine. SMSQmulator runs under Java, sQLux is a Linux compiled application

My setup is the same on QPC2, SMSQmulator, Q68, QXL, SGC QL, sQLux, Qemulator. With minor changes for a non SMSQ/E operating system, like Minerva.

The setup is a simple boot file loading extensions, defining hotkeys, degining resident Things.

I usually, write BASIC programmes with QD and run them with the QD/SBAS Thing to load the SBASIC Thing, which runs the basic programme.

If I want the programme compiled. Load the QBASIC Thing into QD by defining the F10 key function to run the QBASIC Thing, which functions like the Parser Thing in SMS2.


Regards,

Derek
Post Reply