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?