1: /*
   2:  * Copyright (c) 1982, 1986 Regents of the University of California.
   3:  * All rights reserved.  The Berkeley software License Agreement
   4:  * specifies the terms and conditions for redistribution.
   5:  *
   6:  *	@(#)tmreg.h	7.1 (Berkeley) 6/5/86
   7:  */
   8: 
   9: /*
  10:  * TM11 controller registers
  11:  */
  12: struct tmdevice {
  13:     u_short tmer;       /* error register, per drive */
  14:     u_short tmcs;       /* control-status register */
  15:     short   tmbc;       /* byte/frame count */
  16:     u_short tmba;       /* address */
  17:     short   tmdb;       /* data buffer */
  18:     short   tmrd;       /* read lines */
  19:     short   tmmr;       /* maintenance register */
  20: #ifdef  AVIV
  21:     short   tmfsr;      /* formatter status reading */
  22: #endif
  23: };
  24: 
  25: #define b_repcnt  b_bcount
  26: #define b_command b_resid
  27: 
  28: /* bits in tmcs */
  29: #define TM_GO       0000001
  30: #define TM_OFFL     0000000     /* offline */
  31: #define TM_RCOM     0000002     /* read */
  32: #define TM_WCOM     0000004     /* write */
  33: #define TM_WEOF     0000006     /* write-eof */
  34: #define TM_SFORW    0000010     /* space forward */
  35: #define TM_SREV     0000012     /* space backwards */
  36: #define TM_WIRG     0000014     /* write with xtra interrecord gap */
  37: #define TM_REW      0000016     /* rewind */
  38: #define TM_SENSE    TM_IE       /* sense (internal to driver) */
  39: 
  40: #define tmreverseop(cmd)        ((cmd)==TM_SREV || (cmd)==TM_REW)
  41: 
  42: /* TM_SNS is a pseudo-op used to get tape status */
  43: #define TM_IE       0000100     /* interrupt enable */
  44: #define TM_CUR      0000200     /* control unit is ready */
  45: #define TM_DCLR     0010000     /* drive clear */
  46: #define TM_D800     0060000     /* select 800 bpi density */
  47: #define TM_ERR      0100000     /* drive error summary */
  48: 
  49: /* bits in tmer */
  50: #define TMER_ILC    0100000     /* illegal command */
  51: #define TMER_EOF    0040000     /* end of file */
  52: #define TMER_CRE    0020000     /* cyclic redundancy error */
  53: #define TMER_PAE    0010000     /* parity error */
  54: #define TMER_BGL    0004000     /* bus grant late */
  55: #define TMER_EOT    0002000     /* at end of tape */
  56: #define TMER_RLE    0001000     /* record length error */
  57: #define TMER_BTE    0000400     /* bad tape error */
  58: #define TMER_NXM    0000200     /* non-existant memory */
  59: #define TMER_SELR   0000100     /* tape unit properly selected */
  60: #define TMER_BOT    0000040     /* at beginning of tape */
  61: #define TMER_CH7    0000020     /* 7 channel tape */
  62: #define TMER_SDWN   0000010     /* gap settling down */
  63: #define TMER_WRL    0000004     /* tape unit write protected */
  64: #define TMER_RWS    0000002     /* tape unit rewinding */
  65: #define TMER_TUR    0000001     /* tape unit ready */
  66: 
  67: #define TMER_BITS   \
  68: "\10\20ILC\17EOF\16CRE\15PAE\14BGL\13EOT\12RLE\11BTE\10NXM\
  69: \7SELR\6BOT\5CH7\4SDWN\3WRL\2RWS\1TUR"
  70: 
  71: #define TMER_HARD   (TMER_ILC|TMER_EOT)
  72: #define TMER_SOFT   (TMER_CRE|TMER_PAE|TMER_BGL|TMER_RLE|TMER_BTE|TMER_NXM)
  73: 
  74: #ifdef  AVIV
  75: /* bits in tmmr (formatter diagnostic reading) */
  76: #define DTS     000000      /* select dead track status */
  77: #   define  DTS_MASK    0xff
  78: 
  79: #define DAB     010000      /* select diagnostic aid bits */
  80: #   define  DAB_MASK        037 /* reject code only */
  81: 
  82: #define RWERR       020000      /* select read-write errors */
  83: #    define RWERR_MASK      01777   /* include bit 9 (MAI) */
  84: #    define RWERR_BITS \
  85: "\10\12MAI\11CRC ERR\10WTMCHK\7UCE\6PART REC\5MTE\3END DATA CHK\
  86: \2VEL ERR\1DIAG MODE"
  87: 
  88: #define DRSENSE     030000      /* select drive sense */
  89: #    define DRSENSE_MASK    0777
  90: #    define DRSENSE_BITS \
  91: "\10\11WRTS\10EOTS\7BOTS\6WNHB\5PROS\4BWDS\3HDNG\2RDYS\1ON LINE"
  92: 
  93: #define CRCF        040000      /* CRC-F Generator */
  94: 
  95: #define FSR_BITS \
  96: "\10\20REJ\17TMS\16OVRN\15DATACHK\14SSC\13EOTS\12WRTS\11ROMPS\10CRERR\
  97: \7ONLS\6BOTS\5HDENS\4BUPER\3FPTS\2REWS\1RDYS"
  98: #endif	AVIV

