$$external problem

Anything QL Software or Programming Related.
User avatar
Peter
Super Gold Card
Posts: 646
Joined: Sat Jan 22, 2011 8:47 am

Re: $$external problem

Postby Peter » Fri Mar 16, 2018 1:11 pm

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?


User avatar
Giorgio Garabello
Trump Card
Posts: 207
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, ITaly
Contact:

Re: $$external problem

Postby Giorgio Garabello » Fri Mar 16, 2018 1:16 pm

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?


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

Re: $$external problem

Postby Derek_Stewart » Fri Mar 16, 2018 2:41 pm

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.


Regards,

Derek
User avatar
Giorgio Garabello
Trump Card
Posts: 207
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, ITaly
Contact:

Re: $$external problem

Postby Giorgio Garabello » Fri Mar 16, 2018 2:57 pm

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


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

Re: $$external problem

Postby Derek_Stewart » Fri Mar 16, 2018 3:01 pm

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.


Regards,

Derek
User avatar
Giorgio Garabello
Trump Card
Posts: 207
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, ITaly
Contact:

Re: $$external problem

Postby Giorgio Garabello » Fri Mar 16, 2018 3:04 pm

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!!!


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

Re: $$external problem

Postby Artificer » Fri Mar 16, 2018 5:34 pm

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


User avatar
Giorgio Garabello
Trump Card
Posts: 207
Joined: Tue Jun 30, 2015 8:39 am
Location: Turin, ITaly
Contact:

Re: $$external problem

Postby Giorgio Garabello » Mon Mar 19, 2018 1:53 pm

Problem solved. Replacing QLIB_RUN with QLIB_RUN_mod336 works perfectly.
Who knows why?

Giorgio


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

Re: $$external problem

Postby pjw » Mon Mar 19, 2018 3:28 pm

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 - ?


Per
For every complex problem there is an answer that is clear, simple, and wrong.
- H. L. Mencken
User avatar
dilwyn
Mr QL
Posts: 1324
Joined: Wed Dec 01, 2010 10:39 pm
Location: Wales
Contact:

Re: $$external problem

Postby dilwyn » Mon Mar 19, 2018 3:45 pm

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.


Dilwyn
All things QL: see www.dilwyn.me.uk

Return to “Software & Programming”

Who is online

Users browsing this forum: No registered users and 2 guests