DisCharge Turbo/SuperCharge decompiler update

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

DisCharge Turbo/SuperCharge decompiler update

Post by Martin_Head »

For the last few weeks(months), I have been doing an update for this decompiler

I have added support for some more Turbo versions I have acquired.

I have also rewritten a lot of the procedure and function handling, to improve it. So that the program now identifies procedure and function definitions. Giving DEFine PROCedure, and DEFine FuNction. Rather than just creating a generic DEFine PROC/Fun line.

I have tried to make the user interface a bit more user friendly, and made various other small improvements.

I thought it was about time I gave the program a proper version number, rather than just a release date. So this is now going to be Version 1.00

The supplied zip files are Windows zip's, intended for a QPC2 DOS drive. The only file that might be a problem on other systems is the Talent/Quanta assembler/monitor program which has a Qemulator executable header. But I have also supplied a QDOS zipped copy of this file in case you lose the header.
Attachments
DisChargeV100.zip
(774.28 KiB) Downloaded 108 times
DisChargeDocsV100.zip
(1018.29 KiB) Downloaded 117 times


User avatar
NormanDunbar
Forum Moderator
Posts: 2492
Joined: Tue Dec 14, 2010 9:04 am
Location: Buckie, Scotland
Contact:

Re: DisCharge Turbo/SuperCharge decompiler update

Post by NormanDunbar »

Thank you for this work. When I get back to my laptop, I'll be having a play!

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
Martin_Head
Aurora
Posts: 990
Joined: Tue Dec 17, 2013 1:17 pm

Re: DisCharge Turbo/SuperCharge decompiler update

Post by Martin_Head »

Here's another update to the decompiler. This fixes a problem in the SuperCharge decompiler with FOR loops

It was happy with a simple FOR x=1 to 10 STEP 2, but could not handle things like FOR x=1,3 TO 7,10

I'm amazed I have never hit this problem before, I implemented it in the Turbo decompiler, but must have forgotten the SuperCharge one.

I have attached a full update to V1.02, and just the just the files that have changed from V1.00 to V1.02
Attachments
DisChargeDocsV102.zip
(1018.45 KiB) Downloaded 98 times
DisChargeV102.zip
(775.1 KiB) Downloaded 96 times
DisChargeUpdateV102.zip
(254.15 KiB) Downloaded 98 times


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

Re: DisCharge Turbo/SuperCharge decompiler update

Post by pjw »

It looks like a great and solid piece of work! Great detective work too. I guess that was a bit of a challenge.

I just skimmed through some of the docs. The whole thing is too massive to merely take a casual interest in, but I'll know where to find it should I ever need it!

The number of Turboed and SuperCharged programs left to decompile must be an ever diminishing prospect. Any big ones in the pipeline?


Per
I love long walks, especially when they are taken by people who annoy me.
- Fred Allen
Derek_Stewart
Font of All Knowledge
Posts: 4796
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: DisCharge Turbo/SuperCharge decompiler update

Post by Derek_Stewart »

Hi,

I have been disassembling the ICE ROM which is written is assembley language, which I am currently trying to understand the coding. For my own enjoyment... I do not get out much!

I have also been looking at the ICE application software, like ARTICED which is a Supercharge v1.16 compiled basic programme.

I have been asking Martin for help with the discharge of this software, which he has been updating Discharge to deal with Supercharged programmes.

I am learning how to use the software, so early days.


Regards, Derek
Martin_Head
Aurora
Posts: 990
Joined: Tue Dec 17, 2013 1:17 pm

Re: DisCharge Turbo/SuperCharge decompiler update

Post by Martin_Head »

Derek_Stewart wrote: Sun Dec 01, 2024 6:44 pm like ARTICED which is a Supercharge v1.16 compiled basic programme.
This is the program that highlighted the FOR problem. Right after I uploaded the previous update.

I still have some ideas for further improvements, and I could do with doing an update to the Qliberator decompiler. As I have come across some programs compiled with older versions of Qliberator, that are silghty different than the version 3's.

I've spent a lot of time on this latest update, and I could do with a break from staring at it.

As far as programs waiting to be decompiled, I think there is still a lot of comerical stuff that has not been done (like the Digital Precsion stuff). That cannot be released. Some things I have used test the decompilers, but I have not made fully working decompiles of them.


Derek_Stewart
Font of All Knowledge
Posts: 4796
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: DisCharge Turbo/SuperCharge decompiler update

Post by Derek_Stewart »

Hi Martin,

I think the work you have done up to now is tremendous.

I would like to do some work on the decompiling of software, so will have a look at the compiled programmes I have to decompile.


Regards, Derek
User avatar
RalfR
QL Wafer Drive
Posts: 1214
Joined: Fri Jun 15, 2018 8:58 pm

Re: DisCharge Turbo/SuperCharge decompiler update

Post by RalfR »

Hi Martin,

Is the decompiler for Q_Liberator ready to be published? Then Dilwyn could put it on his homepage.


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

Re: DisCharge Turbo/SuperCharge decompiler update

Post by Martin_Head »

RalfR wrote: Thu Jan 09, 2025 5:10 pm Hi Martin,

Is the decompiler for Q_Liberator ready to be published? Then Dilwyn could put it on his homepage.
I have not got around to looking at the Qliberator de-compiler yet (working on another little project at the moment). I plan to stick a version number on it like DisCharge, And I have come across a couple of old Qliberated programs that are a little bit different internally to the ones I have come across so far.

This has highlighted an issue that the later compiled programs I can find the names of any externally loaded SuperBASIC extensions from within the compiled program. But in these older versions, I have to actually load these extensions into BASIC before decompiling. And the de-compiler has to search the actual BASIC name table to find them. At least I think is was something like that, it was a while ago that I was looking at it.


Post Reply