Defined struct's

tmdevice defined in line 12; used 42 times

Defined macros

CRCF defined in line 93; never used
DAB defined in line 79; used 1 times
DAB_MASK defined in line 80; used 1 times
DRSENSE defined in line 88; used 1 times
DRSENSE_BITS defined in line 90; used 1 times
DRSENSE_MASK defined in line 89; used 1 times
DTS defined in line 76; used 1 times
DTS_MASK defined in line 77; used 2 times
FSR_BITS defined in line 95; used 1 times
RWERR defined in line 82; used 1 times
RWERR_BITS defined in line 84; used 1 times
RWERR_MASK defined in line 83; used 1 times
TMER_BGL defined in line 54; used 1 times
  • in line 72
TMER_BITS defined in line 67; used 2 times
TMER_BOT defined in line 60; used 2 times
TMER_BTE defined in line 57; used 1 times
  • in line 72
TMER_CH7 defined in line 61; never used
TMER_CRE defined in line 52; used 1 times
  • in line 72
TMER_EOF defined in line 51; used 3 times
TMER_EOT defined in line 55; used 2 times
TMER_HARD defined in line 71; used 2 times
TMER_ILC defined in line 50; used 1 times
  • in line 71
TMER_NXM defined in line 58; used 1 times
  • in line 72
TMER_PAE defined in line 53; used 1 times
  • in line 72
TMER_RLE defined in line 56; used 2 times
TMER_RWS defined in line 64; used 1 times
TMER_SDWN defined in line 62; used 4 times
TMER_SELR defined in line 59; used 2 times
TMER_SOFT defined in line 72; used 1 times
TMER_TUR defined in line 65; used 3 times
TMER_WRL defined in line 63; used 1 times
TM_CUR defined in line 44; used 4 times
TM_D800 defined in line 46; used 1 times
TM_DCLR defined in line 45; used 2 times
TM_ERR defined in line 47; used 3 times
TM_GO defined in line 29; used 9 times
TM_IE defined in line 43; used 3 times
TM_OFFL defined in line 30; used 1 times
TM_RCOM defined in line 31; used 3 times
TM_REW defined in line 37; used 7 times
TM_SENSE defined in line 38; used 3 times
TM_SFORW defined in line 34; used 5 times
TM_SREV defined in line 35; used 9 times
TM_WCOM defined in line 32; used 3 times
TM_WEOF defined in line 33; used 4 times
TM_WIRG defined in line 36; used 1 times
b_command defined in line 26; used 11 times
b_repcnt defined in line 25; used 6 times
tmreverseop defined in line 40; used 3 times

Usage of this include

Last modified: 1986-06-05
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1059
Valid CSS Valid XHTML 1.0 Strict