Qdos to SMSQ/E
                               ==============

                     Compatibility toolkit for SuperBASIC


Compatible with Qdos JS+ and Minerva (though not tested!)

SMSQ/E's SBASIC has some 400+ core commands as opposed to Qdos'es 139.
SMSQ/E has some important system extentions built in. These are not only
simple keywords, but fundamental capabilities, most of which require more
than a couple of commands to make them happen.

Here is an overview:

ptr_gen, Pointer Interface      currently V2.06,  13 commands

Wman, Window Manager            currently V2.08,   4 commands

hot_rext, Hotkey facility       currently V2.31,  29 commands

TK2, Extended toolkit           currently V2.32, 138 commands

Home Thing, Home Directory      currently V1.02,   7 commands


Add all of those to Qdos and you get pretty close to the capabilities of
SMSQ/E, although you will still not have things like higher resolutions,
high colour, hard disk driver, TCP/IP capabilities etc, although with more
toolkits and hardware extensions, you can go some of the way.

This toolkit adds some of the "missing" commands to SuperBASIC to plug
some gaps, allowing at least a few more SBASIC, or compiled SBASIC,
programs to run. It doesnt add any new capabilities to Qdos; it just
brings the wiring out to the front of the machine where compiled programs
and SuperBASIC users can access them. The toolkit may be added to over
time, as and when the need arises.

The toolkit comes complete with the source code, so commands may be added
or removed.

Currently, the following commands are included. Further details of use may
be found in the individual directories, or failing that, in the main source
files:


SUSJB           - Suspend a job

        SUSJB job_id, timeout%


OUTLN           - Create a "managed" window

        OUTLN [#ch,] xsize, ysize, xorg, yorg[, xshad, yshad][, move]


QUIT            - Quit program with optional error code

        QUIT [code]


ERT             - Terminate program if error

        ERT code


SCR_XLIM, SCR_YLIM - Get screen dimensions

        scr_size_x = SCR_XLIM [#ch]
        scr_size_y = SCR_YLIM [#ch]


SCR_BASE        - Get screen base address

        scrbase = SCR_BASE [#ch]


SCR_LLEN        - Number of bytes between rows on screen

        llen = SCR_LLEN [#ch]


DISP_TYPE       - Display type 0, 2, 16, 32, 33

        dtype = DISP_TYPE


FDEL            - Delete a file with error return

        er = FDEL(<filename>)


Note that:

1) These commands are not always identical with their SBASIC equivalents;
   just their most common usage is supported. Thus under SBASIC FDEL will
   accept an unquoted filename, while this version requires the
   filename parameter to be a string.

2) Some commands, like QUIT, cannot be used directly in SuperBASIC, but
   compiled jobs may use it, and if the command is not available, such
   compiled jobs may not work properly.

3) A number of commands here dont make much sense: SCR_xxx, DISP_TYPE, but
   they may be used by (compiled) programs designed also to run other
   platforms where they do make sense.

   Note that DISP_TYPE here is a dummy, ie it always returns 0. So if Qdos
   is run on a platform that supports a different disp type (none known at
   this time!) it needs to be set to that disp type and re-assembled, or
   some more intelligent code will need to be added.

4) Some of these commands may appear in TK2 later, in which case they can
   be removed from this toolkit.


Program status
--------------

Some of the code here was lifted out of the SMSQ/E source files and so was
not authored by me. I merely packaged them in a form suitable for this
toolkit. Those bits are © Copyright their respective authors.

pjw, 2019 Aug 02

Conditions of use and DISCLAIMER as per Knoware.no