$$external problem

Anything QL Software or Programming Related.
EmmBee
Trump Card
Posts: 240
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: $$external problem

Post by EmmBee »

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
Brittle Membrane
Posts: 120
Joined: Fri Nov 24, 2017 8:43 am

Re: $$external problem

Post by Artificer »

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: 2765
Joined: Sat Jan 22, 2011 6:52 am
Location: Austin, TX
Contact:

Re: $$external problem

Post by Dave »

Uhhh. *giggles*

I just misread this thread as: $exual problem


User avatar
pjw
QL Wafer Drive
Posts: 1286
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: $$external problem

Post by pjw »

Dave wrote:Uhhh. *giggles*

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


Per
dont be happy. worry
- ?
EmmBee
Trump Card
Posts: 240
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: $$external problem

Post by EmmBee »

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
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: $$external problem

Post by Derek_Stewart »

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
Trump Card
Posts: 240
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: $$external problem

Post by EmmBee »

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
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: $$external problem

Post by tofro »

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


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
Artificer
Brittle Membrane
Posts: 120
Joined: Fri Nov 24, 2017 8:43 am

Re: $$external problem

Post by Artificer »

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
Trump Card
Posts: 240
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: $$external problem

Post by EmmBee »

Hi Artificer,

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

EmmBee


Post Reply