QLiberator decompiler

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

Re: QLiberator decompiler

Postby Martin_Head » Tue Mar 24, 2020 11:39 am

pjw wrote:I disassembled the start of the object code. I know its unlikely to answer why my program crashed, but it is interesting that V3.36 and V3.36x - which are supposed to be the same program should produce such different results using the identical input (sav) file: Here is the original:
.
.
and here is V3.36x's version (here called V3.37):
.
.
Even the dataspace is different..

If I remember correctly, the data space is worked out by some (what looked at the time) complicated sum.

One of the things I was trying to figure out when I was trying to get an exact copy of the original. Was to try to figure out if there were any compiler directives like REMark $$i and $$f used in the QLIB source. As I thought these could cause differences in the size of the compiled output.

Perhaps I should go back to trying to do this exact copy thing. I stopped mostly because the one time I tried to get Qliberator to compile itself in Qemulator, It took 2 hours. And also I was getting a bit sick of the sight of QLiberator by then. :)
I don't know if speed problem I had was something slowing the system down, or if it was because I only have the shareware version of Qliberator.

On the subject of SMSQ/E being a possible problem. Have you tried using Qemulator with JS ROMs?

I will send you a PM with my email address, in case you want to send me a copy of the problem program.


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

Re: QLiberator decompiler

Postby Martin_Head » Tue Mar 24, 2020 5:53 pm

I had a little look at the two dis-assemblies. At the various pointers

Code: Select all

Offsets from start
336 version         337 version
146      Start of SB program   146
182A   SB Extensions      1828
1B86      Line no list      1B84
25EE      Name list          25EC
2728      Name table      271C

In the 337 version. The SuperBASIC program is 2 bytes shorter, and the Name list is 10 bytes shorter.

Sorry, it's come out a bit wonky, but you get the idea


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

Re: QLiberator decompiler

Postby pjw » Tue Mar 24, 2020 7:19 pm

Martin_Head wrote:I had a little look at the two dis-assemblies. At the various pointers
<>
In the 337 version. The SuperBASIC program is 2 bytes shorter, and the Name list is 10 bytes shorter.

That explains the 12 byte difference in program size.

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). So I reverted to the program that originally displayed the symptoms. Problem is, my program is not Qdos compatible. Furthermore it was rooted in my system, so Ive spent some time detaching it and making it Qdos compatible (which I had ultimately intended anyway). Unfortunately Im out of time today. I'll send you a copy of either that or a more-to-the point test program ASAP.
But dont let that stop anyone reading this from having a go in the meantime!


Per
Be wary of large West-Coast corporations bearing gifts!
- Ancient Trojan proverb

Who is online

Users browsing this forum: No registered users and 5 guests