A bit of an update.
The BASIC error was caused by a typo on my part, rather than a problem with the decompile. That got the compile to work.
The next problem, was that when I EXEC the resulting object I got a Qliberator error, something about an undefined variable. That turned out to be CMD$. I had to identify the variable in the source code, and rename it CMD$.
Next, When I EXECed the the program (The one that compiled itself, and one compiled with the original QLiberator) I could not select any of the input boxes, or buttons. This turned out to be because I had the WINDS selected during compile, which seems to stop the pointer interface bits working.
At the moment, I think the recompiled QLIB is maybe 10 bytes shorter that the original, The dataspace maybe 32 bytes bigger. If I use QLIB_PATCH, it reports the number of channels as 10, when it should be 9. When you use a compiler directive of $$chan= Should it be 1 less than the number you want, to allow for channel 0?
There is one other odd thing I have noticed when comparing the original QLIB with my recompiled one's. There is a bit of data stored between the end of name list, and the start of the name/variable table
This is the start of the program, note the something odd???
Code: Select all
00282A70 60000082 bra $00282AF4 `...
00282A74 00004AFB ori.b #$FB,d0 ..J.
00282A78 0009 ILLEGAL INSTRUCTION ..
00282A7A 516C6962 subq.w #$08,$6962(a4) Qlib
00282A7E 5F332E33 subq.b #$07,$33(a3,d2.l) _3.3
00282A82 3620 6
00282A84 2020
00282A86 2020
00282A88 2020
00282A8A 2020
00282A8C 2020
00282A8E 2020
00282A90 00000146 start of SuperBASIC program 282BB6
00282A94 0000B18C name/variable table 28DBFC
00282A98 00000000 line number table - none
00282A9C 00040000
00282AA0 736E
00282AA2 0009 channels 9
0080 buffer? 128
02000000
00282AAA 1B58 heap size 7000
0394
00282AAE 0330
00282AB0 0000AECA name list 28D93A
00282AB4 00009630 start of extensions 28C0A0
00282AB8 00004FA2 dataspace? 20386
00282ABC 0000157C stack? 5500
00282AC0 0001
0000B16C something odd??? 28DBDC
0001
00282AC8 FF00
00282ACA 00000000 ori.b #$00,d0 ....
00282ACE 00000000 ori.b #$00,d0 ....
And this is the something odd. Any one recognize what it may be, and how to incorporate into the compile
Code: Select all
0028DBD4 065F4845 addi.w #$4845,(a7)+ ._HE
0028DBD8 4C50 ILLEGAL INSTRUCTION LP
0028DBDA 4600 not.b d0 F.
end of name list
something odd
0028DBDC 00000000 ori.b #$00,d0 ....
0028DBE0 00020010 ori.b #$10,d2 ....
0028DBE4 04 514C494200 "QLIB"
0028DBEA 00000000 ori.b #$00,d0 ....
0028DBEE 00004E71 ori.b #$71,d0 ..Nq
0028DBF2 283C0000000C move.l #$0000000C,d4 (<....
0028DBF8 6000FD36 bra $0028D930 `..6
name/variable table
0028DBFC 0318 btst d1,(a0)+ ..
0028DBFE 00001800 ori.b #$00,d0 ....
0028DC02 0618000B addi.b #$0B,(a0)+ ....
0028DC06 1800 move.b d0,d4 ..
0028DC08 1118 move.b (a0)+,-(a0) ..
0028DC0A 00181800 ori.b #$00,(a0)+ ....
0028DC0E 1F18 move.b (a0)+,-(a7) ..
0028DC10 00231800 ori.b #$00,-(a3) .#..