Compiling a SuperBasic program
Compiling a SuperBasic program
Hi all!
I am trying to write a program in SuperBasic,
Getting a lot of problems, but I hope to solve most part of them.
What I will not solve is the speed. Running it is very very very slow, by now just printing some points on the screen, reading again those positions back.
So... I guest I should compile it to get it faster.
How could I do it?
By now using QEmulator in a virtual machine. That allows me to test it from microdrive.
Thanks a lot
I am trying to write a program in SuperBasic,
Getting a lot of problems, but I hope to solve most part of them.
What I will not solve is the speed. Running it is very very very slow, by now just printing some points on the screen, reading again those positions back.
So... I guest I should compile it to get it faster.
How could I do it?
By now using QEmulator in a virtual machine. That allows me to test it from microdrive.
Thanks a lot
Re: Compiling a SuperBasic program
Hi,
check out Qliberator:
https://dilwyn.theqlforum.com/qlib/index.html
There are others, but 25+ years ago this was my choice.
Stephan
check out Qliberator:
https://dilwyn.theqlforum.com/qlib/index.html
There are others, but 25+ years ago this was my choice.
Stephan
Re: Compiling a SuperBasic program
Thank you StephanMaskenlos wrote: Mon Dec 30, 2024 9:37 am Hi,
check out Qliberator:
https://dilwyn.theqlforum.com/qlib/index.html
There are others, but 25+ years ago this was my choice.
Stephan
-
- Font of All Knowledge
- Posts: 4653
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Compiling a SuperBasic program
you could also look at Turbo Compiler, which gives faster compiled programs, but not as compatible as Qliberator.
Both compilers are free, so have a look at both and use the one you like.
Both compilers are free, so have a look at both and use the one you like.
Regards,
Derek
Derek
Re: Compiling a SuperBasic program
On an SMSQ/E system running SBasic, QLiberator can actually not achieve any speed increase over SBasic, which does some sort of "just-in-time compilation" (did it before that was even a thing) - The only "advantage" here is obfuscating the program which is, given the decompiler we have now, not much of a (questionable, in the first place) achievement. Liberated programs on SuperBASIC are, however, still significantly faster on the original black box than the interpreted version - but that's more to the reason that SuperBASIC is so slow in the first place.Derek_Stewart wrote: Mon Dec 30, 2024 6:38 pm you could also look at Turbo Compiler, which gives faster compiled programs, but not as compatible as Qliberator.
Both compilers are free, so have a look at both and use the one you like.
Turbo achieves a considerable speed increase over both SuperBASIC and SBASIC, and thanks to the changes that the late George Gwilt has made to it, will happily compile nearly any S*Basic construct except some really esoteric ones like calculated DATA items and typeless PROCedures and FuNctions.
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: Compiling a SuperBasic program
Thanks both for your answers and extra information,
Let's say from wikipedia :
The discussion about which car is better for the run, nice and I like it. But my problem is that I have no idea how to drive it.
So setting up the tool-chain or whatever to make a simple BASIC program to compile and get an compiled code to run directly on my QL is the most important part.
Later about what will result in a better tool based on the context or environment will be very helpful.
I know, for expert people who already have done it, it seems very easy to prepare the system, but for newbies like me... there are too many factors that could discourage to go on.
I am just now, trying to make a tool to check out the RAM memory in the system. Later more extended for other modules (sound, keyboard, serial ports, ROM, CPU, multiplexers... ).
What I have noticed is that in basic it is terribly slow just to check out the screen RAM section. Just the first pattern FF is veeeeeery slow.
I could apply expert acknowledge (algorithm) to increase the speed of this area, but at the end... it is just a exercise to know how will be to explore 640KB or higher quantity of RAM.
Let's say from wikipedia :
So I am not interesting in anything that could take advantage in other QL that would be a real QL, stock preferably or with small (simple) expansions (RAM for example).Wikipedia wrote:While SMSQ/E does not run on any unmodified QL, it runs on all of the more advanced QL compatible platforms, from the Miracle Systems (Super)GoldCard CPU plug-in cards to the Q60 motherboard.
The discussion about which car is better for the run, nice and I like it. But my problem is that I have no idea how to drive it.

