Page 1 of 1
Reverse Disassembley of Compiled Basic
Posted: Tue Jun 23, 2015 10:16 am
by Derek_Stewart
Hi,
I have in the past tried at disassemble Qlib and Turbo complied programmes, but quite hard when they are not written in an assembler.
On the Amiga there is a programme called ReSource, which allows reverse disassembly of compiled programmes. Easier on there as the OS uses known libraries...
Could Turbo compiled code be disassembled and the resultant object code be then run through a Turbo re-translator to reconstruct the SuperBasic source code, as source code to Turbo is available and we know how the Turbo libraries work (maybe)?
This maybe good of great benefit to development programme to created which could yield the source code of older programmes that do not run on modern systems.
How would this affect copyrighted compiled programmes?
Re: Reverse Disassembley of Compiled Basic
Posted: Tue Jun 23, 2015 10:37 am
by XorA
All reverse compilers of this type use known patterns to work. Basically you just need to work out what code hunks Turbo creates for what statements then go through the binary pulling out those code hunks back into their original source.
It is a little easier to do this in C as you can leave bits of inline asm where you cannot figure out the original code. Not sure how you would do that in Superbasic.
Re: Reverse Disassembley of Compiled Basic
Posted: Tue Jun 23, 2015 12:10 pm
by RWAP
It would actually be of great help - it does not break the copyright so long as you do not distribute the sources to copyright programs
Of more interest would be the older Supercharged programs, as they have even more problems running on modern systems
Re: Reverse Disassembley of Compiled Basic
Posted: Tue Jun 23, 2015 2:09 pm
by Ralf R.
RWAP wrote:It would actually be of great help - it does not break the copyright so long as you do not distribute the sources to copyright programs
Of more interest would be the older Supercharged programs, as they have even more problems running on modern systems
Especially the one which loads "The Pawn" without master cartridge

Re: Reverse Disassembley of Compiled Basic
Posted: Tue Jun 23, 2015 9:25 pm
by RWAP
The program which loads the Pawn without the master cartridge was written (I think) by part of Ergon Software - Davide Santachiara may well know...
Re: Reverse Disassembley of Compiled Basic
Posted: Wed Jun 24, 2015 4:08 am
by Ralf R.
RWAP wrote:The program which loads the Pawn without the master cartridge was written (I think) by part of Ergon Software - Davide Santachiara may well know...
I've got this "version" in 1987. As far as I know the loader was written by an italian guy.
Re: Reverse Disassembley of Compiled Basic
Posted: Thu Jun 25, 2015 10:26 am
by Mr_Navigator
I have my own SuperBASIC written then Turbo'ed programs that I don't have the original sources for and would like to improve them without reinventing the wheel. This option would be grand..
Re: Reverse Disassembley of Compiled Basic
Posted: Thu Jun 25, 2015 11:20 am
by Derek_Stewart
Mr_Navigator wrote:I have my own SuperBASIC written then Turbo'ed programs that I don't have the original sources for and would like to improve them without reinventing the wheel. This option would be grand..
Hi,
It is always worth looking at existing solutions.
I was going adapt some of the Turbo Source code to reverse compilation process.
I still need to understand the format of the output from the Turbo Parser, I will cross post this is the QL Users list, as George Gwilt may help.