Page 5 of 6

Re: New QLiberator v3.37

Posted: Sun Apr 05, 2020 10:51 pm
by EmmBee
stevepoole wrote:Would it be possible to allow keywords such as LIST etc to be recognised, to make programs be compatible with, say, QPC2 .
I've looked further into this. The case of LIST and others has already been catered for. These type commands get the message of Warning..Procedure cannot be compiled. There is currently a list of 13 such names. We can now add "ED", "LIBERATE" and "INSTR_CASE".
pjw wrote:Well, theres DIV and MOD for starters: SMSQ/E works on long integers, Qdos on word. But Qlib uses its own internal word-sized routines. Making those long shouldnt hurt.
DIV and MOD currently use integers in QLIB. Changing these to use longs will benefit all platforms. I don't do any assembler coding myself, so I will leave this to others to modify the RUNTIMES module.

Re: New QLiberator v3.37

Posted: Mon Apr 06, 2020 8:10 am
by stevepoole
Hi All,

Here is a function called MOD_ which returns numbers (+/- 999999999), with a test demo. No Division by zero allowed !
Steve

100 ::
110 REMark Huge MODulus, v6apr20
120 :
130 n=2
140 FOR x=-n TO n
150 FOR y=-n TO n
160 IF y<>0
170 a=MOD_(x,y): b=x MOD y
180 PRINT#0, x!y!MOD_(x,y)!!x MOD y,: PAUSE 25
190 IF a<>b: BEEP 32765,8: PAUSE
200 END IF
210 END FOR y
220 END FOR x
230 PRINT#0, MOD_('999999999','123456789')
240 :
250 DEFine FuNction MOD_(nb,md)
260 RETurn nb-(INT(nb/md)*md)
270 END DEFine
280 ::

Re: New QLiberator v3.37

Posted: Thu Apr 09, 2020 8:51 pm
by EmmBee
pjw wrote:I have tried to create a minimalist test program that would end up being compiled differently on 3.36 and 3.37, but to no avail (so far).
Try this one-line program ...

Code: Select all

140 FOR a = 1 TO LEN(word$) : IF word$(a)<>" " THEN EXIT a
Compile this on v3.36, then again on v3.37

Re: New QLiberator v3.37

Posted: Fri Apr 10, 2020 8:07 am
by RalfR
EmmBee wrote:
pjw wrote:I have tried to create a minimalist test program that would end up being compiled differently on 3.36 and 3.37, but to no avail (so far).
Try this one-line program ...

Code: Select all

140 FOR a = 1 TO LEN(word$) : IF word$(a)<>" " THEN EXIT a
Compile this on v3.36, then again on v3.37
I have compiled it under QPC2 with 3.36 and Martin's original decompiled 3.36, same error:
QLib_error.JPG
BTW: would be good, if QLib can say, which variable is undefined.

Now compiled with 3.37:
QLib_error_337.JPG
Makes me wonder..... 10,2 means, it does not recognize the "TO" statement...?

Re: New QLiberator v3.37

Posted: Fri Apr 10, 2020 8:37 am
by EmmBee
On my setup, it just compiles without any error message - on v3.36
Try this instead ...

Code: Select all

100 word$ = "some word"
110 FOR a = 1 TO LEN(word$) : IF word$(a)<>" " THEN EXIT a
Try to compile this both with 3.36 and 3.37

Re: New QLiberator v3.37

Posted: Fri Apr 10, 2020 8:42 am
by RalfR
Just have added 3.37 to my last post...

The different line number...?

Re: New QLiberator v3.37

Posted: Fri Apr 10, 2020 8:45 am
by RalfR
EmmBee wrote:On my setup, it just compiles without any error message - on v3.36
Try this instead ...

Code: Select all

100 word$ = "some word"
110 FOR a = 1 TO LEN(word$) : IF word$(a)<>" " THEN EXIT a
Try to compile this both with 3.36 and 3.37
The same compile error.

Re: New QLiberator v3.37

Posted: Fri Apr 10, 2020 9:26 am
by EmmBee
I've just discovered the error is caused by my skip_Top_Line_Remark routine at line 32492 in v3.37
Besides storing the file position, recording and then restoring the variables sym1%, sym2%, sym3, etc. seems to cure the problem.

I'm currently in the process of checking all the code out for the v3.38 update.
BTW: would be good, if QLib can say, which variable is undefined.
Yes, I agree. I'll add this in.

Re: New QLiberator v3.37

Posted: Fri Apr 10, 2020 9:33 am
by RalfR
EmmBee wrote:I've just discovered the error is caused by my skip_Top_Line_Remark routine at line 32492 in v3.37
Besides storing the file position, recording and then restoring the variables sym1%, sym2%, sym3, etc. seems to cure the problem.

I'm currently in the process of checking all the code out for the v3.38 update.
BTW: would be good, if QLib can say, which variable is undefined.
Yes, I agree. I'll add this in.
Thanks anyway for your effort! :)

Re: New QLiberator v3.37

Posted: Sun Apr 12, 2020 8:57 pm
by EmmBee
I've been reading the Q_Liberator Release Notes for RELEASE 3.31 June 1990. It contains this ...

COMPILER CONFIGURATION

Users who have a copy of the QJump level 1 configurator, config, can now
use this utility to modify the compiler, QLIB_OBJ. The colour sheme and
various compiler defaults including stack, heap, and buffer size can
be configured.

I've tried to use this, but to no avail. It doesn't seem to list any _obj files. Even if I type the name Ram2_Qlib_obj it just reports not found.
Perhaps we should install a more up-to-date MenuConfig, which I believe is freeware?