The following table gives details of the vectors that fitted into the first half of the QL ROM. They can all be accessed by code, similar to the following :
start move.w UT_CON,a2 ; Fetch the routine address from the vector table ; ; Set parameter registers etc here jsr (a2) ; Call the routine tst.l d0 ; Set the Z flag if all ok beq.s ok ; All worked ok oops ; ; Process errors here ; ; Exit or carry on appropriately ok ; ; Carry on processing here
The following table gives details of the vectors that didn't fit into the first half of the QL ROM. They can all be accessed by code, similar to the following :
start move.w MD_READ,a2 ; Fetch the routine address from the vector table ; ; Set parameter registers etc here jsr $4000(a2) ; Call the routine in the second half of the ROM bra.s oops ; Routine returns here on error. Ignore D0 on return bra.s ok ; Routine returns here on ok. oops ; ; Process errors here ; ; Exit or carry on appropriately ok ; ; Carry on processing here
Vector | QDOS Mnemonic | SMS Mnemonic | Description |
---|---|---|---|
$124 | MD_READ | MD_READ | Read a microdrive sector |
$126 | MD_WRITE | MD_WRITE | Write a microdrive sector |
$128 | MD_VERIN | MD_VERIF | Verify a microdrive sector |
$12A | MD_SECTR | MD_RDHDR | Read a microdrive sector header |
The following are not, to my knowledge, documented anywhere else. I have found these undocumented vectors in various places, not least being a DEA dissassembly of the Superbasic ED command (pre SBasic as ED is different in SBasic). The mnemonics are my own and unless someone complains, I shall not change them.
They can all be accessed by some code, similar to the following :
start move.w SB_SNTX,a2 ; Fetch the routine address from the vector table ; ; Set parameter registers etc here jsr $4000(a2) ; Call the routine in the second half of the ROM
Beware : I am not sure about the return mechanism. It could be an error code in D0.L or it could be a bra.s pair of instructions similar to the MD_XXXX routines. More investigation is required.
Vector | My Mnemonic | Description |
---|---|---|
$12C | SB_SNTX | SuperBasic syntax analyser |
$12E | SB_FSTFC | First syntax table for SuperBasic commands |
$130 | SB_SSTFC | Second syntax table for SuperBasic commands |
$132 | SB_FPCBL | Format a pre-compiled SuperBasic line |
$134 | SB_CMPER | Error when pre-compiling a SuperBasic line |
$136 | SB_SPFBL | Store a pre-compiled SuperBasic line |
$138 | SB_CCBTA | Convert pre-compiled SuperBasic line to ASCII |
There is always one awkward one isn't there ? The following vectored routine is difficult. If the QDOS version is 1.03 or less then call it like this :
start move.w SB_INSTK,a2 ; Fetch the routine address from the vector table ; ; Set parameter registers etc here jsr $4318(a2) ; Call the routine in the second half of the ROM
and if it is greater than 1.03, call it like this :
start move.w SB_INSTK,a2 ; Fetch the routine address from the vector table ; ; Set parameter registers etc here jsr $4000(a2) ; Call the routine in the second 16K of ROM
Beware : I am not sure about the return mechanism. It could be an error code in D0.L or it could be a bra.s pair of instructions similar to the MD_XXXX routines. More investigation is required.
Vector | My Mnemonic | Description |
---|---|---|
$13A | SB_INSTK | Initialise SuperBasic internal stacks |