Page 7 of 9

Re: Is SBASIC programming on SMSQE difficult?

Posted: Sat Jan 22, 2022 7:47 pm
by NormanDunbar
Hi ralf,

I suspect he means to update his QLIberator on his SMS2 computer, not to update SMS2.

Cheers,
Norm.

Re: Is SBASIC programming on SMSQE difficult?

Posted: Sat Jan 22, 2022 8:38 pm
by dilwyn
When it comes to QLiberator external procedures, there's been extensive discussion about them here and how people couldn't get them to work on SMSQ/E systems up to and including v3.36 of QLiberator. Some versions of SMSQ/E even came with a patch program for QLIB_run and QLIB_ext files to help get Externals to work. I presume (I have no exerience to know) that this applies to SMS/SMS2 as well.

Versions of QLIberator AFTER v3.36 (the versions worked on by EmmBee and Per Witte and others) have had a lot of work done on them and there are references in the updated documents to changes made in more recent versions - might be worth looking through the documents with the various version to see if any changes were made relevant to your needs.

Re: Is SBASIC programming on SMSQE difficult?

Posted: Sat Jan 22, 2022 9:13 pm
by Tinyfpga
Post by dilwyn » Sat Jan 22, 2022 8:38 pm
When it comes to QLiberator external procedures, there's been extensive discussion about them (on this forum)
Thank you for the tip. I searched for the discussions and found them. I will do my usual trick of collating the posts into a single document to read at a later date.

Using Norm's update idea, here is my UPDATE:-
Collating posts into a readable format is time consuming. As there is so much useful info on this forum, wouldn't it be great if one could just "press a button" to do this automatically.

And, yes, as Norm surmised, I am going to update Qlib on my various platforms, but sadly I can't update SMS2 itself. My ideal "QL" system would be SMS2 on Qzero or better still Stella on Qzero. One could even place such a system in a slimline "QL" case for those that admire the retro look.

Re: Is SBASIC programming on SMSQE difficult?

Posted: Sat Jan 22, 2022 10:21 pm
by NormanDunbar
Your wish might be difficult to grant. The forum runs on something called phpBB. It probably uses a mysql database to hold posts, topics, etc -- but don't quote me because I didn't check!

I did look for tools to combine/merge multiple posts into one document, with no luck.

Here's a thought experiment. The URL for viewing a post is viewtopic.php?f=3&t=4027 where f is the forum and t is the topic. Pagin is hanfled by taghing on "&start=nn" to thr url. Nn appears to be in multiples of 10. The first page has no start.

Given the url etc, a scraper program might be possible where it grabs the content of the url and somehow works through grabbing the html for each page until it gets a not found 404 error. Then the html could be stripped out and a text file created?

Cheers,
Norm.

Re: Is SBASIC programming on SMSQE difficult?

Posted: Sat Jan 22, 2022 10:26 pm
by XorA
NormanDunbar wrote:Your wish might be difficult to grant. The forum runs on something called phpBB. It probably uses a mysql database to hold posts, topics, etc -- but don't quote me because I didn't check!

I did look for tools to combine/merge multiple posts into one document, with no luck.

Here's a thought experiment. The URL for viewing a post is viewtopic.php?f=3&t=4027 where f is the forum and t is the topic. Pagin is hanfled by taghing on "&start=nn" to thr url. Nn appears to be in multiples of 10. The first page has no start.

Given the url etc, a scraper program might be possible where it grabs the content of the url and somehow works through grabbing the html for each page until it gets a not found 404 error. Then the html could be stripped out and a text file created?

Cheers,
Norm.
Isn’t it as easy as hitting print view on the spanner at top?

Re: Is SBASIC programming on SMSQE difficult?

Posted: Sat Jan 22, 2022 11:34 pm
by NormanDunbar
Never seen that option before!

Re: Is SBASIC programming on SMSQE difficult?

Posted: Sun Jan 23, 2022 8:53 am
by Derek_Stewart
Tinyfpga wrote:Given that Derek had no problems with $$external, I thought I would check the version of Qlib installed om my setups. I found that, although I thought I was using v3.36, I am, in fact, using v3.31 which does not support the directive.
I did not say that, I had problems with SMSQ/E, there was no problems with Minerva.

I will have a look on older version of Qliberator.

Re: Is SBASIC programming on SMSQE difficult?

Posted: Sun Jan 23, 2022 9:11 am
by Andrew
XorA wrote:Isn’t it as easy as hitting print view on the spanner at top?
For phpBB v3.0.x there was an add-on that allowed printing of a full topic, not only the current page.
I do not know if it works with the current phpBB version

Re: Is SBASIC programming on SMSQE difficult?

Posted: Sun Jan 23, 2022 9:23 am
by NormanDunbar
It seems that option only "prints" the page you are on.

Cheers,
Norm.

Re: Is SBASIC programming on SMSQE difficult?

Posted: Mon Jan 24, 2022 2:20 pm
by NormanDunbar
mk79 wrote:Well, in reality PEEK_L returns a float, so in principle one could do a PEEK_UL if one wanted.
So I did one! And PEEK_UW as well. I'll be using this as an excuse to do some more work on the next instalment of the eMagazine, but for now, have a PEEK_UL and PEEK_UW on me. PEEK_U isn't required as it returns unsigned values only.

The source code is well enough commented, if anyone cares. And there are two versions, a QDOS version and an SMSQ/E version. QDOS is bigger, at 260 bytes over 230, as it has the code to float a long onto the maths stack embedded while SMSQ/E has a maths package operation to float a long.

Oh, yes, I noticed an error in the S*BASIC example I posted back a while. I was adding 2^32 and should have been adding 2^31. Duh!
PEEK_UL.SMSQ.zip
(3.33 KiB) Downloaded 54 times
PEEK_UL.QDOS.zip
(3.36 KiB) Downloaded 50 times
UPDATED PLEASE RE_DOWNLOAD

There's nothing clever here, just grab an address, peek it and get a long result, if we want a word, clear the low word and swap the high word down. Float the result, Test if the float is negative and if so, add 2^31 for longs or 2^15 for words and return the result. I'd forgotten how much fun it was making sure A1 was set correctly!

Cheers,
Norm.