So setting up the tool-chain or whatever to make a simple BASIC program to compile and get an compiled code to run directly on my QL is the most important part.
Later about what will result in a better tool based on the context or environment will be very helpful.
I know, for expert people who already have done it, it seems very easy to prepare the system, but for newbies like me... there are too many factors that could discourage to go on.
I am just now, trying to make a tool to check out the RAM memory in the system. Later more extended for other modules (sound, keyboard, serial ports, ROM, CPU, multiplexers... ).
What I have noticed is that in basic it is terribly slow just to check out the screen RAM section. Just the first pattern FF is veeeeeery slow.
I could apply expert acknowledge (algorithm) to increase the speed of this area, but at the end... it is just a exercise to know how will be to explore 640KB or higher quantity of RAM.
Re: Compiling a SuperBasic program
Assume you have a QL with enough memory and TK2 loaded. Further assume you have a floppy drivePopopo wrote: Tue Dec 31, 2024 5:28 pm
So setting up the tool-chain or whatever to make a simple BASIC program to compile and get an compiled code to run directly on my QL is the most important part.
Later about what will result in a better tool based on the context or environment will be very helpful.
- Load Turbo Toolkit: LRESPR flp1_turbo_tk_cde
- Set the default drive to the device and directory where your turbo compiler is: DEFAULT_DEVICE flp1_turbo_
- Load your S*BASIC Program: LOAD flp1_compileme_bas
- compile it: CHARGE
- Run it (depends on how you named it in the window before under OBJECT): EX flp1_test_task
That assumes you have downloaded Turbo Toolkit and placed it as flp1_turbo_tk_cde, then
downloaded the Turbo compiler and put the two _task files in there into flp1_Turbo_
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: Compiling a SuperBasic program
Thank you very much!tofro wrote: Tue Dec 31, 2024 5:50 pmAssume you have a QL with enough memory and TK2 loaded. Further assume you have a floppy drivePopopo wrote: Tue Dec 31, 2024 5:28 pm
So setting up the tool-chain or whatever to make a simple BASIC program to compile and get an compiled code to run directly on my QL is the most important part.
Later about what will result in a better tool based on the context or environment will be very helpful.
Done.
- Load Turbo Toolkit: LRESPR flp1_turbo_tk_cde
- Set the default drive to the device and directory where your turbo compiler is: DEFAULT_DEVICE flp1_turbo_
- Load your S*BASIC Program: LOAD flp1_compileme_bas
- compile it: CHARGE
- Run it (depends on how you named it in the window before under OBJECT): EX flp1_test_task
That assumes you have downloaded Turbo Toolkit and placed it as flp1_turbo_tk_cde, then
downloaded the Turbo compiler and put the two _task files in there into flp1_Turbo_
I have a stock QL that I have added expansion RAM.
But I will code and compile from an emulator. By now in a Virtual Machine with QEmulator (free version & limited).
Your steps seems to be pretty easy to follow!!!! Thank you very much. I was afraid of environment and system variables or lot of switches to set up.
I will get the tool/compiler from Dylwin's site and follow your steps as close as I can.

Re: Compiling a SuperBasic program
The actually are a lot of switches and fiddly screws to mess with. But the above should get you going and we can take it from there. And you should really read the manuals, both the Toolkit and Compiler manual. They're really good and worth a read.Popopo wrote: Tue Dec 31, 2024 5:58 pmThank you very much!tofro wrote: Tue Dec 31, 2024 5:50 pmAssume you have a QL with enough memory and TK2 loaded. Further assume you have a floppy drivePopopo wrote: Tue Dec 31, 2024 5:28 pm
So setting up the tool-chain or whatever to make a simple BASIC program to compile and get an compiled code to run directly on my QL is the most important part.
Later about what will result in a better tool based on the context or environment will be very helpful.
Done.
- Load Turbo Toolkit: LRESPR flp1_turbo_tk_cde
- Set the default drive to the device and directory where your turbo compiler is: DEFAULT_DEVICE flp1_turbo_
- Load your S*BASIC Program: LOAD flp1_compileme_bas
- compile it: CHARGE
- Run it (depends on how you named it in the window before under OBJECT): EX flp1_test_task
That assumes you have downloaded Turbo Toolkit and placed it as flp1_turbo_tk_cde, then
downloaded the Turbo compiler and put the two _task files in there into flp1_Turbo_
I have a stock QL that I have added expansion RAM.
But I will code and compile from an emulator. By now in a Virtual Machine with QEmulator (free version & limited).
Your steps seems to be pretty easy to follow!!!! Thank you very much. I was afraid of environment and system variables or lot of switches to set up.
I will get the tool/compiler from Dylwin's site and follow your steps as close as I can.![]()
ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
Re: Compiling a SuperBasic program
I will.tofro wrote: Tue Dec 31, 2024 6:02 pm The actually are a lot of switches and fiddly screws to mess with. But the above should get you going and we can take it from there. And you should really read the manuals, both the Toolkit and Compiler manual. They're really good and worth a read.
Last night was hard to get them. Not sure why I didn't go directly to Dylwin's site and alwasy try to get fast answer from Google or ChatGPT (waste of time).
QDOS SMS Reference Manual and qlsuperbasic.
I will download the rest from Dylwin's site.
Toolkit and compiler ASAP family gives me the time.
tofro, you help is amazing! thanks one more time.