Is there a recognised sequence that extensions should be loaded
in? -
i.e. TK2 before Menu_rext.
1. Lightning or Speedscreen (if used)
2. TK2
3. Pointer environment (ptr_gen, wman, hot_rext in that order)
4. menu_rext
5. other extensions
6. after all extensions loaded, HOT_GO to activate hotkey job
7. anything else
Some people might tell you to swap steps 1 and 2 above.
Apart from
Lightning/Speedscreen-TK2-ptr_gen-wman-hot-rext-menu_rext-others in
that order, there is generally no fixed order. Some toolkits might say
in their documentation they have to be loaded before or after specific
extensions, but these are rare and most are just covered by step 7.
Of course, if you are "soft-loading" SMSQ/E (e.g. Gold Card/SGC/Aurora
smsqe on QemuLator), SMSQ/E comes first using a line like IF
VER$<>'HBA' THEN LRESPR SMSQ_REXT to prevent double loading, although
some versions of SMSQ/E were known to check if already present, though
I can't remember which versions. SMSQE includes all TK2 extensions and
pointer environment and Lightning/Speedscreen generally aren't used
with SMSQ/E, so 1 and 2 don't apply for smsq/e and 3 only applies if
installing smsqe.
If this level of question is already covered in some document (book
etc-
"How to write a BOOT program in SuperBASIC"), could someone please
point
me in that direction to save you all re-inventing the wheel with me.
AFAIK, not in any book unless it's in Rich Mellor's big reference
books whose name escapes me right now :-(
A gap in the market for someone to exploit! These days we can publish
"books" electronically as PDFs quite cheaply. There are even sites
like "Lulu" (IIRC) who will do short printrun specialist books for
you.
There's some general PE info on my website at
http://www.dilwyn.me.uk/docs/ptr/index.html though I don't think
there's much specifically about writing PE boot programs.
QL Today have printed countless "My BOOT" type programs which might
help. Find them using Brian Kemmett's QL Today index at
http://www.dilwyn.me.uk/gen/qltoday/qltoday.html
How do I decide which extensions should be LRESPRd and which left
out
without the painstaking method of "leave it out and if the program
doesn't work, add it later"
Generally speaking, look at the program's original BOOT file which
will tell you if it loads specific extensions or not. With a bit of
experience you can look at compiled basic programs in an editor and
see a list of extensions used, and with a little bit more experience
you might be able to find a list of "included" toolkits, those which
have been built in using the $$asmb directive of QLiberator, or the
equivalent Turbo %% directive.
A couple of other tips for boot programs:
1. Don't use extensions in the same boot program as that which loads
them - that work on version AH and JM ROMs. Instead, use the first
program to load and install them. then chain a second program to use
the extension.
2. Keeping a first boot program short and only installing extensions
and defining hotkeys bfore chaining a second program to do the "pretty
screens" etc makes it a lot easier to debug.
3. Use the One-At-A-Time method to debug problems like the ones you've
had - if testing for an extension and it seems to fail, test for a
different extension from another toolkit to see if the problem is
specific to one toolkit or one extension. That way, you can isolate a
problem. If a boot program seems to lock up or crash your machine, add
or remove toolkits one at a time to find out which causes the
problems.
4. LRESPR should not have this problem, but if the boot program uses
RESPR statements, check that they use the right values. a duff respr
statement not allocating enough space might seem to work, but sooner
or later there'll be problems. Generally speaking, the RESPR value is
the same as the FLEN of the toolkit file, although you should check
the toolkit instructions concerned to make doubly sure this is the
case just in case it needs a little extra workspace at the end of the
file (very rare, and not really a good way of doign things).
5. Try to keep the flow of your boot programs logical - my boot
programs tend to just do everything in a simple sequence without much
by way of procedures and functions where I can avoid it. Generally
speaking, that is, of course, sometimes you can't avoid it.
6. Above all, if having problems, mention them here. I've lost count
of how many times I've had help on here and I consider myself a
reasonably experienced user! QL-users is probably the single best
source of help (and quickest) for us in this day and age.
Above all I think John is right here, there is a need for a reference
guide - it's surprising we're at 25-26 years of QLing and there isn't
really a single reference source where all information for modern QL
programming hasn't been thrown into one document!
So: articles on this subject for Quanta mag defnitely welcome! Make
John's day - send him an article!
Dilwyn Jones
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm