Page 2 of 4

Re: $$external problem

Posted: Fri Mar 16, 2018 1:11 pm
by Peter
EmmBee wrote:
Peter wrote:
EmmBee wrote:You need to do your tests on a real QL or Q-emuLator, and you will get the expected answers.
Unfortunately, these QLIB externals will not currently work with QPC2.
What is the technical reason for this?
The trouble is apparently caused by QPC2 not recognizing it has been called from the Interpreter's #0.
The code will work if called from another compiled SBASIC Qliberator job, I've just tried this.
So, these QLIB externals do actually work with QPC2, but they currently cannot be used in Interpreted SBASIC.
To me this sounds more like an SMSQ/E than a QPC2 issue. Which OS did you use under Q-emuLator?

Re: $$external problem

Posted: Fri Mar 16, 2018 1:16 pm
by Giorgio Garabello
EmmBee wrote:
Peter wrote:
EmmBee wrote:You need to do your tests on a real QL or Q-emuLator, and you will get the expected answers.
Unfortunately, these QLIB externals will not currently work with QPC2.
What is the technical reason for this?
The trouble is apparently caused by QPC2 not recognizing it has been called from the Interpreter's #0.
The code will work if called from another compiled SBASIC Qliberator job, I've just tried this.
So, these QLIB externals do actually work with QPC2, but they currently cannot be used in Interpreted SBASIC.

EmmBee
So, can be used by an another SBASC compiled program?

Re: $$external problem

Posted: Fri Mar 16, 2018 2:41 pm
by Derek_Stewart
Hi,

I loaded up Q-emulator with Minerva v1.98 and entered the examples in the Qliberator Manual on Page 75.

The compiled programmes: SQUARE_obj, FRA_obj, were LRESPRed on the Minerva v1.98 and worked as expected.

I tried LRESPRing the compiled programmes in SMSQmulator, which gave the same problem as QPC2. Clearly a SMSQ/E problem.

Maybe this should be reported to Wolfgang Lenerz.

Re: $$external problem

Posted: Fri Mar 16, 2018 2:57 pm
by Giorgio Garabello
Derek_Stewart wrote:Hi,

Maybe this should be reported to Wolfgang Lenerz.
mmmmm my english is not so good.
Can you do this for me, please?

Giorgio

Re: $$external problem

Posted: Fri Mar 16, 2018 3:01 pm
by Derek_Stewart
Hi,

I have sent Wolfgang a message with the problems with regards to the Qliberator External compiling.

I think this needs to be fixed, as it is one of the main feature which made me buy QLiberator in 1994.

Re: $$external problem

Posted: Fri Mar 16, 2018 3:04 pm
by Giorgio Garabello
Derek_Stewart wrote:Hi,

I have sent Wolfgang a message with the problems with regards to the Qliberator External compiling.

I think this needs to be fixed, as it is one of the main feature which made me buy QLiberator in 1994.
Thanks!!!

Re: $$external problem

Posted: Fri Mar 16, 2018 5:34 pm
by Artificer
Hi

Sorry to have come to this thread late and 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 as an SBasic function FRA(). Has anyone else tried QL hardware with this problem, could still it be due to an emulation issue?

Cheers

Re: $$external problem

Posted: Mon Mar 19, 2018 1:53 pm
by Giorgio Garabello
Problem solved. Replacing QLIB_RUN with QLIB_RUN_mod336 works perfectly.
Who knows why?

Giorgio

Re: $$external problem

Posted: Mon Mar 19, 2018 3:28 pm
by pjw
Giorgio Garabello wrote:Problem solved. Replacing QLIB_RUN with QLIB_RUN_mod336 works perfectly.
Who knows why?
Somebody did: I found a program called QLib_run_bas. This is the program that creates the patch, and this is what it has to say about the matter:

Code: Select all

100 REMark - This patch allows QLiberator externals to be used with SBASIC Job 0
110 REMark - There seems a possibility of having externals work with SBASIC
120 REMark - daughter Jobs but not only does QLiberator (at least up to V3.36)
130 REMark - assume that all Jobs other than Job 0 are compiled, the external
140 REMark - procedures fetch their parameters from Job 0 regardless of the
150 REMark - calling job. This patch tries to correct that.
It may have been done by Thierry - ?

Re: $$external problem

Posted: Mon Mar 19, 2018 3:45 pm
by dilwyn
There were two BASIC programs included with original SMSQ/Es - QLIB_RUN_bas and Qlibrun_bas, which I think is where the one Per mentioned came from, so might have been by Tony Tebby.

The SMSQ/E manual states:
QLiberators EXTERNals do not work
If you have compiled own porcedures (sic.) and functions using QLiberator, which you want to load using LRESPR, then you have to patch QLIB_RUN and QLIB_obj first to make them work. You will find two BASIC programs with the same name which will do this for you. You should also patch files with already inbuilt EXTERNals.