QL Menu Generator

Anything QL Software or Programming Related.
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: QL Menu Generator

Post by Martin_Head »

Ralf R. wrote:I fear, if Wolfgang does not have the SB source, no chance, as the program is compiled with QLiberator.
I'm working on a QLiberator decompiler at the moment. So I may use the program for testing it.

It's still very much in the development stage, but it does throw out a lot of valid SuperBASIC code.


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

Re: QL Menu Generator

Post by pjw »

Martin_Head wrote:I'm working on a QLiberator decompiler at the moment. So I may use the program for testing it.

It's still very much in the development stage, but it does throw out a lot of valid SuperBASIC code.
Great! The one to aim for is Q-Liberator itself, though ;)


Per
dont be happy. worry
- ?
User avatar
RalfR
Aurora
Posts: 871
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Menu Generator

Post by RalfR »

Martin_Head wrote:I'm working on a QLiberator decompiler at the moment. So I may use the program for testing it.

It's still very much in the development stage, but it does throw out a lot of valid SuperBASIC code.
One of the best news of the year! Thank you.

This is one chance to try to take QLiberater itself a bit further.


4E75 7000
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: QL Menu Generator

Post by Martin_Head »

Ralf R. wrote:One of the best news of the year! Thank you.

This is one chance to try to take QLiberater itself a bit further.
I have not actually looked, So is QLiberator, A QLiberated SuperBASIC program?

I looked on Dilwyn's Web site to see if the sources are available, But there was no mention of them. So I guess lost? Or the authors holding them?

At one point I was looking for the source code of the runtime module, or a well commented disassembly.


User avatar
RalfR
Aurora
Posts: 871
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Menu Generator

Post by RalfR »

Martin_Head wrote:
Ralf R. wrote:One of the best news of the year! Thank you.

This is one chance to try to take QLiberater itself a bit further.
I have not actually looked, So is QLiberator, A QLiberated SuperBASIC program?
As far as I know: Yes, self compiled from SuperBASIC.


4E75 7000
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: QL Menu Generator

Post by dilwyn »

Martin_Head wrote:
Ralf R. wrote:One of the best news of the year! Thank you.
This is one chance to try to take QLiberater itself a bit further.
I have not actually looked, So is QLiberator, A QLiberated SuperBASIC program?
I looked on Dilwyn's Web site to see if the sources are available, But there was no mention of them. So I guess lost? Or the authors holding them?
At one point I was looking for the source code of the runtime module, or a well commented disassembly.
Although RWAP tried to get the sources (there was a limited contact with one of the authors) I don't think anyone was ever successful in getting hold of the sources. I'd be only too happy to make them available if they were released.

To be honest, I don't even know if they still exist, it's a long time since the authors were last on the QL scene.


RWAP
RWAP Master
Posts: 2834
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: QL Menu Generator

Post by RWAP »

From memory, the Liberation guys were happy for the sources to be released, but couldn't find them...

So yes - if decompiling works, that would be great


User avatar
RalfR
Aurora
Posts: 871
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Menu Generator

Post by RalfR »

RWAP wrote:So yes - if decompiling works, that would be great
I think, it is a bit more complicated than a Turbo decompiler. I hope, Martin can find out the way, the Runtimes are used in conjunction with the compiled program, a totally different way compared to both the DP compiler. And the runtime system has to be disassembled to understand it all.


4E75 7000
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: QL Menu Generator

Post by Martin_Head »

Ralf R. wrote:I think, it is a bit more complicated than a Turbo decompiler. I hope, Martin can find out the way, the Runtimes are used in conjunction with the compiled program, a totally different way compared to both the DP compiler. And the runtime system has to be disassembled to understand it all.
There are similarities to Turbo, I am reusing parts of the turbo decompiler. And so far I have not needed to delve into the runtime module.

The decompiler has managed to generate this,

Code: Select all

100 
110 OPEN #4,con_100x100a10x10
120 OPEN #5,con_100x100a20x20
130 CLS #4
140 CLS #5
150 PAPER #4,0
160 INK #4,7
170 PAPER #5,4
180 INK #5,0
190 PRINT "hello"
200 PRINT #4,"hello"
210 PRINT #5,100
220 PRINT #5,(20 * 5)
230 PAUSE -1
240 CLOSE #4
250 CLOSE #5
260 PRINT PEEK_L (163876)
270 PRINT PEEK_W (163880)
280 FOR x = 1 TO 5 STEP 1
290 PRINT x,
300 END FOR x
from this original

Code: Select all

100 REMark SuperCharge test program 1
110 OPEN#4,con_100x100a10x10
120 OPEN#5,con_100x100a20x20
130 CLS#4
140 CLS#5
150 PAPER#4,0
160 INK#4,7
170 PAPER#5,4
180 INK#5,0
190 PRINT "hello"
200 PRINT#4,"hello"
210 PRINT#5,100
220 PRINT#5,20*5
230 PAUSE -1
240 CLOSE#4
250 CLOSE#5
260 PRINT PEEK_L(163876)
270 PRINT PEEK_W(163880)
280 FOR x=1 TO 5
290 PRINT x,
300 END FOR x
Don't expect the variable names from the original program to be preserved in the compiled version. Some are, some are not.

There is still a lot of work to do.

I don't want to hijack this thread, so if the forum administrator wants to split of off?


User avatar
RalfR
Aurora
Posts: 871
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Menu Generator

Post by RalfR »

"There are similarities to Turbo, I am reusing parts of the turbo decompiler. And so far I have not needed to delve into the runtime module.

Don't expect the variable names from the original program to be preserved in the compiled version. Some are, some are not."

Perhaps using original variable names is possible, if the QLiberated program was compiled with "Names on", then there are all variables and prc/fn names at the bottom of the compiled program. And in case of the QLib Error window, they are showed, so recognized by the runtime modul (I think...)

"There is still a lot of work to do. "

Take the time you'll need. It is even great! Would be interesting to know, why there is a runtime module and what it does.


4E75 7000
Post Reply