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?
Reverse Disassembley of Compiled Basic
-
- Font of All Knowledge
- Posts: 4682
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
- XorA
- Site Admin
- Posts: 1623
- Joined: Thu Jun 02, 2011 11:31 am
- Location: Shotts, North Lanarkshire, Scotland, UK
Re: Reverse Disassembley of Compiled Basic
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.
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.
-
- RWAP Master
- Posts: 2892
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: Reverse Disassembley of Compiled Basic
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

Of more interest would be the older Supercharged programs, as they have even more problems running on modern systems
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
Re: Reverse Disassembley of Compiled Basic
Especially the one which loads "The Pawn" without master cartridgeRWAP 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

-
- RWAP Master
- Posts: 2892
- Joined: Sun Nov 28, 2010 4:51 pm
- Location: Stone, United Kingdom
- Contact:
Re: Reverse Disassembley of Compiled Basic
The program which loads the Pawn without the master cartridge was written (I think) by part of Ergon Software - Davide Santachiara may well know...
Rich Mellor
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
RWAP Software
RWAP Adventures
SellMyRetro
Retro-Printer Module - add a USB printer to your QL
Also Involved in:
Icephorm
Re: Reverse Disassembley of Compiled Basic
I've got this "version" in 1987. As far as I know the loader was written by an italian guy.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...
- Mr_Navigator
- QL Fanatic
- Posts: 782
- Joined: Mon Dec 13, 2010 11:17 pm
- Location: UK, Essex
- Contact:
Re: Reverse Disassembley of Compiled Basic
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..
-----------------------------------------------------------------------------------
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/
QLick here for the Back 2 the QL Blog http://backtotheql.blogspot.co.uk/
-
- Font of All Knowledge
- Posts: 4682
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: Reverse Disassembley of Compiled Basic
Hi,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..
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.
Regards,
Derek
Derek