QL Menu Generator

Anything QL Software or Programming Related.
Martin_Head
Gold Card
Posts: 477
Joined: Tue Dec 17, 2013 1:17 pm

Re: QL Menu Generator

Postby Martin_Head » Wed Oct 23, 2019 11:09 am

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
Super Gold Card
Posts: 557
Joined: Fri Jul 11, 2014 8:44 am
Location: Norway
Contact:

Re: QL Menu Generator

Postby pjw » Wed Oct 23, 2019 12:31 pm

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
Be wary of large West-Coast corporations bearing gifts!
- Ancient Trojan proverb
User avatar
Ralf R.
Trump Card
Posts: 203
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Menu Generator

Postby Ralf R. » Wed Oct 23, 2019 12:47 pm

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.


Martin_Head
Gold Card
Posts: 477
Joined: Tue Dec 17, 2013 1:17 pm

Re: QL Menu Generator

Postby Martin_Head » Thu Oct 24, 2019 11:11 am

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
Ralf R.
Trump Card
Posts: 203
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Menu Generator

Postby Ralf R. » Thu Oct 24, 2019 11:29 am

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.


User avatar
dilwyn
Mr QL
Posts: 1528
Joined: Wed Dec 01, 2010 10:39 pm
Location: Wales
Contact:

Re: QL Menu Generator

Postby dilwyn » Thu Oct 24, 2019 12:14 pm

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.


Dilwyn
All things QL: see www.dilwyn.me.uk
RWAP
RWAP Master
Posts: 2667
Joined: Sun Nov 28, 2010 4:51 pm
Location: Stone, United Kingdom
Contact:

Re: QL Menu Generator

Postby RWAP » Fri Oct 25, 2019 11:40 am

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
Ralf R.
Trump Card
Posts: 203
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Menu Generator

Postby Ralf R. » Fri Oct 25, 2019 1:21 pm

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.


Martin_Head
Gold Card
Posts: 477
Joined: Tue Dec 17, 2013 1:17 pm

Re: QL Menu Generator

Postby Martin_Head » Sat Oct 26, 2019 10:51 am

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
Ralf R.
Trump Card
Posts: 203
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Menu Generator

Postby Ralf R. » Sat Oct 26, 2019 12:15 pm

"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.



Who is online

Users browsing this forum: No registered users and 2 guests