Annotation of cci/sys/vba/cipher.h, revision 1.1.1.1

1.1       root        1: /* get controller attention and start an operation */
                      2: #define CY_ATTENTION(addr) movob(0xff,addr)    /* also known as: GO */
                      3: #define CY_RESET(addr)    CY_ATTENTION(addr+1) /* reset controller */
                      4: #define CYUNIT(d)        (minor(d) & 0xf)
                      5: 
                      6: #define MULTIBUS_SHORT(x) (short)((((x)>>8)&0xff) | (((x)<<8)&0xff00))
                      7: 
                      8: #define        NORMAL_INTERUPT 0x11
                      9: #define        CLEAR_INTERUPT  0x09
                     10: 
                     11: #define        T_NOREWIND      0x80
                     12: 
                     13: 
                     14: /* Tape Parameter Block definitions */
                     15: typedef struct {
                     16:        long            cmd;            /* Command */
                     17:        short           control;        /* Control */
                     18:        short           count;          /* Return count */
                     19:        short           size;           /* Buffer size */
                     20:        short           rec_over;       /* Records/Overrun */
                     21:        char            *data_ptr;      /* Pointer to source/dest */
                     22:        short           status;         /* Status */
                     23:        short           link_ptr[2];    /* Pointer to next parameter block */
                     24: } fmt_tpb;
                     25: 
                     26: /* Controller commands */
                     27: 
                     28: /* Group. I Control status/commands */
                     29: #define        CONFIG  (0x00000000L)   /* configure */
                     30: #define        SET_PA  (0x08000000L)   /* set page */
                     31: #define        NO_OP   (0x20000000L)   /* no operation */
                     32: #define        DRIVE_S (0x28000000L)   /* drive status */
                     33: #define        TAPE_AS (0x74000000L)   /* tape assign */
                     34: #define        DRIVE_R (0x90000000L)   /* drive reset */
                     35: 
                     36: /* Group. II Tape position commands */
                     37: #define        REWD_OV (0x04000000L)   /* rewind overlapped */
                     38: #define        READ_FO (0x1C000000L)   /* read foreign tape */
                     39: #define        REWD_TA (0x34000000L)   /* rewind tape */
                     40: #define        OFF_UNL (0x38000000L)   /* off_line and unload */
                     41: #define        WRIT_FM (0x40000000L)   /* write filemark */
                     42: #define        SERH_FM (0x44000000L)   /* search filemark */
                     43: #define        SRFM_FD (0x44000000L)   /* search filemark forward */
                     44: #define        SRFM_BK (0xC4000000L)   /* search filemark backward */
                     45: #define        SPACE   (0x48000000L)   /* skip record */
                     46: #define        SP_FORW (0x48000000L)   /* space forward */
                     47: #define        SP_BACK (0xC8000000L)   /* space backwords */
                     48: #define        ERASE_F (0x4C000000L)   /* erase fixed length */
                     49: #define        ERASE_T (0x50000000L)   /* erase to end of tape */
                     50: #define        SPAC_FM (0x70000000L)   /* space filemark */
                     51: #define        SP_FM_F (0x70000000L)   /* space filemark forward */
                     52: #define        SP_FM_B (0xC9000000L)   /* space filemark backward */
                     53: #define        SERH_MU (0x94000000L)   /* search multiple filemarks */
                     54: 
                     55: /* Group. III Data transfer commands */
                     56: #define        READ_BU (0x10000000L)   /* read buffered */
                     57: #define        WRIT_BU (0x14000000L)   /* write buffered */
                     58: #define        EDIT_BU (0x18000000L)   /* edit buffered */
                     59: #define        READ_TA (0x2C000000L)   /* read tape */
                     60: #define        WRIT_TA (0x30000000L)   /* write tape */
                     61: #define        EDIT_TA (0x3C000000L)   /* edit tape */
                     62: #define        READ_ST (0x60000000L)   /* read streaming */
                     63: #define        WRIT_ST (0x64000000L)   /* write streaming */
                     64: 
                     65: /* Group. IV Special commands */
                     66: #define        EXCHANG (0x0C000000L)   /* exchange system and tapemaster RAM */
                     67: #define        BLOCK_M (0x80000000L)   /* block move */
                     68: 
                     69: /* Group. V Diagnostic commands */
                     70: #define        TEST_SH (0x54000000L)   /* short memory test */
                     71: #define        TEST_LG (0x58000000L)   /* long memory test */
                     72: #define        TEST_CN (0x5C000000L)   /* controller confidence test */
                     73: #define        TEST_RW (0x68000000L)   /* test read/write timeing */
                     74: 
                     75: 
                     76: /* Control field bit definitions */
                     77: #define        CW_UNIT         (0x000c<<8) /* tape select mask, 2 bit field */
                     78: #define        CW_MAIL         (0x0010<<8) /* mailbox flag */
                     79: #define        CW_INTR         (0x0020<<8) /* interrupt flag */
                     80: #define        CW_LINK         (0x0040<<8) /* link flag */
                     81: #define        CW_LOCK         (0x0080<<8) /* bus lock flag */
                     82: #define        CW_BANK         (0x0100>>8) /* bank select */
                     83: #define        CW_REV          (0x0400>>8) /* reverse flag */
                     84: #define        CW_SPEED        (0x0800>>8) /* speed/density */
                     85: #define            CW_25ips    0
                     86: #define            CW_100ips   (0x0800>>8)
                     87: #define        CW_STREAM       (0x1000>>8) /* continuous */
                     88: #define        CW_WIDTH        (0x8000>>8) /* width */
                     89: #define            CW_8bits    0
                     90: #define            CW_16bits   (0x8000>>8)
                     91: 
                     92: 
                     93: /* Status field bit definitions */
                     94: #define        CS_P    (0x0002<<8)     /* Protected, no write ring */
                     95: #define        CS_FB   (0x0004<<8)     /* formatter busy */
                     96: #define        CS_RDY  (0x0008<<8)     /* drive ready */
                     97: #define        CS_EOT  (0x0010<<8)     /* end of tape detected */
                     98: #define        CS_LP   (0x0020<<8)     /* tape is at load point */
                     99: #define        CS_OL   (0x0040<<8)     /* drive on_line */
                    100: #define        CS_FM   (0x0080<<8)     /* Filemark detected */
                    101: #define        CS_ERm  (0x1F00>>8)     /* Error value mask */
                    102: #define        CS_CR   (0x2000>>8)     /* Controller executed retries */
                    103: #define        CS_CC   (0x4000>>8)     /* Command Completed successfully */
                    104: #define        CS_CE   (0x8000>>8)     /* Command execution has begun */
                    105: 
                    106: 
                    107: /* Error value definitions for CS_ERm field */
                    108: #define        ER_TIMOUT       (0x01)  /* timed out data busy false */
                    109: #define        ER_TIMOUT1      (0x02)  /* data busy false,formatter,ready */
                    110: #define        ER_TIMOUT2      (0x03)  /* time out ready busy false */
                    111: #define        ER_TIMOUT3      (0x04)  /* time out ready busy true */
                    112: #define        ER_TIMOUT4      (0x05)  /* time out data busy true */
                    113: #define        ER_NEX          (0x06)  /* time out memory */
                    114: #define        ER_BLANK        (0X07)  /* blank tape */
                    115: #define        ER_DIAG         (0x08)  /* micro-diagnostic */
                    116: #define        ER_EOT          (0x09)  /* EOT forward, BOT rev. */
                    117: #define        ER_HARD         (0x0A)  /* retry unsuccessful */
                    118: #define        ER_FIFO         (0x0B)  /* FIFO over/under flow */
                    119: #define        ER_PARITY       (0x0D)  /* drive to tapemaster parity error */
                    120: #define        ER_CHKSUM       (0x0E)  /* prom checksum */
                    121: #define        ER_STROBE       (0x0F)  /* time out tape strobe */
                    122: #define        ER_NOTRDY       (0x10)  /* tape not ready */
                    123: #define        ER_PROT         (0x11)  /* write, no enable ring */
                    124: #define        ER_JUMPER       (0x13)  /* missing diagnostic jumper */
                    125: #define        ER_LINK         (0x14)  /* bad link, link inappropriate */
                    126: #define        ER_FM           (0x15)  /* unexpected filemark */
                    127: #define        ER_PARAM        (0x16)  /* bad parameter, byte count ? */
                    128: #define        ER_HDWERR       (0x18)  /* unidentified hardware error */
                    129: #define        ER_NOSTRM       (0x19)  /* streaming terminated */
                    130: 
                    131: 
                    132: /* Channel control block definitions */
                    133: typedef struct {
                    134:        char    ccw;            /* channel control word */
                    135:        char    gate;           /* Tpb access gate */
                    136:        short   tpb_ptr[2];     /* points to first tape parameter block */
                    137: } fmt_ccb;
                    138: 
                    139: #define GATE_OPEN      (char)(0x00)
                    140: #define GATE_CLOSED    (char)(0xFF)
                    141: #define NORMAL_INTERUP 0x11   
                    142: 
                    143: 
                    144: 
                    145: /* System configuration block structrure definitions */
                    146: typedef struct {
                    147:        char    fixed_value;    /* 0x03 fixed value code */
                    148:        char    unused_scb;
                    149:        short   ccb_ptr[2];     /* pointer to ->CHANNEL CONTROL BLOCK */
                    150: } fmt_scb;
                    151: 
                    152: 
                    153: /* System configuration pointer structure definitions */
                    154: typedef struct {
                    155:        char    bus_size;       /* width of system bus 0=8; 1=16 */
                    156:        char    unused_scp;
                    157:        short   scb_ptr[2];     /* pointer to ->SYSTEM CONFIGUREATION BLOCK */
                    158: } fmt_scp;
                    159: 
                    160: #define        _16_BITS        1
                    161: #define        _8_BITS         0
                    162: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.