+/* internal QIC-02 commands */
+#define QIC_RDDATA 0x80 /* read data */
+#define QIC_READFM 0xa0 /* read file mark */
+#define QIC_WRTDATA 0x40 /* write data */
+#define QIC_WRITEFM 0x60 /* write file mark */
+#define QIC_RDSTAT 0xc0 /* read status command */
+#define QIC_REWIND 0x21 /* rewind command (position+bot) */
+#define QIC_FMT11 0x26 /* set format QIC-11 */
+#define QIC_FMT24 0x27 /* set format QIC-24 */
+#define QIC_FMT120 0x28 /* set format QIC-120 */
+#define QIC_FMT150 0x29 /* set format QIC-150 */
+
+/* tape driver flags */
+#define TPINUSE 0x0001 /* tape is already open */
+#define TPREAD 0x0002 /* tape is only open for reading */
+#define TPWRITE 0x0004 /* tape is only open for writing */
+#define TPSTART 0x0008 /* tape must be rewound and reset */
+#define TPRMARK 0x0010 /* read file mark command outstanding */
+#define TPWMARK 0x0020 /* write file mark command outstanding */
+#define TPREW 0x0040 /* rewind command outstanding */
+#define TPEXCEP 0x0080 /* i/o exception flag */
+#define TPVOL 0x0100 /* read file mark or hit end of tape */
+#define TPWO 0x0200 /* write command outstanding */
+#define TPRO 0x0400 /* read command outstanding */
+#define TPWANY 0x0800 /* write command requested */
+#define TPRANY 0x1000 /* read command requested */
+#define TPWP 0x2000 /* write protect error seen */
+#define TPTIMER 0x4000 /* timer() is active */
+#define TPACTIVE 0x8000 /* dma i/o active */