These are the errors codes that QDOS can return from a vectored utility, a Trap or from SuperBasic extensions.
When writing assembler routines, it is always advised to explicitly check the value in D0.L for an error code. This is done quickest using tst.l d0 and then checking the Z flag. Some traps and vectored utilities do not set the Z flag before returning which is why you have to do it.
Value | QDOS Mnemonic | SMS Mnemonic | Description |
---|---|---|---|
-1 | ERR_NC | ERR_NC | Operation not complete |
-2 | ERR_NJ | ERR_IJOB | Not a (valid) job |
-3 | ERR_OM | ERR_IMEM | Out of memory |
-4 | ERR_OR | ERR_ORNG | Out of range |
-5 | ERR_BO | ERR_BFFL | Buffer overflow |
-6 | ERR_NO | ERR_ICHN | Channel not open |
-7 | ERR_NF | ERR_FDNF | File or device not found |
-8 | ERR_EX | ERR_FEX | File already exists |
-9 | ERR_IU | ERR_FDIU | File or device already in use |
-10 | ERR_EF | ERR_EOF | End of file |
-11 | ERR_DF | ERR_DRFL | Drive full |
-12 | ERR_BN | ERR_INAM | Bad device |
-13 | ERR_TE | ERR_TRNS ERR_PRTY | Transmission error Parity error (SMS only) |
-14 | ERR_FF | ERR_FMTF | Format failed |
-15 | ERR_BP | ERR_IPAR | Bad parameter |
-16 | ERR_FE | ERR_MCHK | File error |
-17 | ERR_EX | ERR_IEXP | Expression error |
-18 | ERR_OV | ERR_OVFL | Arithmetic overflow |
-19 | ERR_NI | ERR_NIMP | Not implemented |
-20 | ERR_RO | ERR_RDO | Read only |
-21 | ERR_BL | ERR_ISYN | Bad line of Basic |
-22 | Not a QDOS error code | ERR_RWF | Read/write failed (SMS only) |