tofro wrote:That's interesting.
I have used the following line to include the QLIB extension code (as per the manual on Dilwyn's site, have mislaid my own, like a lot of other things QL....)
Code: Select all
105 REMark $$asmb=win1_ql_qlib_ext,0,10
Does anyone know what might be wrong with that line?
Or could it be your browser picked the binary from some cache? No idea.
Tobias
I use QLiberator 3.36 to compile my programs and that version seems to need $$asmb=win1_ql_qlib_ext,0,12
The first number (0) is address of initialisation routine, no offset required for qlib_ext as it's at the start of the code.
The second number is extensions table address. This is usually 10 or 12, if it uses code like my example below, depending on whether the link-in routine ends with JMP bp.init (in which case 10) or JSR bp.init : RTS (in which case 12).
You can usually see by disassembling the first 10 or 12 bytes whichis needed, it will look like this:
Code: Select all
* $$amb...,0,10
lea exts,a1 ; point to list of extensions
move.w $110,a2 ; bp.init vector
jmp (a2) ; link extensions+retrun to BASIC
* table defining extension here
exts
or
Code: Select all
* $$amb...,0,12
lea exts,a1 ; point to list of extensions
move.w $110,a2 ; bp.init vector
jsr (a2) ; link extensions
rts ; back to BASIC
* table defining extension here
exts
The other possible issue may be that IIRC the $$asmb statements can be case sensitive in some versions of QLiberator, although I can't recall ATM if this just referred to the asmb letters or the filename, i.e. QLiberator may not see $$asmb=win1_ql_qlib_ext,0,12 as being the same as $$ASMB=WIN1_QL_QLIB_EXT,0,12
However. from what I can see by far the likeliest is that you have a version of QLiberator which prefers ...0,12 (rather than ...0,10) for the version of extensions you are using. Disassembling the first 12 bytes would tell you for certain.
As an interesting aside, most programmers of BASIC extensions put the table of extension names and offsets just after the initialisation code. Some DIY toolkit extensions have the table further into the code, then it becomes a bit more of a challenge what to put instead of 10 or 12! I think this arose when programmers of BASIC extensions used Turbo instead of QLib, before George adapted Turbo to allow linked extensions. So the offset was never an issue until you tried to link them to a program with QLib or a George Gwilt version of Turbo!
And a 13K or so difference in file size MAY indicate whether or not the compiler runtimes have been linked into the program or not (i.e. length of QLIB_RUN).