Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
qdosmsq:vectors:start [2009/02/25 15:25] george.gwilt Alter link of vector $EE to that of $EC |
qdosmsq:vectors:start [2010/07/23 15:38] (current) george.gwilt Direct all queue vectors to "SETQ" |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Vectors ====== | ||
+ | |||
+ | |||
+ | 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 | ||
+ | ; ; Set parameter registers etc here | ||
+ | jsr | ||
+ | tst.l | ||
+ | beq.s | ||
+ | |||
+ | oops ; ; Process errors here | ||
+ | ; ; Exit or carry on appropriately | ||
+ | |||
+ | ok ; ; Carry on processing here | ||
+ | </ | ||
+ | |||
+ | ^Vector^QDOS Mnemonic^SMS Mnemonic^Description^ | ||
+ | | $C0 |MM_ALCHP |MEM_ACHP |[[ACHP|Allocate space in the common heap]]| | ||
+ | | $C2 |MM_RECHP |MEM_RCHP |[[RCHP|Release space in the common heap]]| | ||
+ | | $C4 |UT_WINDW |OPW_WIND |[[WIND|Create a window channel]]| | ||
+ | | $C6 |UT_CON |OPW_CON |[[CON|Create a console channel]]| | ||
+ | | $C8 |UT_SCR |OPW_SCR |[[CON|Create a screen channel]]| | ||
+ | | $CA |UT_ERR0 |UT_WERSY |[[WERSY|Print error message on #0]]| | ||
+ | | $CC |UT_ERR |UT_WERMS |[[WERMS|Print error message to any channel]]| | ||
+ | | $CE |UT_MINT |UT_WINT |[[WINT|Print a decimal number to any channel]]| | ||
+ | | $D0 |UT_MTEXT |UT_WTEXT |[[WTEXT|Send a message to a channel]]| | ||
+ | | $D2 |UT_LINK |MEM_LLST |[[LLST|Link an item into a list]]| | ||
+ | | $D4 |UT_UNLNK |MEM_RLST |[[LLST|Unlink an item from a list]]| | ||
+ | | $D6 |UT_CRASH |CV_DATIL |[[DATIL|QDOS - Crashes the QL. SMS - Convert date & time (6 words) into a long integer]]| | ||
+ | | $D8 |MM_ALCHP |MEM_ALHP |[[ALHP|Allocate space from a user heap]]| | ||
+ | | $DA |MM_LNKFR |MEM_REHP |[[REHP|Link free space (back) into a user heap]]| | ||
+ | | $DC |IO_QSET |IOQ_SETQ |[[SETQ|Set up a queue header]]| | ||
+ | | $DE |IO_QTEST |IOQ_TEST |[[SETQ|Test a queue' | ||
+ | | $E0 |IO_QIN |IOQ_PBYT |[[SETQ|Put a byte into a queue]]| | ||
+ | | $E2 |IO_QOUT |IOQ_GBYT |[[SETQ|Get a byte from a queue]]| | ||
+ | | $E4 |IO_QEOF |IOQ_SEOF |[[SETQ|Put EOF marker into a queue]]| | ||
+ | | $E6 |UT_CSTR |UT_CSTR |[[CSTR|Compare two strings]]| | ||
+ | | $E8 |IO_SERQ |IOU_SSQ |[[SSQ|Direct queue handling]]| | ||
+ | | $EA |IO_SERIO |IOU_SSIO |[[SSIO|General I/O handling]]| | ||
+ | | $EC |CN_DATE |CV_ILDAT |[[ILDAT|Get date as a string]]| | ||
+ | | $EE |CN_DAY |CV_ILDAY |[[ILDAT|Get day as a string]]| | ||
+ | | $F0 |CN_FTOD |CV_FPDEC |[[FPDEC|Convert a floating point number to ASCII]]| | ||
+ | | $F2 |CN_ITOD |CV_IWDEC |[[FPDEC|Convert an integer to ASCII]]| | ||
+ | | $F4 |CN_ITOBB |CV_IBBIN |[[FPDEC|Convert binary byte (8 bits) to ASCII]]| | ||
+ | | $F6 |CN_ITOBW |CV_IWBIN |[[FPDEC|Convert binary word (16 bits) to ASCII]]| | ||
+ | | $F8 |CN_ITOBL |CV_ILBIN |[[FPDEC|Convert binary long word (32 bits) to ASCII]]| | ||
+ | | $FA |CN_ITOHB |CV_IBHEX |[[FPDEC|Convert hex byte (8 bits) to ASCII]]| | ||
+ | | $FC |CN_ITOHW |CV_IWHEX |[[FPDEC|Convert hex word (16 bits) to ASCII]]| | ||
+ | | $FE |CN_ITOHL |CV_ILHEX |[[FPDEC|Convert hex long word (32 bits) to ASCII]]| | ||
+ | | $100 |CN_DTOF |CV_DECFP |[[DECFP|Convert ASCII to floating point]]| | ||
+ | | $102 |CN_DTOI |CV_DECIW |[[DECFP|Convert ASCII to word integer]]| | ||
+ | | $104 |CN_BTOIB |CV_BINIB |[[DECFP|Convert ASCII to binary byte (8 bits)]]| | ||
+ | | $106 |CN_BTOIW |CV_BINIW |[[DECFP|Convert ASCII to binary word (16 bits)]]| | ||
+ | | $108 |CN_BTOIL |CV_BINIL |[[DECFP|Convert ASCII to binary long word (32 bits)]]| | ||
+ | | $10A |CN_HTOIB |CV_HEXIB |[[DECFP|Convert ASCII to hex byte (8 bits)]]| | ||
+ | | $10C |CN_HTOIW |CV_HEXIW |[[DECFP|Convert ASCII to hex word (16 bits)]]| | ||
+ | | $10E |CN_HTOIL |CV_HEXIL |[[DECFP|Convert ASCII to hex long word (32 bits)]]| | ||
+ | | $110 |BP_INIT |SB_INIPR |[[INIPR|Add new SuperBasic procedures & functions]]| | ||
+ | | $112 |CA_GTINT |SB_GTINT |[[GTINT|Fetch word integer parameters]]| | ||
+ | | $114 |CA_GTFP |SB_GTFP |[[GTINT|Fetch floating point parameters]]| | ||
+ | | $116 |CA_GTSTR |SB_GTSTR |[[GTINT|Fetch string parameters]]| | ||
+ | | $118 |CA_GTLIN |SB_GTLIN |[[GTINT|Fetch long integer parameters]]| | ||
+ | | $11A |BV_CHRIX |QA_RESRI |[[RESRI|Reserve space on the maths stack]]| | ||
+ | | $11C |RI_EXEC |QA_OP |[[OP|Perform a single maths operation]]| | ||
+ | | $11E |RI_EXECB |QA_MOP |[[OP|Perform a list of maths operations]]| | ||
+ | | $120 |BP_LET |SB_PUTP |[[PUTP|Return a result into a parameter]]| | ||
+ | | $122 |IO_NAME |IOU_DNAM |[[DNAM|Decode a device name]]| | ||
+ | |||
+ | 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 | ||
+ | ; ; Set parameter registers etc here | ||
+ | jsr | ||
+ | bra.s | ||
+ | bra.s | ||
+ | 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|Read a microdrive sector]]| | ||
+ | | $126 |MD_WRITE |MD_WRITE |[[WRITE|Write a microdrive sector]]| | ||
+ | | $128 |MD_VERIN |MD_VERIF |[[VERIF|Verify a microdrive sector]]| | ||
+ | | $12A |MD_SECTR |MD_RDHDR |[[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 | ||
+ | ; ; Set parameter registers etc here | ||
+ | jsr | ||
+ | </ | ||
+ | |||
+ | **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 |[[SNTX|SuperBasic syntax analyser]]| | ||
+ | | $12E |SB_FSTFC |[[FSTFC|First syntax table for SuperBasic commands]]| | ||
+ | | $130 |SB_SSTFC |[[SSTFC|Second syntax table for SuperBasic commands]]| | ||
+ | | $132 |SB_FPCBL |[[FPCBL|Format a pre-compiled SuperBasic line]]| | ||
+ | | $134 |SB_CMPER |[[CMPER|Error when pre-compiling a SuperBasic line]]| | ||
+ | | $136 |SB_SPFBL |[[SPFBL|Store a pre-compiled SuperBasic line]]| | ||
+ | | $138 |SB_CCBTA |[[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 | ||
+ | ; ; Set parameter registers etc here | ||
+ | jsr | ||
+ | </ | ||
+ | and if it is greater than 1.03, call it like this : | ||
+ | < | ||
+ | start | ||
+ | ; ; Set parameter registers etc here | ||
+ | jsr | ||
+ | </ | ||
+ | |||
+ | **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|[[INSTK|Initialise SuperBasic internal stacks]]| | ||
+ | |||