$$external problem

Anything QL Software or Programming Related.
EmmBee
Bent Pin Expansion Port
Posts: 80
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: $$external problem

Postby EmmBee » Wed Mar 21, 2018 11:33 pm

Here is my recommended way to test …
First, Enter the SBASIC code …

50 REMark $$external
60 DEFine Function FRA(x)
70 RETurn x - INT(x)
80 END DEFine

Compile with Q_Liberator

Type in and ENTER ... NEW - get rid of the SBASIC program – to avoid any confusion.

LRESPR the created QLIB obj file

And now test: PRINT #0, FRA(3.456)


User avatar
Artificer
ROM Dongle
Posts: 17
Joined: Fri Nov 24, 2017 8:43 am

Re: $$external problem

Postby Artificer » Thu Mar 22, 2018 9:55 am

EmmBee wrote:I don't think this works, actually. Neglecting to get rid of the SBASIC code is the culprit. In this case, SBASIC would take precedence over any loaded extension and produce a misleading correct result. Any loaded QLIB extensions never get the chance to be tested.

Let's hope that Wolfgang can come to the rescue.


EmmBee

Doing exactly as you say with the original SBASIC code cleared from the system with a reboot the FRA QLIB external still works on the Q60, I am using the QLib runtimes that are version 3.36mod. I thought they were the version that Thierry Godefroy modified a long time ago but they may also have been patched to work with externals as Dilwyn suggests.


User avatar
Dave
SandySuperQDave
Posts: 1976
Joined: Sat Jan 22, 2011 6:52 am
Location: Austin, TX
Contact:

Re: $$external problem

Postby Dave » Thu Mar 22, 2018 4:45 pm

Uhhh. *giggles*

I just misread this thread as: $exual problem


User avatar
pjw
Gold Card
Posts: 375
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway

Re: $$external problem

Postby pjw » Thu Mar 22, 2018 6:29 pm

Dave wrote:Uhhh. *giggles*

I just misread this thread as: $exual problem
A Freudian slip, perhaps?


Per
For every complex problem there is an answer that is clear, simple, and wrong.
- H. L. Mencken
EmmBee
Bent Pin Expansion Port
Posts: 80
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: $$external problem

Postby EmmBee » Thu Mar 22, 2018 10:31 pm

Our $exual problem continues...
Artificer wrote:have just tried the demonstration program for FRA(), compiled with QLiberator and LRESPRed and I get it to work when compiled with smsq/e 3.31 or with smsq/e 3.32 on a Q60. I have also QLiberated this demo program on my Aurora system, smsq/e 3.32 mode 4 and it works there as well
I am using smsq/e 3.31 with QPC2, but have never got this to work. I am perhaps hoping that Wolfgang can modify his patch program.
Georgio and Derek also use QPC2 and both have reported it does work for them. I am confused.
It will be interesting to find out how Dilwyn makes out with all this...
Last edited by EmmBee on Thu Mar 22, 2018 10:53 pm, edited 1 time in total.


Derek_Stewart
QL Wafer Drive
Posts: 1026
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: $$external problem

Postby Derek_Stewart » Thu Mar 22, 2018 10:50 pm

Hi,

Emulators I use: QPC2, SMSQmulator, Q-emulator (Registered)

Everything works OK in Q-emulator with Minerva. But with SMSQ/E QLIB_RUN2 is required to add SBASIC PROCedures and FuNctions to the SBASIC commands.

Probably best to use an Overlays with the added Externals, so they can be unloaded.


Regards,

Derek
EmmBee
Bent Pin Expansion Port
Posts: 80
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: $$external problem

Postby EmmBee » Fri Mar 23, 2018 7:54 am

dilwyn wrote:qlrun2.zipTried using QLIB_RUN_bas to modify:

1. "Vanilla" unmodified QLIB_run 3.36
2. QLIB_RUN335_mod
3. QLIB_RUN336_mod

Patched files and short readme_txt attached - let me know if these work and then I can make them available via my website. If anyone knows the status of the qlib_run_bas programs, we may then be able to make those available too.

I notice that both QLib_run335_mod2 and QLib_run336_mod2 do not have any dataspace values, while QLib_run2 does.
Is something wrong here?


User avatar
tofro
QL Wafer Drive
Posts: 1368
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: $$external problem

Postby tofro » Fri Mar 23, 2018 8:51 am

EmmBee wrote:I notice that both QLib_run335_mod2 and QLib_run336_mod2 do not have any dataspace values, while QLib_run2 does.
Is something wrong here?


Just checked. The original QLib_run (as it comes from the 3.33 installer disk) has 4k data space set. The same disk has, however, a BOOT program that simply LBYTES QLib_run (which completely disregards the data space settings).

I can't see why a piece of code that is not an executable job would need data space set up, so I would simply assume it's an unnecessary quirk in QLIB and live happily without that data space setting.

Another fancy quirk is that the original BOOT allocates 2 bytes more than are actually loaded.

Tobias


User avatar
Artificer
ROM Dongle
Posts: 17
Joined: Fri Nov 24, 2017 8:43 am

Re: $$external problem

Postby Artificer » Fri Mar 23, 2018 5:40 pm

Hi EmmBee

Its not an smsq/e problem its a QLib runtimes problem. This morning I checked the FRA() compiled external on QPC2 4.04 smsq/e 3.32. It worked for me there also.

[/quote]I am using smsq/e 3.31 with QPC2, but have never got this to work. I am perhaps hoping that Wolfgang can modify his patch program.
[/quote]

Then I downloaded QLib_run 3.36 mod from Dilwyn's site and tried that. It did not work. The QLib runtimes I use routinely on QPC2 and Q60 and Aurora have been patched for the external bug so long ago I have forgotten. Use the patched version Dilwyn has put on his site and you should not have a problem with this any longer.


EmmBee
Bent Pin Expansion Port
Posts: 80
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: $$external problem

Postby EmmBee » Sun Mar 25, 2018 6:43 pm

Hi Artificer,

Thanks for this. I now have it all working properly.
I can confirm that it now works on QPC2 - great!

EmmBee



Return to “Software & Programming”

Who is online

Users browsing this forum: No registered users and 7 guests