EDLINE$ - DIY Toolkit

Anything QL Software or Programming Related.
Post Reply
User avatar
Andrew
Aurora
Posts: 795
Joined: Tue Jul 17, 2018 9:10 pm

EDLINE$ - DIY Toolkit

Post by Andrew »

The Superbasic Online Manual says "You need a special version of EDLINE$ to work correctly on Minerva and SMS. This version is included with the DIY Toolkit package."
In DIT there are 2 versions of edline: edline_code and edline_minerva_code
Edline_code doesn't work with Minerva or SMSQE
Edline_minerva_code I presume it doesn't work with any other ROMS except Minerva and SMSQ/E

From a compiled program (QLiberator) is there a way to programatically load one or the other?
Would something like this work?

Code: Select all

if ver$='HBA' OR Ver$='JSL1' then
    REMark $$asmb=win1_Edline_Minerva_code,0,TABLE
ELSE
   REMark $$asmb=win1_Edline_code,0,TABLE
End if
I presume that it would not work, as the extensions are linked at compile.
But is there a way to load the proper extension from a compiled program?
Or this can be done only from a BASIC BOOT program?


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: EDLINE$ - DIY Toolkit

Post by mk79 »

Andrew wrote:Edline_code doesn't work with Minerva or SMSQE
Edline_minerva_code I presume it doesn't work with any other ROMS except Minerva and SMSQ/E
I'm pretty sure your presumption is wrong, so the question is moot ;) It's only called this way because it was a rewrite from Lau. It should work on all OSes.


User avatar
Andrew
Aurora
Posts: 795
Joined: Tue Jul 17, 2018 9:10 pm

Re: EDLINE$ - DIY Toolkit

Post by Andrew »

mk79 wrote:
Andrew wrote:Edline_code doesn't work with Minerva or SMSQE
Edline_minerva_code I presume it doesn't work with any other ROMS except Minerva and SMSQ/E
I'm pretty sure your presumption is wrong, so the question is moot ;) It's only called this way because it was a rewrite from Lau. It should work on all OSes.
Thank you Marcel. I'll test it on my JS ROM QL


User avatar
Andrew
Aurora
Posts: 795
Joined: Tue Jul 17, 2018 9:10 pm

Re: EDLINE$ - DIY Toolkit

Post by Andrew »

Edline_minerva_code works with all ROMs as long as I load it with LRESPR
But when I try to include it in the compiled program it crashes when it returns the entered text.
I use Liberator compiler, so I have to add the directive REMark $$asmb$$-Filename, INIT, TABLE
Normally Init is 0 and Table is the offset to the name table (4 bytes before the first proc/fnc name in the binary)
so for Edline this should be:
REMark $$asmb=win1_Edline_minerva_edline_code, 0, 14

I have atteched a zip file with edline and a very short test program.
Can someone please look into it and see if the INIT and TABLE values are ok ?
Thank you
Attachments
edline.zip
(10.15 KiB) Downloaded 72 times


User avatar
dilwyn
Mr QL
Posts: 2761
Joined: Wed Dec 01, 2010 10:39 pm

Re: EDLINE$ - DIY Toolkit

Post by dilwyn »

Looking at the assembler for Minerva_Edline_asm it looks like the directive values should be 0,10 (not 0,14) - the number of bytes to the dc.w 0,0 from the start of the code.

If nobody's confirmed this when I get back a bit later, I'll look into it in more detail, as I'm not 100% sure.

Also, I don't know without looking at the manual if the asmb directive will allow a long filename like that, and whether or not it can accept spaces in the parameters (need to check when I get back). I hope I'm wrong on that.


User avatar
Andrew
Aurora
Posts: 795
Joined: Tue Jul 17, 2018 9:10 pm

Re: EDLINE$ - DIY Toolkit

Post by Andrew »

Thank you Dilwyn - it works


Post Reply