TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page   0

TABLE OF CONTENTS   



   (1)     437  TE16/TU77 FUNCTION DECISION TABLE

   (1)     547  CANCEL I/O ON CHANNEL

   (1)     588  START I/O OPERATION

   (1)     770  WRITE TAPE MARK FUNCTION

   (1)     823  ERASE TAPE FUNCTION

   (1)     879  HOUSEKEEPING FUNCTIONS

   (1)     982  REWIND AND UNLOAD FUNCTIONS

   (1)    1033  SPACING FUNCTIONS

   (1)    1262  READ DATA FORWARD AND WRITECHECK DATA FORWARD F

   (1)    1405  READ DATA REVERSE AND WRITECHECK DATA REVERSE F

   (1)    1548  WRITE DATA FORWARD FUNCTION

   (1)    1614  CHECK FOR FATAL OR RETRIABLE SPACING ERROR

   (1)    1688  TEST FOR REMAINING RETRIES

   (1)    1750  TAPE POSITION LOST

   (1)    1826  FUNCTION COMPLETION COMMON EXIT

   (1)    1914  TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION

   (1)    2406  TE16/TU77 CLASSIFY DRIVE TYPE AND SET PARAMETER

   (1)    2439  TM03-TE16/TU77 REGISTER DUMP ROUTINE

   (1)    2482  TM03-TE16/TU77 TAPE DRIVE INITIALIZATION

   (1)    2528  TM03-TE16/TU77 UNSOLICITED INTERRUPT PROCESSING

   (1)    2559  TM03-TE16/TU77 DRIVE STATUS SAVE ROUTINE

   (1)    2586  TM03-TE16/TU77 SETUP MBA FOR INTERNAL SPACING F

   (1)    2618  TM03-TE16/TU77 SLAVE CONTROLLER INTERRUPT DISPA

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page   1

01                                                                                                                               (1)



                                     0000     1 	.TITLE	TMDRIVER - TM03-TE16/TU77 MAGTAPE DRIVER

                                     0000     2 	.IDENT	/01/

                                     0000     3  

                                     0000     4 ;

                                     0000     5 ; COPYRIGHT (C) 1978

                                     0000     6 ; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

                                     0000     7 ;

                                     0000     8 ; THIS SOFTWARE IS FURNISHED UNDER  A LICENSE FOR USE ONLY  ON  A

                                     0000     9 ; SINGLE COMPUTER SYSTEM AND MAY BE  COPIED ONLY WITH  THE INCLU-

                                     0000    10 ; SION OF  THE  ABOVE  COPYRIGHT NOTICE.  THIS SOFTWARE,  OR  ANY

                                     0000    11 ; OTHER COPIES THEREOF, MAY NOT BE  PROVIDED  OR  OTHERWISE  MADE

                                     0000    12 ; AVAILABLE TO ANY OTHER PERSON EXCEPT  FOR  USE  ON  SUCH SYSTEM

                                     0000    13 ; AND TO  ONE WHO AGREES  TO  THESE LICENSE  TERMS.  TITLE TO AND

                                     0000    14 ; OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

                                     0000    15 ;

                                     0000    16 ; THE INFORMATION IN THIS SOFTWARE  IS  SUBJECT TO CHANGE WITHOUT

                                     0000    17 ; NOTICE AND SHOULD NOT BE CONSTRUED  AS  A COMMITMENT BY DIGITAL

                                     0000    18 ; EQUIPMENT CORPORATION.

                                     0000    19 ;

                                     0000    20 ; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF ITS

                                     0000    21 ; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

                                     0000    22 ;

                                     0000    23 ; D. N. CUTLER 20-JUN-77

                                     0000    24 ;

                                     0000    25 ; TM03-TE16/TU77 MAGTAPE DRIVER

                                     0000    26 ;

                                     0000    27 ; MACRO LIBRARY CALLS

                                     0000    28 ;

                                     0000    29  

                                     0000    30 	$CRBDEF				;DEFINE CRB OFFSETS

                                     0000    31 	$DDBDEF				;DEFINE DDB OFFSETS

                                     0000    32 	$DPTDEF				;DEFINE DPT OFFSETS

                                     0000    33 	$EMBDEF				;DEFINE EMB OFFSETS

                                     0000    34 	$IDBDEF				;DEFINE IDB OFFSETS

                                     0000    35 	$IODEF				;DEFINE I/O FUNCTION CODES

                                     0000    36 	$IRPDEF				;DEFINE IRP OFFSETS

                                     0000    37 	$MBADEF				;DEFINE MBA REGISTER OFFSETS

                                     0000    38 	$MTDEF				;DEFINE MAGTAPE STATUS BITS

                                     0000    39 	$UCBDEF				;DEFINE UCB OFFSETS

                                     0000    40 	$VECDEF				;DEFINE INTERRUPT DISPATCH VECTOR OFFSETS

                                     0000    41 	$WCBDEF				;DEFINE WCB OFFSETS

                                     0000    42  

                                     0000    43 ;

                                     0000    44 ; LOCAL MACROS

                                     0000    45 ;

                                     0000    46 ; CHECK FOR FATAL OR RETRIABLE ERROR

                                     0000    47 ;

                                     0000    48  

                                     0000    49 	.MACRO	CHECK_ERROR

                                     0000    50 		BSBW	CHECK_ERROR

                                     0000    51 	.ENDM	CHECK_ERROR

                                     0000    52  

                                     0000    53 ;

                                     0000    54 ; EXECUTE FUNCTION AND BRANCH ON RETRIABLE ERROR CONDITION

                                     0000    55 ;

                                     0000    56  

                                     0000    57 	.MACRO	EXFUNC BDST,FCODE

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page   2

01                                                                                                                               (1)



                                     0000    58 		.IF NB	FCODE

                                     0000    59 		MOVZBL	#CD'FCODE,R0

                                     0000    60 		.ENDC

                                     0000    61 		BSBW	FEX

                                     0000    62 		.WORD	BDST-.-2

                                     0000    63 	.ENDM	EXFUNC

                                     0000    64  

                                     0000    65 ;

                                     0000    66 ; GENERATE FUNCTION TABLE ENTRY AND CASE TABLE INDEX SYMBOL

                                     0000    67 ;

                                     0000    68  

                                     0000    69 	.MACRO	GENF FCODE

                                     0000    70 		CD'FCODE=.-FTAB

                                     0000    71 		.BYTE	FCODE!MT_CS1_M_GO

                                     0000    72 	.ENDM	GENF

                                     0000    73  

                                     0000    74 ;

                                     0000    75 ; GENERATE ERROR MASK TABLE ENTRY

                                     0000    76 ;

                                     0000    77  

                                     0000    78 	.MACRO	MASK LIST

                                     0000    79 $.$=0

                                     0000    80 	.IRP	X,<LIST>

                                     0000    81 $.$=$.$!MT_ER_M_'X

                                     0000    82 	.ENDM

                                     0000    83 	.WORD	$.$

                                     0000    84 	.ENDM	MASK

                                     0000    85  

                                     0000    86 ;

                                     0000    87 ; TEST IF ANY RETRIES REMAINING

                                     0000    88 ;

                                     0000    89  

                                     0000    90 	.MACRO	TESTR BDST

                                     0000    91 		BSBW	TESTR

                                     0000    92 		.WORD	BDST-.-2

                                     0000    93 	.ENDM	TESTR

                                     0000    94  

                                     0000    95 ;

                                     0000    96 ; LOCAL SYMBOLS

                                     0000    97 ;

                                     0000    98 ; TE16/TU77 MASSBUS REGISTER OFFSETS

                                     0000    99 ;

                                     0000   100  

                                     0000   101 	$DEFINI	MT

                                     0000   102  

                                     0000   103 $DEF	MT_CS1		.BLKL	1	;DRIVE CONTROL REGISTER

                                     0004   104 	_VIELD	MT_CS1,0,<-		; DRIVE CONTROL REGISTER BIT DEFINITIONS

                                     0004   105 		<GO,,M>,-		; GO BIT

                                     0004   106 		<FCODE,5>-		; FUNCTION CODE

                                     0004   107 	>				;

                                     0004   108 $DEF	MT_DS		.BLKL	1	;DRIVE STATUS REGISTER

                                     0008   109 	_VIELD	MT_DS,0,<-		; DRIVE STATUS REGISTER BIT DEFINITIONS

                                     0008   110 		<SLA,,M>,-		; SLAVE ATTENTION

                                     0008   111 		<BOT,,M>,-		; BEGINNING OF TAPE

                                     0008   112 		<TM,,M>,-		; TAPE MARK

                                     0008   113 		<IDB,,M>,-		; IDENTIFICATION BURST

                                     0008   114 		<SDWN,,M>,-		; SLOWING DOWN

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page   3

01                                                                                                                               (1)



                                     0008   115 		<PES,,M>,-		; PHASE ENCODED

                                     0008   116 		<SSC,,M>,-		; SLAVE STATUS CHANGE

                                     0008   117 		<DRY,,M>,-		; DRIVE READY

                                     0008   118 		<DPR,,M>,-		; DRIVE PRESENT

                                     0008   119 		<,1>,-			; RESERVED BIT

                                     0008   120 		<EOT,,M>,-		; END OF TAPE

                                     0008   121 		<WRL,,M>,-		; DRIVE WRITE LOCKED

                                     0008   122 		<MOL,,M>,-		; MEDIUM ONLINE

                                     0008   123 		<PIP,,M>,-		; POSITIONING IN PROGRESS

                                     0008   124 		<ERR,,M>,-		; COMPOSIT ERROR

                                     0008   125 		<ATA,,M>-		; ATTENTION ACTIVE

                                     0008   126 	>				;

                                     0008   127 $DEF	MT_ER		.BLKL	1	;ERROR REGISTER

                                     000C   128 	_VIELD	MT_ER,0,<-		; ERROR REGISTER BIT DEFINITIONS

                                     000C   129 		<ILF,,M>,-		; ILLEGAL FUNCTION

                                     000C   130 		<ILR,,M>,-		; ILLEGAL REGISTER

                                     000C   131 		<RMR,,M>,-		; REGISTER MODIFY REFUSED

                                     000C   132 		<CPAR,,M>,-		; CONTROL BUS PARITY ERROR

                                     000C   133 		<FMT,,M>,-		; FORMAT ERROR

                                     000C   134 		<DPAR,,M>,-		; DATA BUS PARITY ERROR

                                     000C   135 		<INC,0,M>,-		; INCORRECTABLE ERROR (PE)

                                     000C   136 		<VPE,,M>,-		; VERTICLE PARITY ERROR (NRZI)

                                     000C   137 		<PEF,0,M>,-		; FORMAT ERROR (PE)

                                     000C   138 		<LRC,,M>,-		; LONGITUDINAL PARITY ERROR (NRZI)

                                     000C   139 		<NSG,,M>,-		; NONSTANDARD GAP

                                     000C   140 		<FCE,,M>,-		; FRAME COUNT ERROR

                                     000C   141 		<CS,0,M>,-		; CORRECTABLE SKEW (PE)

                                     000C   142 		<ITM,,M>,-		; ILLEGAL TAPE MARK

                                     000C   143 		<NEF,,M>,-		; NONEXECUTABLE FUNCTION

                                     000C   144 		<DTE,,M>,-		; DRIVE TIMING ERROR

                                     000C   145 		<OPI,,M>,-		; OPERATION INCOMPLETE

                                     000C   146 		<UNS,,M>,-		; DRIVE UNSAFE

                                     000C   147 		<COR,0,M>,-		; CORRECTABLE DATA ERROR (PE)

                                     000C   148 		<CRC,,M>,-		; CRC ERROR (NRZI)

                                     000C   149 	>				;

                                     000C   150 $DEF	MT_MR		.BLKL	1	;MAINTENANCE REGISTER

                                     0010   151 $DEF	MT_AS		.BLKL	1	;ATTENTION SUMMARY REGISTER

                                     0014   152 $DEF	MT_FC		.BLKL	1	;FRAME COUNT REGISTER

                                     0018   153 $DEF	MT_DT		.BLKL	1	;DRIVE TYPE REGISTER

                                     001C   154 	_VIELD	MT_DT,0,<-		; DRIVE TYPE REGISTER FIELD DEFINITIONS

                                     001C   155 		<DTN,9>,-		; DRIVE TYPE NUMBER

                                     001C   156 		<,1>,-			; RESERVED BIT

                                     001C   157 		<SPR,,M>,-		; SLAVE PRESENT

                                     001C   158 		<DRQ,,M>,-		; DRIVE REQUEST REQUIRED (ALWAYS 0)

                                     001C   159 		<7CH,,M>,-		; 7-CHANNEL TAPE (ALWAYS 0)

                                     001C   160 		<MOH,,M>,-		; MOVING HEAD (ALWAYS 0)

                                     001C   161 		<TAP,,M>,-		; TAPE DRIVE (ALWAYS 1)

                                     001C   162 	>				;

                                     001C   163 $DEF	MT_CC		.BLKL	1	;CHECK CHARACTER REGISTER

                                     0020   164 $DEF	MT_SN		.BLKL	1	;SERIAL NUMBER REGISTER

                                     0024   165 $DEF	MT_TC		.BLKL	1	;MAGTAPE CONTROL REGISTER

                                     0028   166 	_VIELD	MT_TC,0,<-		; TAPE CONTROL REGISTER FIELD DEFFINITIONS

                                     0028   167 		<SSEL,3>,-		; SLAVE SELECT

                                     0028   168 		<EPAR,1,M>,-		; EVEN PARITY

                                     0028   169 		<FSEL,4,M>,-		; FORMAT SELECT

                                     0028   170 		<DEN,3,M>,-		; DENSITY

                                     0028   171 		<,1>,-			; RESERVED BIT

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page   4

01                                                                                                                               (1)



                                     0028   172 		<EABO,,M>,-		; ENABLE ABORT ON TRANSFER ERROR

                                     0028   173 		<TCW,,M>,-		; TAPE CONTROL WRITE

                                     0028   174 		<FCS,,M>,-		; FRAME COUNT STATUS

                                     0028   175 		<ACCL,,M>,-		; ACCELERATOR

                                     0028   176 	>				;

                                     0028   177  

                                     0028   178 	$DEFEND	MT

                                     0000   179  

                                     0000   180 ;

                                     0000   181 ; DEFINE DEVICE DEPENDENT UNIT CONTROL BLOCK OFFSETS

                                     0000   182 ;

                                     0000   183  

                                     0000   184 	$DEFINI	UCB,GLOBAL

                                     0000   185  

                                     0000   186 	$VIELD	UCB,0,<-		;DEVICE DEPENDENT STATUS BITS

                                     0000   187 		<MT_REWIND,,M>,-	; REWIND IN PROGRESS

                                     0000   188 		<MT_PRVMOL,,M>,-	; PREVIOUS MEDIUM ONLINE STATE

                                     0000   189 		>			;

                                     0000   190  

                           00000084  0000   191 .=UCB$L_DPC+4				;

                                     0084   192  

                                     0084   193 $DEF	UCB$L_MT_SR	.BLKL	1	;SAVED MBA STATUS REGISTER

                                     0088   194 $DEF	UCB$W_MT_DS	.BLKW	1	;SAVED DRIVE STATUS REGISTER

                                     008A   195 $DEF	UCB$W_MT_ER	.BLKW	1	;SAVED DRIVE ERROR REGISTER

                                     008C   196 $DEF	UCB$W_MT_FC	.BLKW	1	;SAVED DRIVE FRAME COUNT REGISTER

                                     008E   197 $DEF	UCB$W_MT_SPACNT	.BLKW	1	;CURRENT SPACING COUNT

                                     0090   198 $DEF	UCB$W_MT_CS1	.BLKW	1	;SAVED DRIVE CONTROL REGISTER

                                     0092   199 $DEF	UCB$W_MT_TC_SAV	.BLKW	1	;SAVED TAPE CONTROL REGISTER

                                     0094   200 $DEF	UCB$L_MT_RECORD	.BLKL	1	;CURRENT TAPE POSITION

                                     0098   201 $DEF	UCB$W_MT_FORCNT	.BLKW	1	;FORWARD SPACE COUNT DURING RETRY

                                     009A   202 $DEF	UCB$W_MT_TC	.BLKW	1	;TAPE CONTROL REGISTER CONTENTS

                                     009C   203  

                                     009C   204 	$DEFEND	UCB

                                     0000   205  

                                     0000   206 ;

                                     0000   207 ; MAXIMUM SPACING ON READ AND WRITECHECK ERRORS

                                     0000   208 ;

                                     0000   209  

                           00000005  0000   210 ERR_SPACING=5				;FIVE RECORDS

                                     0000   211  

                                     0000   212 ;

                                     0000   213 ; HARDWARE FUNCTION CODES

                                     0000   214 ;

                                     0000   215  

                           00000000  0000   216 F_NOP=0*2				;NO OPERATION

                           00000000  0000   217 F_PACKACK=0*2				;PACK ACKNOWLEDGE

                           00000000  0000   218 F_SENSECHAR=0*2				;SENSE TAPE CHARACTERISTICS

                           00000000  0000   219 F_SETCHAR=0*2				;SET TAPE CHARACTERISTICS

                           00000002  0000   220 F_UNLOAD=1*2				;UNLOAD DRIVE

                           00000006  0000   221 F_REWIND=3*2				;REWIND

                           00000008  0000   222 F_DRVCLR=4*2				;DRIVE CLEAR

                           00000010  0000   223 F_READPRESET=8*2			;READ IN PRESET

                           00000014  0000   224 F_ERASE=10*2				;ERASE TAPE

                           00000016  0000   225 F_WRITEMARK=11*2			;WRITE TAPE MARK

                           00000018  0000   226 F_SPCFILFOR=12*2			;SPACE FILE FORWARD

                           0000001A  0000   227 F_SPCFILREV=13*2			;SPACE FILE REVERSE

                           00000018  0000   228 F_SPCRECFOR=12*2			;SPACE RECORD FORWARD

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page   5

01                                                                                                                               (1)



                           0000001A  0000   229 F_SPCRECREV=13*2			;SPACE RECORD REVERSE

                           00000028  0000   230 F_INTSPCFOR=20*2			;INTERNAL SPACE RECORD FORWARD

                           0000002E  0000   231 F_INTSPCREV=23*2			;INTERNAL SPACE RECORD REVERSE

                           00000028  0000   232 F_WRITECHECK=20*2			;WRITE CHECK DATA FORWARD

                           0000002E  0000   233 F_WRITECHECKR=23*2			;WRITE CHECK DATA REVERSE

                           00000030  0000   234 F_WRITE=24*2				;WRITE DATA FORWARD

                           00000030  0000   235 F_WRITEDATA=24*2			;WRITE DATA FORWARD

                           00000038  0000   236 F_READDATA=28*2				;READ DATA FORWARD

                           0000003E  0000   237 F_READDATAR=31*2			;READ DATA REVERSE

                                     0000   238  

                                     0000   239 ;

                                     0000   240 ; MINIMUM RECORD SIZE

                                     0000   241 ;

                                     0000   242  

                           0000000E  0000   243 MIN_RECORD=14				;FOURTEEN BYTES

                                     0000   244  

                                     0000   245 ;

                                     0000   246 ; HARWARE DENSITY DEFINITIONS

                                     0000   247 ;

                                     0000   248  

                           00000003  0000   249 NRZI=3					;800 BPI

                           00000004  0000   250 PE=4					;PHASE ENCODED

                                     0000   251  

                                     0000   252 ;

                                     0000   253 ; ERROR COUNT THRESHOLD BEFORE ALTERNATE RECOVERY ATTEMPTED

                                     0000   254 ;

                                     0000   255  

                           00000008  0000   256 THRESHOLD=8				;EIGHT RETRIES BEFORE ALTERNATE METHOD

                                     0000   257  

                                     0000   258 ;

                                     0000   259 ; LOCAL DATA

                                     0000   260 ;

                                     0000   261 ; DRIVER PROLOGUE TABLE

                                     0000   262 ;

                                     0000   263  

                                     0000   264 	DPTAB	-			;DEFINE DRIVER PROLOGUE TABLE

                                     0000   265 		END=TM_END,-		;END OF DRIVER

                                     0000   266 		FLAGS=DPT$M_SUBCNTRL,-	;INDICATE SUBCONTROLLER

                                     0000   267 		ADAPTER=MBA,-		;ADAPTER TYPE

                                     0000   268 		UCBSIZE=156,-		;UCB SIZE

                                     0000   269 		NAME=TMDRIVER		;DRIVER NAME

                                     001F   270 	DPT_STORE INIT			;CONTROL BLOCK INIT VALUES

                                     001F   271 	DPT_STORE DDB,DDB$L_ACPD,L,<^A\MTA\> ;DEFAULT ACP NAME

                                     0026   272 	DPT_STORE UCB,UCB$B_FIPL,B,8	;FORK IPL

                                     002A   273 	DPT_STORE UCB,UCB$L_DEVCHAR,L,-	;DEVICE CHARACTERISTICS

                                     002A   274 		<DEV$M_FOD-		; FILES ORIENTED

                                     002A   275 		!DEV$M_DIR-		; DIRECTORY STRUCTURED

                                     002A   276 		!DEV$M_AVL-		; AVAILABLE

                                     002A   277 		!DEV$M_ELG-		; ERROR LOGGING ENABLED

                                     002A   278 		!DEV$M_IDV-		; INPUT DEVICE

                                     002A   279 		!DEV$M_ODV-		; OUTPUT DEVICE

                                     002A   280 		!DEV$M_SDI-		; SINGLE DIRECTORY DEVICE

                                     002A   281 		!DEV$M_SQD>		; SEQUENTIAL DEVICE

                                     0031   282 	DPT_STORE UCB,UCB$B_DEVCLASS,B,DC$_TAPE ;DEVICE CLASS

                                     0035   283 	DPT_STORE UCB,UCB$W_DEVBUFSIZ,W,2048 ;DEFAULT BUFFER SIZE

                                     003A   284 	DPT_STORE UCB,UCB$L_DEVDEPEND,W,<^X3C0> ;DEFAULT TAPE PARAMETERS

                                     003F   285 	DPT_STORE UCB,UCB$B_DIPL,B,21	;DEVICE IPL

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page   6

01                                                                                                                               (1)



                                     0043   286 	DPT_STORE UCB,UCB$B_ERTCNT,B,16	;ERROR RETRY COUNT

                                     0047   287 	DPT_STORE UCB,UCB$B_ERTMAX,B,16	;MAX ERROR RETRY COUNT

                                     004B   288 	DPT_STORE UCB,UCB$W_MT_TC,W,<^X3C0> ;DEFAULT TAPE PARAMETERS

                                     0050   289 	DPT_STORE REINIT		;CONTROL BLOCK RE-INIT VALUES

                                     0050   290 	DPT_STORE CRB,CRB$L_INTD+4,D,TM$INT ;INTERRUPT SERVICE ROUTINE ADDRESS

                                     0055   291 	DPT_STORE CRB,CRB$L_INTD+VEC$L_UNITINIT,D,TM_TXXX_INIT ;UNIT INIT

                                     005A   292 	DPT_STORE DDB,DDB$L_DDT,D,TM$DDT ;DDT ADDRESS

                                     005F   293 	DPT_STORE END			;

                           00000001  0000   294 	.MDELETE DPT_STORE

                                     0000   295  

                                     0000   296 ;

                                     0000   297 ; DRIVER DISPATCH TABLE

                                     0000   298 ;

                                     0000   299  

                                     0000   300 	DDTAB	TM,-			;DRIVER DISPATCH TABLE

                                     0000   301 		TM_STARTIO,-		;START I/O OPERATION

                                     0000   302 		TM_UNSOLNT,-		;UNSOLICITED INTERRUPT

                                     0000   303 		TM_FUNCTABLE,-		;FUNCTION DECISION TABLE

                                     0000   304 		TM_CANCELIO,-		;CANCEL I/O ENTRY POINT

                                     0000   305 		TM_REGDUMP,-		;REGISTER DUMP ROUTINE

                                     0000   306 		<<MT_TC+4+MBA$L_BCR+4+8>+<<3+5+1>*4>>,- ;DIAGNOSTIC BUFFER SIZE

                                     0000   307 		<<MT_TC+4+MBA$L_BCR+4+8>+<1*4>+<EMB$L_DV_REGSAV>> ;ERROR BUFFER SIZE

                                     0018   308  

                                     0018   309 ;

                                     0018   310 ; DENSITY CODE TRANSLATION TABLE

                                     0018   311 ;

                                     0018   312 ;	DENSITY CODES ARE TRANSLATED BY TAKING THE FIVE BIT ENCODED DENSITY

                                     0018   313 ;	VALUE, MULTIPLYING BY FOUR TO FORM THE STARTING BIT NUMBER, AND THEN

                                     0018   314 ;	EXTRACTING THE APPROPRIATE DENSITY CODE FROM THE TRANSLATION TABLE.

                                     0018   315 ;

                                     0018   316  

                                     0018   317 DENSITY:				;

                           33343333  0018   318 	.LONG	^X33343333		;DENSITY CODES 0-7

                           33333333  001C   319 	.LONG	^X33333333		;DENSITY CODES 8-15

                           33333333  0020   320 	.LONG	^X33333333		;DENSITY CODES 16-23

                           33333333  0024   321 	.LONG	^X33333333		;DENSITY CODES 24-31

                                     0028   322  

                                     0028   323 ;

                                     0028   324 ; TXXX DRIVE TYPE DESCRIPTOR TABLE

                                     0028   325 ;

                                     0028   326  

                                     0028   327 TM_DTDESC:				;

                               0029  0028   328 	.WORD	^X29			;TE16 45 IPS

                                 00' 002A   329 	.BYTE	DT$_TE16		;

                           00000003  002B   330 TM_DTDESCLEN=.-TM_DTDESC		;LENGTH OF DRIVE TYPE DESCRIPTOR

                               002A  002B   331 	.WORD	^X2A			;TU45 45 IPS

                                 00' 002D   332 	.BYTE	DT$_TU45		;

                               002C  002E   333 	.WORD	^X2C			;TU77 125 IPS

                                 00' 0030   334 	.BYTE	DT$_TU77		;

                               0000  0031   335 	.WORD	0			;END OF TABLE

                           00000036  0033   336 	.BLKB	TM_DTDESCLEN		;SPARE DRIVE TYPE SLOT

                                     0036   337  

                                     0036   338 ;

                                     0036   339 ; HARDWARE I/O FUNCTION CODE TABLE

                                     0036   340 ;

                                     0036   341  

                                     0036   342 FTAB:					;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page   7

01                                                                                                                               (1)



                                     0036   343 	GENF	F_NOP			;NO OPERATION

                                     0037   344 	GENF	F_UNLOAD		;UNLOAD VOLUME

                                     0038   345 	GENF	F_SPCFILFOR		;SPACE FILE FORWARD

                                     0039   346 	GENF	F_REWIND		;REWIND

                                     003A   347 	GENF	F_DRVCLR		;DRIVE CLEAR

                                     003B   348 	GENF	F_SPCFILREV		;SPACE FILE REVERSE

                                     003C   349 	GENF	F_ERASE			;ERASE TAPE

                                     003D   350 	GENF	F_SPCRECREV		;SPACE RECORD REVERSE

                                     003E   351 	GENF	F_PACKACK		;PACK ACKNOWLEDGE

                                     003F   352 	GENF	F_SPCRECFOR		;SPACE RECORD FORWARD

                                     0040   353 	GENF	F_WRITECHECK		;WRITE CHECK FORWARD

                                     0041   354 	GENF	F_WRITEDATA		;WRITE DATA FORWARD

                                     0042   355 	GENF	F_READDATA		;READ DATA FORWARD

                                     0043   356 	GENF	F_WRITECHECKR		;WRITE CHECK REVERSE

                                     0044   357 	GENF	F_WRITE			;WRITE DATA FORWARD

                                     0045   358 	GENF	F_READDATAR		;READ DATA REVERSE

                                     0046   359 	GENF	F_READPRESET		;READ IN PRESET

                                     0047   360 	GENF	F_SETCHAR		;SET TAPE CHARACTERISTICS

                                     0048   361 	GENF	F_SENSECHAR		;SENSE TAPE CHARACTERISTICS

                                     0049   362 	GENF	F_WRITEMARK		;WRITE TAPE MARK

                                     004A   363 	GENF	F_INTSPCFOR		;INTERNAL SPACE RECORD FORWARD

                                     004B   364 	GENF	F_INTSPCREV		;INTERNAL SPACE RECORD REVERSE

                                     004C   365  

                                     004C   366 ;

                                     004C   367 ; FORMAT CODE TRANSLATION TABLE

                                     004C   368 ;

                                     004C   369 ;	FORMAT CODES ARE TRANSLATED BY TAKING THE FOUR BIT ENCODED FORMAT VALUE,

                                     004C   370 ;	MULTIPLYING BY FOUR TO FORM THE STARTING BIT NUMBER, AND THEN EXTRACTING

                                     004C   371 ;	THE APPROPRIATE FORMAT CODE FROM THE TRANSLATION TABLE.

                                     004C   372 ;

                                     004C   373  

                                     004C   374 FORMAT:					;

                           CCCCCCCC  004C   375 	.LONG	^XCCCCCCCC		;FORMAT CODES 0-7

                           CEDCCCCC  0050   376 	.LONG	^XCEDCCCCC		;FORMAT CODES 8-15

                                     0054   377  

                                     0054   378 ;

                                     0054   379 ; FUNCTION TIME OUT TABLE

                                     0054   380 ;

                                     0054   381  

                                     0054   382 TIME_OUT:				;

                           00000000  0054   383 	.LONG	0			;NO OPERATION

                           00000006  0058   384 	.LONG	6			;UNLOAD VOLUME

                           00000258  005C   385 	.LONG	60*10			;SPACE FILE FORWARD

                           000001A4  0060   386 	.LONG	60*7			;REWIND

                           00000000  0064   387 	.LONG	0			;DRIVE CLEAR

                           00000258  0068   388 	.LONG	60*10			;SPACE FILE REVERSE

                           00000006  006C   389 	.LONG	6			;ERASE TAPE

                           00000258  0070   390 	.LONG	60*10			;SPACE RECORD REVERSE

                           00000000  0074   391 	.LONG	0			;PACK ACKNOWLEDGE

                           00000258  0078   392 	.LONG	60*10			;SPACE RECORD FORWARD

                           0000000C  007C   393 	.LONG	12			;WRITE CHECK DATA FORWARD

                           0000000C  0080   394 	.LONG	12			;WRITE DATA FORWARD

                           0000000C  0084   395 	.LONG	12			;READ DATA FORWARD

                           0000000C  0088   396 	.LONG	12			;WRITE CHECK DATA REVERSE

                           0000000C  008C   397 	.LONG	12			;WRITE DATA FORWARD

                           0000000C  0090   398 	.LONG	12			;READ DATA REVERSE

                           000001A4  0094   399 	.LONG	60*7			;READ IN PRESET

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page   8

01                                                                                                                               (1)



                           00000000  0098   400 	.LONG	0			;SET TAPE CHARACTERISTICS

                           00000000  009C   401 	.LONG	0			;SENSE TAPE CHARACTERISITCS

                           00000006  00A0   402 	.LONG	6			;WRITE TAPE MARK

                           0000000C  00A4   403 	.LONG	12			;INTERNAL SPACE RECORD FORWARD

                           0000000C  00A8   404 	.LONG	12			;INTERNAL SPACE RECORD REVERSE

                                     00AC   405  

                                     00AC   406 ;

                                     00AC   407 ; DON'T CARE ERROR MASK TABLE

                                     00AC   408 ;

                                     00AC   409 ; THIS TABLE CONTAINS A MASK OF THE ERROR BITS THAT ARE TO BE IGNORED FOR EACH

                                     00AC   410 ; FUNCTION WHEN EXAMINING THE DRIVE ERROR REGISTER.

                                     00AC   411 ;

                                     00AC   412  

                                     00AC   413 XTAB:					;

                                     00AC   414 	MASK	<FMT,DPAR,INC,PEF,NSG,FCE,CS,DTE,OPI,COR> ;NO-OP

                                     00AE   415 	MASK	<FMT,DPAR,INC,PEF,NSG,FCE,CS,DTE,OPI,COR> ;UNLOAD

                                     00B0   416 	MASK	<FMT,DPAR,INC,PEF,NSG,CS,DTE,COR> ;SPACE FILE FORWARD

                                     00B2   417 	MASK	<FMT,DPAR,INC,PEF,NSG,FCE,CS,DTE,OPI,COR> ;REWIND

                                     00B4   418 	MASK	<FMT,DPAR,INC,PEF,NSG,FCE,CS,NEF,DTE,OPI,COR> ;DRIVE CLEAR

                                     00B6   419 	MASK	<FMT,DPAR,INC,PEF,NSG,CS,DTE,COR> ;SPACE FILE REVERSE

                                     00B8   420 	MASK	<FMT,DPAR,INC,PEF,NSG,FCE,DTE,OPI,COR> ;ERASE

                                     00BA   421 	MASK	<FMT,DPAR,INC,PEF,NSG,CS,DTE,COR> ;SPACE RECORD REVERSE

                                     00BC   422 	MASK	<FMT,DPAR,INC,PEF,NSG,FCE,CS,DTE,OPI,COR> ;PACK ACKNOWLEDGE

                                     00BE   423 	MASK	<FMT,DPAR,INC,PEF,NSG,CS,DTE,COR> ;SPACE RECORD FORWARD

                                     00C0   424 	MASK	<DPAR>			;WRITE CHECK FORWARD

                                     00C2   425 	MASK	<>			;WRITE DATA FORWARD

                                     00C4   426 	MASK	<DPAR>			;READ DATA FORWARD

                                     00C6   427 	MASK	<DPAR>			;WRITE CHECK REVERSE

                                     00C8   428 	MASK	<>			;WRITE DATA FORWARD

                                     00CA   429 	MASK	<DPAR>			;READ DATA REVERSE

                                     00CC   430 	MASK	<FMT,DPAR,INC,PEF,NSG,FCE,CS,DTE,OPI,COR> ;READIN PRESET

                                     00CE   431 	MASK	<FMT,DPAR,INC,PEF,NSG,FCE,CS,DTE,OPI,COR> ;SET CHARACTERISTICS

                                     00D0   432 	MASK	<FMT,DPAR,INC,PEF,NSG,FCE,CS,DTE,OPI,COR> ;SENSE CHARACTERISTICS

                                     00D2   433 	MASK	<FMT,DPAR,FCE,DTE,COR>	;WRITE TAPE MARK

                                     00D4   434 	MASK	<DPAR,INC,PEF,FCE,CS,DTE,COR> ;INTERNAL SPACE RECORD FORWARD

                                     00D6   435 	MASK	<DPAR,INC,PEF,FCE,CS,DTE,COR> ;INTERNAL SPACE RECORD REVERSE

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page   9

01              TE16/TU77 FUNCTION DECISION TABLE                                                                                (1)



                                     00D8   437 	.SBTTL	TE16/TU77 FUNCTION DECISION TABLE

                                     00D8   438 ;+

                                     00D8   439 ; TE16/TU77 FUNCTION DECISION TABLE

                                     00D8   440 ;-

                                     00D8   441  

                                     00D8   442 TM_FUNCTABLE:				;FUNCTION DECISION TABLE

                                     00D8   443 	FUNCTAB	,-			;LEGAL FUNCTIONS

                                     00D8   444 		<NOP,-			;NO OPERATION

                                     00D8   445 		 UNLOAD,-		;UNLOAD VOLUME

                                     00D8   446 		 SPACERECORD,-		;SPACE RECORDS

                                     00D8   447 		 RECAL,-		;RECALIBRATE (REWIND)

                                     00D8   448 		 DRVCLR,-		;DRIVE CLEAR

                                     00D8   449 		 READPRESET,-		;READ IN PRESET

                                     00D8   450 		 PACKACK,-		;PACK ACKNOWLEDGE

                                     00D8   451 		 ERASETAPE,-		;ERASE TAPE

                                     00D8   452 		 SENSECHAR,-		;SENSE TAPE CHARACTERISTICS

                                     00D8   453 		 SETCHAR,-		;SET CHARACTERISTICS

                                     00D8   454 		 SPACEFILE,-		;SPACE FILE

                                     00D8   455 		 WRITECHECK,-		;WRITE CHECK FORWARD

                                     00D8   456 		 WRITEPBLK,-		;WRITE PHYSICAL BLOCK

                                     00D8   457 		 READPBLK,-		;READ PHYSICAL BLOCK

                                     00D8   458 		 WRITEMARK,-		;WRITE TAPE MARK

                                     00D8   459 		 READLBLK,-		;READ LOGICAL BLOCK

                                     00D8   460 		 WRITELBLK,-		;WRITE LOGICAL BLOCK

                                     00D8   461 		 SENSEMODE,-		;SENSE TAPE MODE

                                     00D8   462 		 SETMODE,-		;SET MODE

                                     00D8   463 		 REWIND,-		;REWIND

                                     00D8   464 		 REWINDOFF,-		;REWIND AND SET OFFLINE

                                     00D8   465 		 SKIPRECORD,-		;SKIP RECORDS

                                     00D8   466 		 SKIPFILE,-		;SKIP FILES

                                     00D8   467 		 WRITEOF,-		;WRITE END OF FILE

                                     00D8   468 		 READVBLK,-		;READ VIRTUAL BLOCK

                                     00D8   469 		 WRITEVBLK,-		;WRITE VIRTUAL BLOCK

                                     00D8   470 		 ACCESS,-		;ACCESS FILE AND/OR FIND DIRECTORY ENTRY

                                     00D8   471 		 ACPCONTROL,-		;ACP CONTROL FUNCTION

                                     00D8   472 		 CREATE,-		;CREATE FILE AND/OR CREATE DIRECTORY ENTRY

                                     00D8   473 		 DEACCESS,-		;DEACCESS FILE

                                     00D8   474 		 DELETE,-		;DELETE FILE AND/OR DIRECTORY ENTRY

                                     00D8   475 		 MODIFY,-		;MODIFY FILE ATTRIBUTES

                                     00D8   476 		 MOUNT>			;MOUNT VOLUME

                                     00E0   477 	FUNCTAB	,-			;BUFFERED I/O FUNCTIONS

                                     00E0   478 		<NOP,-			;NO OPERATION

                                     00E0   479 		 UNLOAD,-		;UNLOAD VOLUME

                                     00E0   480 		 SPACERECORD,-		;SPACE RECORDS

                                     00E0   481 		 RECAL,-		;RECALIBRATE (REWIND)

                                     00E0   482 		 DRVCLR,-		;DRIVE CLEAR

                                     00E0   483 		 READPRESET,-		;READ IN PRESET

                                     00E0   484 		 PACKACK,-		;PACK ACKNOWLEDGE

                                     00E0   485 		 ERASETAPE,-		;ERASE TAPE

                                     00E0   486 		 SENSECHAR,-		;SENSE CHARACTERISTICS

                                     00E0   487 		 SETCHAR,-		;SET CHARACTERISTICS

                                     00E0   488 		 SPACEFILE,-		;SPACE FILES

                                     00E0   489 		 WRITEMARK,-		;WRITE TAPE MARK

                                     00E0   490 		 SENSEMODE,-		;SENSE MODE

                                     00E0   491 		 SETMODE,-		;SET MODE

                                     00E0   492 		 REWIND,-		;REWIND

                                     00E0   493 		 REWINDOFF,-		;REWIND AND UNLOAD

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  10

01              TE16/TU77 FUNCTION DECISION TABLE                                                                                (1)



                                     00E0   494 		 SKIPRECORD,-		;SKIP RECORDS

                                     00E0   495 		 SKIPFILE,-		;SKIP FILES

                                     00E0   496 		 WRITEOF,-		;WRITE END OF FILE

                                     00E0   497 		 ACCESS,-		;ACCESS FILE AND/OR FIND DIRECTORY ENTRY

                                     00E0   498 		 ACPCONTROL,-		;ACP CONTROL FUNCTION

                                     00E0   499 		 CREATE,-		;CREATE FILE AND/OR CREATE DIRECTORY ENTRY

                                     00E0   500 		 DEACCESS,-		;DEACCESS FILE

                                     00E0   501 		 DELETE,-		;DELETE FILE AND/OR DIRECTORY ENTRY

                                     00E0   502 		 MODIFY,-		;MODIFY FILE ATTRIBUTES

                                     00E0   503 		 MOUNT>			;MOUNT VOLUME

                                     00E8   504 	FUNCTAB	+ACP$READBLK,-		;READ FUNCTIONS

                                     00E8   505 		<READLBLK,-		;READ LOGICAL BLOCK FORWARD

                                     00E8   506 		 READPBLK,-		;READ PHYSICAL BLOCK FORWARD

                                     00E8   507 		 READVBLK>		;READ VIRTUAL BLOCK

                                     00F4   508 	FUNCTAB	+ACP$WRITEBLK,-		;WRITE FUNCTIONS

                                     00F4   509 		<WRITECHECK,-		;WRITE CHECK FORWARD

                                     00F4   510 		 WRITELBLK,-		;WRITE LOGICAL BLOCK

                                     00F4   511 		 WRITEPBLK,-		;WRITE PHYSICAL BLOCK

                                     00F4   512 		 WRITEVBLK>		;WRITE VIRTUAL BLOCK

                                     0100   513 	FUNCTAB	+ACP$ACCESS,<ACCESS,CREATE> ;ACCESS AND CREATE FILE OR DIRECTORY

                                     010C   514 	FUNCTAB	+ACP$DEACCESS,<DEACCESS> ;DEACCESS FILE

                                     0118   515 	FUNCTAB	+ACP$MODIFY,-		;

                                     0118   516 		<ACPCONTROL,-		;ACP CONTROL FUNCTION

                                     0118   517 		 DELETE,-		;DELETE FILE OR DIRECTORY ENTRY

                                     0118   518 		 MODIFY>		;MODIFY FILE ATTRIBUTES

                                     0124   519 	FUNCTAB	+ACP$MOUNT,<MOUNT>	;MOUNT VOLUME

                                     0130   520 	FUNCTAB	+MT$CHECK_ACCESS,-	;MAGTAPE CHECK ACCESS FUNCTIONS

                                     0130   521 		<ERASETAPE,-		;ERASE TAPE

                                     0130   522 		 WRITEMARK,-		;WRITE TAPE MARK

                                     0130   523 		 WRITEOF>		;WRITE END OF FILE

                                     013C   524 	FUNCTAB	+EXE$ZEROPARM,-		;ZERO PARAMETER FUNCTIONS

                                     013C   525 		<NOP,-			;NO OPERATION

                                     013C   526 		 UNLOAD,-		;UNLOAD VOLUME

                                     013C   527 		 RECAL,-		;RECALIBRATE (REWIND)

                                     013C   528 		 REWIND,-		;REWIND

                                     013C   529 		 REWINDOFF,-		;REWIND AND SET OFFLINE

                                     013C   530 		 DRVCLR,-		;DRIVE CLEAR

                                     013C   531 		 READPRESET,-		;READ IN PRESET

                                     013C   532 		 PACKACK,-		;PACK ACKNOWLEDGE

                                     013C   533 		 ERASETAPE,-		;ERASE TAPE

                                     013C   534 		 SENSECHAR,-		;SENSE TAPE CHARACTERISTICS

                                     013C   535 		 SENSEMODE,-		;SENSE TAPE MODE

                                     013C   536 		 WRITEMARK,-		;WRITE TAPE MARK

                                     013C   537 		 WRITEOF>		;WRITE END OF FILE

                                     0148   538 	FUNCTAB	+EXE$ONEPARM,-		;ONE PARAMETER FUNCTIONS

                                     0148   539 		<SPACERECORD,-		;SPACE RECORDS

                                     0148   540 		 SPACEFILE,-		;SPACE FILES

                                     0148   541 		 SKIPRECORD,-		;SKIP RECORDS

                                     0148   542 		 SKIPFILE>		;SKIP FILES

                                     0154   543 	FUNCTAB	+EXE$SETMODE,-		;SET TAPE CHARACTERISTICS

                                     0154   544 		<SETCHAR,-		;

                                     0154   545 		 SETMODE>		;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  11

01              CANCEL I/O ON CHANNEL                                                                                            (1)



                                     0160   547 	.SBTTL	CANCEL I/O ON CHANNEL

                                     0160   548 ;+

                                     0160   549 ; TM_CANCELIO - CANCEL I/O ON CHANNEL

                                     0160   550 ;

                                     0160   551 ; THIS ROUTINE IS CALLED WHEN THE LAST CHANNEL ASSIGNED TO A DEVICE IS DEASSIGNED,

                                     0160   552 ; THE DEVICE IS DEALLOCATED, AND WHEN THE CANCEL I/O ON CHANNEL SYSTEM SERVICE IS

                                     0160   553 ; EXECUTED.

                                     0160   554 ;

                                     0160   555 ; INPUTS:

                                     0160   556 ;

                                     0160   557 ;	R2 = NEGATIVE CHANNEL NUMBER.

                                     0160   558 ;	R3 = ADDRESS OF CURRENT I/O REQUEST PACKET.

                                     0160   559 ;	R4 = CURRENT PROCESS PCB ADDRESS.

                                     0160   560 ;	R5 = DEVICE UCB ADDRESS.

                                     0160   561 ;

                                     0160   562 ; OUTPUTS:

                                     0160   563 ;

                                     0160   564 ;	IF THE DEVICE IS CURRENTLY BUSY, DOING A REWIND, AND IN A WAITFOR INTERRUPT

                                     0160   565 ;	STATE, THEN THE REWIND FUNCTION IS CANCELLED.

                                     0160   566 ;-

                                     0160   567  

                                     0160   568 TM_CANCELIO:				;CANCEL I/O ON CHANNEL

                 00000000'GF     16  0160   569 	JSB	G^IOC$CANCELIO		;TEST IF FUNCTION SHOULD BE CANCELLED

         58 A5            03     E1  0166   570 	BBC	#UCB$V_CANCEL,UCB$W_STS(R5),30$ ;IF CLR, NO CANCEL PENDING

                          34         016A       

                                     016B   571 	DSBINT				;DISABLE INTERRUPTS

         77 A5            03     91  0171   572 	CMPB	#CDF_REWIND,UCB$B_CEX(R5) ;REWIND IN PROGRESS?

                          06     13  0175   573 	BEQL	10$			;IF EQL YES

         77 A5            10     91  0177   574 	CMPB	#CDF_READPRESET,UCB$B_CEX(R5) ;READIN PRESET?

                          1F     12  017B   575 	BNEQ	20$			;IF NEQ NO

         58 A5            03     B3  017D   576 10$:	BITW	#UCB$M_INT!UCB$M_TIM,UCB$W_STS(R5) ;INTERRUPT OR TIMEOUT EXPECTED?

                          19     13  0181   577 	BEQL	20$			;IF EQL NO

         58 A5            03     AA  0183   578 	BICW	#UCB$M_INT!UCB$M_TIM,UCB$W_STS(R5) ;CLEAR INTERRUPT AND TIMEOUT EXPECTED

         5A A5            01     A8  0187   579 	BISW	#UCB$M_MT_REWIND,UCB$W_DEVSTS(R5) ;SET REWIND IN PROGRESS

                                     018B   580 	SETIPL	UCB$B_FIPL(R5)		;LOWER TO FORK LEVEL

            50       0000'8F     3C  018F   581 	MOVZWL	#SS$_ABORT,R0		;SET ABORT STATUS

                          54     DD  0194   582 	PUSHL	R4			;SAVE CURRENT PROCESS PCB ADDRESS

                          078D   30  0196   583 	BSBW	STSXIT			;FINISH I/O OPERATION

                          54   8ED0  0199   584 	POPL	R4			;RESTORE CURRENT PROCESS PCB ADDRESS

                                     019C   585 20$:	ENBINT				;LOWER TO FORK LEVEL

                                 05  019F   586 30$:	RSB				;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  12

01              START I/O OPERATION                                                                                              (1)



                                     01A0   588 	.SBTTL	START I/O OPERATION

                                     01A0   589 ;+

                                     01A0   590 ; TM_STARTIO - START I/O OPERATION ON DEVICE UNIT

                                     01A0   591 ;

                                     01A0   592 ; THIS ENTRY POINT IS ENTERED TO START AN I/O OPERATION ON A DEVICE UNIT.

                                     01A0   593 ;

                                     01A0   594 ; INPUTS:

                                     01A0   595 ;

                                     01A0   596 ;	R3 = ADDRESS OF I/O PACKET.

                                     01A0   597 ;	R5 = UCB ADDRESS OF DEVICE UNIT.

                                     01A0   598 ;

                                     01A0   599 ; OUTPUTS:

                                     01A0   600 ;

                                     01A0   601 ;	FUNCTION DEPENDENT PARAMETERS ARE STORED IN THE DEVICE UCB, THE ERROR

                                     01A0   602 ;	RETRY COUNT IS RESET, AND THE FUNCTION IS EXECUTED. AT FUNCTION COMPLETION

                                     01A0   603 ;	THE OPERATION IS TERMINATED THROUGH REQUEST COMPLETE.

                                     01A0   604 ;-

                                     01A0   605  

                                     01A0   606 TM_STARTIO:				;START I/O OPERATION

         70 A5         71 A5     90  01A0   607 	MOVB	UCB$B_ERTMAX(R5),UCB$B_ERTCNT(R5) ;INITIALIZE ERROR RETRY COUNT

         7E A5         20 A3     B0  01A5   608 	MOVW	IRP$W_FUNC(R3),UCB$W_FUNC(R5) ;SAVE FUNCTION CODE AND MODIFIERS

       008E C5            01     AE  01AA   609 	MNEGW	#1,UCB$W_MT_SPACNT(R5)	;SET DEFAULT SPACING COUNT

            50         34 A3     D0  01AF   610 	MOVL	IRP$L_MEDIA(R3),R0	;GET PARAMETER LONGWORD

                                     01B3   611  

                                     01B3   612 ;

                                     01B3   613 ; MOVE FUNCTION DEPENDENT PARAMETERS TO UCB

                                     01B3   614 ;

                                     01B3   615  

                          00     EF  01B3   616 	EXTZV	#IRP$V_FCODE,#IRP$S_FCODE,- ;EXTRACT I/O FUNCTION CODE

         20 A3            06         01B5   617 		IRP$W_FUNC(R3),R1	;

                          51         01B8       

            51            02     D1  01B9   618 	CMPL	#IO$_SPACEFILE,R1	;SPACE FILE FUNCTION?

                          26     13  01BC   619 	BEQL	10$			;IF EQL YES

            51            09     D1  01BE   620 	CMPL	#IO$_SPACERECORD,R1	;SPACE RECORD FUNCTION?

                          31     13  01C1   621 	BEQL	20$			;IF EQL YES

            51            1A     D1  01C3   622 	CMPL	#IO$_SETCHAR,R1		;SET CHARACTERISTICS FUNCTION?

                          50     13  01C6   623 	BEQL	50$			;IF EQL YES

            51            0D     D1  01C8   624 	CMPL	#IO$_READPBLK+1,R1	;DISJOINT FUNCTION CODE?

                          6E     1A  01CB   625 	BGTRU	100$			;IF GTRU NO

                                     01CD   626 	CASE	R1,<-			;DISPATCH LOGICAL FUNCTIONS

                                     01CD   627 		70$,-			;REWIND AND SET OFFLINE

                                     01CD   628 		60$,-			;SET MODE

                                     01CD   629 		80$,-			;REWIND

                                     01CD   630 		10$,-			;SKIP FILE

                                     01CD   631 		20$,-			;SKIP RECORD

                                     01CD   632 		90$,-			;SENSE TAPE MODE

                                     01CD   633 		90$,-			;WRITE EOF

                                     01CD   634 		>,LIMIT=#IO$_REWINDOFF ;

            51            09     A2  01DF   635 	SUBW	#IO$_READPRESET-IO$_READPBLK-4,R1 ;CONVERT TO DENSE FUNCTION CODE

                          64     11  01E2   636 	BRB	110$			;

                                     01E4   637  

                                     01E4   638 ;

                                     01E4   639 ; SPACE FILE FUNCTION - SET SPACE COUNT AND PROPER FUNCTION

                                     01E4   640 ;

                                     01E4   641  

            51            02     9A  01E4   642 10$:	MOVZBL	#CDF_SPCFILFOR,R1	;SET FOR SPACE FILE FORWARD

                     008E C5     B6  01E7   643 	INCW	UCB$W_MT_SPACNT(R5)	;SET DEFAULT SPACING COUNT TO LARGEST VALUE

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  13

01              START I/O OPERATION                                                                                              (1)



                          50     B5  01EB   644 	TSTW	R0			;SPACE FILE FORWARD?

                          1A     14  01ED   645 	BGTR	40$			;IF GTR YES

            51            05     9A  01EF   646 	MOVZBL	#CDF_SPCFILREV,R1	;SET FOR SPACE FILE REVERSE

                          12     11  01F2   647 	BRB	30$			;

                                     01F4   648  

                                     01F4   649 ;

                                     01F4   650 ; SPACE RECORD FUNCTION - SET SPACE COUNT AND PROPER FUNCTION

                                     01F4   651 ;

                                     01F4   652  

            51            09     9A  01F4   653 20$:	MOVZBL	#CDF_SPCRECFOR,R1	;SET FOR SPACE RECORD FORWARD

       008E C5            50     AE  01F7   654 	MNEGW	R0,UCB$W_MT_SPACNT(R5)	;SET SPACING COUNT

                          0B     19  01FC   655 	BLSS	40$			;IF LSS SPACE FORWARD FUNCTION

            51            07     9A  01FE   656 	MOVZBL	#CDF_SPCRECREV,R1	;SET FOR SPACE RECORD REVERSE

       008E C5            50     B0  0201   657 	MOVW	R0,UCB$W_MT_SPACNT(R5)	;SET SPACING COUNT

            50            50     AE  0206   658 30$:	MNEGW	R0,R0			;CONVERT TO POSITIVE COUNT

         6C A5            50     B0  0209   659 40$:	MOVW	R0,UCB$W_BOFF(R5)	;SET SPACE COUNT

         6E A5            50     B0  020D   660 	MOVW	R0,UCB$W_BCNT(R5)	;SET SPACE COUNT

                          35     12  0211   661 	BNEQ	110$			;IF NEQ SPACING REQUIRED

            51            00     9A  0213   662 	MOVZBL	#CDF_NOP,R1		;SET FOR NO OPERATION

                          30     11  0216   663 	BRB	110$			;

                                     0218   664  

                                     0218   665 ;

                                     0218   666 ; SET CHARACTERISTICS FUNCTION - STORE NEW TAPE CHARACTERISTICS

                                     0218   667 ;

                                     0218   668  

         38 A5         34 A3     B0  0218   669 50$:	MOVW	IRP$L_MEDIA(R3),UCB$B_DEVCLASS(R5) ;SET NEW DEVICE CLASS AND TYPE

                                     021D   670  

                                     021D   671 ;

                                     021D   672 ; SET MODE FUNCTION - STORE NEW TAPE MODE

                                     021D   673 ;

                                     021D   674  

         3A A5         36 A3     B0  021D   675 60$:	MOVW	IRP$L_MEDIA+2(R3),UCB$W_DEVBUFSIZ(R5) ;SET NEW DEFAULT BUFFER SIZE

         6C A5         38 A3     B0  0222   676 	MOVW	IRP$L_MEDIA+4(R3),UCB$W_BOFF(R5) ;SAVE NEW TAPE CONTROL PARAMETERS

            51            11     9A  0227   677 	MOVZBL	#CDF_SETCHAR,R1		;SET FUNCTION DISPATCH INDEX

                          1C     11  022A   678 	BRB	110$			;

                                     022C   679  

                                     022C   680 ;

                                     022C   681 ; LOGICAL REWIND AND SET TAPE OFFLINE - CONVERT TO UNLOAD FUNCTION

                                     022C   682 ;

                                     022C   683  

            51            01     9A  022C   684 70$:	MOVZBL	#CDF_UNLOAD,R1		;SET FOR UNLOAD FUNCTION

                          17     11  022F   685 	BRB	110$			;

                                     0231   686  

                                     0231   687 ;

                                     0231   688 ; LOGICAL REWIND FUNCTION - CONVERT TO PHYSICAL FUNCTION

                                     0231   689 ;

                                     0231   690  

            51            03     9A  0231   691 80$:	MOVZBL	#CDF_REWIND,R1		;SET FOR REWIND FUNCTION

                          12     11  0234   692 	BRB	110$			;

                                     0236   693  

                                     0236   694 ;

                                     0236   695 ; LOGICAL WRITE EOF OR SENSE MODE FUNCTION - CONVERT TO PHYSICAL FUNCTION

                                     0236   696 ;

                                     0236   697  

            51            15     A2  0236   698 90$:	SUBW	#IO$_SENSEMODE-IO$_READPBLK-6,R1 ;CONVERT TO PHYSICAL FUNCTION

                          0D     11  0239   699 	BRB	110$			;

                                     023B   700  

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  14

01              START I/O OPERATION                                                                                              (1)



                                     023B   701 ;

                                     023B   702 ; DENSE FUNCTION CODE - CHECK FOR READ, WRITE, OR WRITECHECK FUNCTION

                                     023B   703 ;

                                     023B   704  

            51            0A     D1  023B   705 100$:	CMPL	#IO$_WRITECHECK,R1	;DATA TRANSFER FUNCTION?

                          08     1A  023E   706 	BGTRU	110$			;IF GTRU NO

         7E A5            06     E1  0240   707 	BBC	#IO$V_REVERSE,UCB$W_FUNC(R5),110$ ;IF CLR, NOT REVERSE FUNCTION

                          03         0244       

            51            03     A0  0245   708 	ADDW	#CDF_WRITECHECKR-CDF_WRITECHECK,R1 ;CONVERT TO REVERSE FUNCTION

                                     0248   709  

                                     0248   710 ;

                                     0248   711 ; FINISH PREPROCESSING

                                     0248   712 ;

                                     0248   713  

         76 A5            51     90  0248   714 110$:	MOVB	R1,UCB$B_FEX(R5)	;SAVE FUNCTION DISPATCH INDEX

                                     024C   715  

                                     024C   716 ;

                                     024C   717 ; CENTRAL FUNCTION DISPATCH

                                     024C   718 ;

                                     024C   719  

                                     024C   720 FDISPATCH:				;FUNCTION DISPATCH

            53         4C A5     D0  024C   721 	MOVL	UCB$L_IRP(R5),R3	;RETRIEVE ADDRESS OF I/O PACKET

         2A A3            08     E0  0250   722 	BBS	#IRP$V_PHYSIO,IRP$W_STS(R3),10$ ;IF SET, PHYSICAL I/O FUNCTION

                          0D         0254       

         58 A5            0B     E0  0255   723 	BBS	#UCB$V_VALID,UCB$W_STS(R5),10$ ;IF SET, VOLUME SOFTWARE VALID

                          08         0259       

            50       0000'8F     3C  025A   724 	MOVZWL	#SS$_VOLINV,R0		;SET VOLUME INVALID STATUS

                          0991   31  025F   725 	BRW	RESETXFR		;

                                     0262   726  

                                     0262   727 ;

                                     0262   728 ; UNIT IS SOFTWARE VALID OR FUNCTION IS PHYSICAL I/O

                                     0262   729 ;

                                     0262   730  

                                     0262   731 10$:	REQPCHAN			;REQUEST PRIMARY I/O CHANNEL

            53            54     D0  0268   732 	MOVL	R4,R3			;SAVE ADDRESS OF TM03/DRIVE REGISTERS

            54         20 A5     D0  026B   733 	MOVL	UCB$L_CRB(R5),R4	;GET ADDRESS OF CRB

            54         10 A4     D0  026F   734 	MOVL	CRB$L_LINK(R4),R4	;GET ADDRESS OF SECONDARY CRB

            54         1C B4     D0  0273   735 	MOVL	@CRB$L_INTD+VEC$L_IDB(R4),R4 ;GET ADDRESS OF MBA CSR

                                     0277   736 20$:	DSBINT				;DISABLE INTERRUPTS

         58 A5            05     E0  027D   737 	BBS	#UCB$V_POWER,UCB$W_STS(R5),30$ ;IF SET, POWER FAILED

                          2E         0281       

         5A A5            00     E1  0282   738 	BBC	#UCB$V_MT_REWIND,UCB$W_DEVSTS(R5),30$ ;IF CLR, NO REWIND IN PROGRESS

                          29         0286       

                                     0287   739 	WFIKPCH	TIMEOUT,#60*7		;WAITFOR REWIND TO COMPLETE

         24 A3       009A C5     3C  0295   740 	MOVZWL	UCB$W_MT_TC(R5),MT_TC(R3) ;SELECT DRIVE

            52         04 A3     D0  029B   741 	MOVL	MT_DS(R3),R2		;READ DRIVE STATUS

            52            0D     E0  029F   742 	BBS	#MT_DS_V_PIP,R2,20$	;IF SET, POSITIONING IN PROGRESS

                          D4         02A2       

            52            01     E1  02A3   743 	BBC	#MT_DS_V_BOT,R2,20$	;IF CLR, NOT AT BEGINNING OF TAPE

                          D0         02A6       

                                     02A7   744 	IOFORK				;CREATE FORK PROCESS

                                     02AD   745 	SAVIPL				;SAVE CURRENT IPL

                                     02B0   746 30$:	ENBINT				;ENABLE INTERRUPTS

            50         76 A5     9A  02B3   747 	MOVZBL	UCB$B_FEX(R5),R0	;GET DISPATCH FUNCTION CODE

                                     02B7   748 	CASE	R0,<-			;DISPATCH TO FUNCTION HANDLING ROUTINE

                                     02B7   749 		NOP,-			;NO OPERATION

                                     02B7   750 		UNLOAD,-		;UNLOAD VOLUME

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  15

01              START I/O OPERATION                                                                                              (1)



                                     02B7   751 		SPCFILFOR,-		;SPACE FILE FORWARD

                                     02B7   752 		REWIND,-		;REWIND

                                     02B7   753 		DRVCLR,-		;DRIVE CLEAR

                                     02B7   754 		SPCFILREV,-		;SPACE FILE REVERSE

                                     02B7   755 		ERASE,-			;ERASE TAPE

                                     02B7   756 		SPCRECREV,-		;SPACE RECORD REVERSE

                                     02B7   757 		PACKACK,-		;PACK ACKNOWLEDGE

                                     02B7   758 		SPCRECFOR,-		;SPACE RECORD FORWARD

                                     02B7   759 		WRITECHECK,-		;WRITE CHECK FORWARD

                                     02B7   760 		WRITEDATA,-		;WRITE DATA FORWARD

                                     02B7   761 		READDATA,-		;READ DATA FORWARD

                                     02B7   762 		WRITECHECKR,-		;WRITE CHECK REVERSE

                                     02B7   763 		WRITEDATA,-		;WRITE DATA FORWARD

                                     02B7   764 		READDATAR,-		;READ DATA REVERSE

                                     02B7   765 		READPRESET,-		;READ IN PRESET

                                     02B7   766 		SETCHAR,-		;SET TAPE CHARACTERISTICS

                                     02B7   767 		SENSECHAR,-		;SENSE TAPE CHARACTERISTICS

                                     02B7   768 		>			;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  16

01              WRITE TAPE MARK FUNCTION                                                                                         (1)



                                     02E1   770 	.SBTTL	WRITE TAPE MARK FUNCTION

                                     02E1   771 ;

                                     02E1   772 ; WRITE TAPE MARK FUNCTION

                                     02E1   773 ;

                                     02E1   774  

                                     02E1   775 WRITEMARK:				;WRITE TAPE MARK

                                     02E1   776 5$:	EXFUNC	10$,F_WRITEMARK		;EXECUTE FUNCTION

                     0094 C5     D6  02E9   777 	INCL	UCB$L_MT_RECORD(R5)	;UPDATE TAPE POSITION

            50            00'    3C  02ED   778 	MOVZWL	S^#SS$_NORMAL,R0	;SET NORMAL COMPLETION STATUS

                          057E   31  02F0   779 	BRW	FUNCXT			;

                                     02F3   780  

                                     02F3   781 ;

                                     02F3   782 ; FUNCTION ENDED IN AN ERROR

                                     02F3   783 ;

                                     02F3   784 ; THE ERROR COULD BE A NONFATAL CONTROLLER OR DRIVE ERROR. FATAL ERRORS TERMINATE

                                     02F3   785 ; THE FUNCTION IN THE FUNCTION EXECUTOR.

                                     02F3   786 ;

                                     02F3   787 ; FATAL CONTROLLER ERRORS ARE:

                                     02F3   788 ;

                                     02F3   789 ;	ERCONF	= ERROR CONFIRMATION.

                                     02F3   790 ;	ISTO	= INTERFACE SEQUENCE TIMEOUT.

                                     02F3   791 ;	PGE	= PROGRAMMING ERROR.

                                     02F3   792 ;	NED	= NONEXISTENT DRIVE.

                                     02F3   793 ;	RDTO	= READ DATA TIMEOUT.

                                     02F3   794 ;

                                     02F3   795 ; FATAL DRIVE ERRORS ARE:

                                     02F3   796 ;

                                     02F3   797 ;	ILF	= ILLEGAL FUNCTION.

                                     02F3   798 ;	ILR	= ILLEGAL REGISTER.

                                     02F3   799 ;	NEF	= NONEXECUTABLE FUNCTION.

                                     02F3   800 ;	RMR	= REGISTER MODIFY REFUSE.

                                     02F3   801 ;	UNS	= UNSAFE.

                                     02F3   802 ;

                                     02F3   803 ; IGNORED DRIVE ERRORS ARE:

                                     02F3   804 ;

                                     02F3   805 ;	FMT	= FORMAT.

                                     02F3   806 ;	DPAR	= DATA BUS PARITY.

                                     02F3   807 ;	FCE	= FRAME COUNT.

                                     02F3   808 ;	DTE	= DRIVE TIMING.

                                     02F3   809 ;	COR/CRC	= CORRECTABLE OR CHECK CHARACTER ERROR.

                                     02F3   810 ;

                                     02F3   811 ; NOTE THAT IT IS ASSUMED THAT MASSBUS EXCEPTION (MBEXC) WILL OCCUR ONLY IN

                                     02F3   812 ; COMBINATION WITH ANOTHER DRIVE OR CONTROLLER ERROR.

                                     02F3   813 ;

                                     02F3   814  

                                     02F3   815 10$:	TESTR	20$			;TEST REMAINING RETRIES

                                     02F8   816 	REQSCHAN			;REQUEST SECONDARY CHANNEL

                                     02FE   817 	EXFUNC	DOUBLE,F_INTSPCREV	;SPACE RECORD REVERSE

                                     0306   818 	RELSCHAN			;RELEASE SECONDARY CHANNEL

         7E A5            0C     E0  030C   819 20$:	BBS	#IO$V_INHEXTGAP,UCB$W_FUNC(R5),30$ ;IF SET, NO EXTENDED GAPS

                          08         0310       

                                     0311   820 	EXFUNC	DOUBLE,F_ERASE		;WRITE EXTENDED INTER-RECORD GAP

                          C6     11  0319   821 30$:	BRB	5$			;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  17

01              ERASE TAPE FUNCTION                                                                                              (1)



                                     031B   823 	.SBTTL	ERASE TAPE FUNCTION

                                     031B   824 ;

                                     031B   825 ; ERASE TAPE FUNCTION

                                     031B   826 ;

                                     031B   827  

                                     031B   828 ERASE:					;ERASE TAPE

                                     031B   829 	EXFUNC	10$			;EXECUTE FUNCTION

            50            00'    3C  0320   830 	MOVZWL	S^#SS$_NORMAL,R0	;SET NORMAL COMPLETION

                     008C C5     B4  0323   831 	CLRW	UCB$W_MT_FC(R5)		;CLEAR FRAME COUNT

                          0547   31  0327   832 	BRW	FUNCXT			;

                                     032A   833  

                                     032A   834 ;

                                     032A   835 ; FUNCTION ENDED IN AN ERROR

                                     032A   836 ;

                                     032A   837 ; THE ERROR COULD BE A NONFATAL CONTROLLER OR DRIVE ERROR. FATAL ERRORS TERMINATE

                                     032A   838 ; THE FUNCTION IN THE FUNCTION EXECUTOR.

                                     032A   839 ;

                                     032A   840 ; FATAL CONTROLLER ERRORS ARE:

                                     032A   841 ;

                                     032A   842 ;	ERCONF	= ERROR CONFIRMATION.

                                     032A   843 ;	ISTO	= INTERFACE SEQUENCE TIMEOUT.

                                     032A   844 ;	PGE	= PROGRAMMING ERROR.

                                     032A   845 ;	NED	= NONEXISTENT DRIVE.

                                     032A   846 ;	RDTO	= READ DATA TIMEOUT.

                                     032A   847 ;

                                     032A   848 ; FATAL DRIVE ERRORS ARE:

                                     032A   849 ;

                                     032A   850 ;	ILF	= ILLEGAL FUNCTION.

                                     032A   851 ;	ILR	= ILLEGAL REGISTER.

                                     032A   852 ;	NEF	= NONEXECUTABLE FUNCTION.

                                     032A   853 ;	RMR	= REGISTER MODIFY REFUSE.

                                     032A   854 ;	UNS	= UNSAFE.

                                     032A   855 ;

                                     032A   856 ; IGNORED DRIVE ERRORS ARE:

                                     032A   857 ;

                                     032A   858 ;	FMT	= FORMAT.

                                     032A   859 ;	DPAR	= DATA BUS PARITY.

                                     032A   860 ;	INC/VPE	= INCORRECTABLE OR VERTICLE PARITY ERROR.

                                     032A   861 ;	PEF/LRC	= FORMAT (PE) OR LONGITUDINAL PARITY ERROR.

                                     032A   862 ;	NSG	= NONSTANDARD GAP.

                                     032A   863 ;	FCE	= FRAME COUNT.

                                     032A   864 ;	DTE	= DRIVE TIMING.

                                     032A   865 ;	OPI	= OPERATION INCOMPLETE.

                                     032A   866 ;	COR/CRC	= CORRECTABLE OR CHECK CHARACTER ERROR.

                                     032A   867 ;

                                     032A   868  

                     0094 C5     D5  032A   869 10$:	TSTL	UCB$L_MT_RECORD(R5)	;ANY RECORDS ON TAPE?

                          0A     12  032E   870 	BNEQ	20$			;IF NEQ YES

                                     0330   871 	EXFUNC	DOUBLE,F_REWIND		;REWIND TAPE

                          1C     11  0338   872 	BRB	30$			;

                                     033A   873 20$:	REQSCHAN			;REQUEST SECONDARY CHANNEL

                                     0340   874 	EXFUNC	DOUBLE,F_INTSPCREV	;BACK SPACE RECORD

                                     0348   875 	EXFUNC	DOUBLE,F_INTSPCFOR	;SPACE RECORD FORWARD

                                     0350   876 	RELSCHAN			;RELEASE SECONDARY CHANNEL

                          0497   31  0356   877 30$:	BRW	RETRY			;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  18

01              HOUSEKEEPING FUNCTIONS                                                                                           (1)



                                     0359   879 	.SBTTL	HOUSEKEEPING FUNCTIONS

                                     0359   880 ;

                                     0359   881 ; HOUSEKEEPING FUNCTIONS INCLUDE:

                                     0359   882 ;

                                     0359   883 ;	PACK ACKNOWLEDGE,

                                     0359   884 ;	NO OPERATION,

                                     0359   885 ;	DRIVE CLEAR,

                                     0359   886 ;	SENSE TAPE CHARACTERISTICS, AND

                                     0359   887 ;	SET TAPE CHARACTERISTICS.

                                     0359   888 ;

                                     0359   889 ; IF THE FUNCTION ENDS IN A NONFATAL DRIVE ERROR IT IS RETRIED. FATAL ERRORS

                                     0359   890 ; TERMINATE THE FUNCTION IN THE FUNCTION EXECUTOR.

                                     0359   891 ;

                                     0359   892 ; FATAL DRIVE ERRORS ARE:

                                     0359   893 ;

                                     0359   894 ;	ILF	= ILLEGAL FUNCTION.

                                     0359   895 ;	ILR	= ILLEGAL REGISTER.

                                     0359   896 ;	NEF	= NONEXECUTABLE FUNCTION (EXCEPT FOR DRIVE CLEAR).

                                     0359   897 ;	RMR	= REGISTER MODIFY REFUSE.

                                     0359   898 ;	UNS	= UNSAFE.

                                     0359   899 ;

                                     0359   900 ; IGNORED DRIVE ERRORS ARE:

                                     0359   901 ;

                                     0359   902 ;	FMT	= FORMAT.

                                     0359   903 ;	DPAR	= DATA BUS PARITY.

                                     0359   904 ;	INC/VPE	= INCORRECTABLE OR VERTICLE PARITY ERROR.

                                     0359   905 ;	PEF/LRC	= FORMAT (PE) OR LONGITUDINAL PARITY ERROR.

                                     0359   906 ;	NSG	= NONSTANDARD GAP.

                                     0359   907 ;	FCE	= FRAME COUNT.

                                     0359   908 ;	CS/ITM	= CORRECTABLE SKEW OR INVALID TAPE MARK.

                                     0359   909 ;	DTE	= DRIVE TIMING.

                                     0359   910 ;	OPI	= OPERATION INCOMPLETE.

                                     0359   911 ;	COR/CRC	= CORRECTABLE OR CHECK CHARACTER ERROR.

                                     0359   912 ;

                                     0359   913 ; ADDITIONAL IGNORED DRIVE ERRORS FOR DRIVE CLEAR ARE:

                                     0359   914 ;

                                     0359   915 ;	NEF	= NONEXECUTABLE FUNCTION.

                                     0359   916 ;

                                     0359   917 ; PACK ACKNOWLEDGE

                                     0359   918 ;

                                     0359   919  

                                     0359   920 	.ENABL	LSB

                                     0359   921 PACKACK:				;PACK ACKNOWLEDGE

                                     0359   922 	EXFUNC	RETRY			;EXECUTE FUNCTION

         58 A5       0800 8F     A8  035E   923 	BISW	#UCB$M_VALID,UCB$W_STS(R5) ;SET VOLUME SOFTWARE VALID

                          74     11  0364   924 	BRB	30$			;

                                     0366   925  

                                     0366   926 ;

                                     0366   927 ; NO OPERATION, SENSE CHARACTERISTICS, AND DRIVE CLEAR.

                                     0366   928 ;

                                     0366   929  

                                     0366   930 NOP:					;NO OPERATION

                                     0366   931 SENSECHAR:				;SENSE CHARACTERISTICS

                                     0366   932 DRVCLR:					;DRIVE CLEAR

                                     0366   933 	EXFUNC	RETRY			;EXECUTE HOUSEKEEPING FUNCTION

                          6D     11  036B   934 	BRB	30$			;

                                     036D   935  

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  19

01              HOUSEKEEPING FUNCTIONS                                                                                           (1)



                                     036D   936 ;

                                     036D   937 ; SET TAPE CHARACTERISTICS

                                     036D   938 ;

                                     036D   939  

                                     036D   940 SETCHAR:				;SET TAPE CHARACTERISTICS

                                     036D   941 	EXFUNC	RETRY			;EXECUTE FUNCTION

                          08     EF  0372   942 	EXTZV	#MT$V_DENSITY,#MT$S_DENSITY,- ;EXTRACT DENSITY CODE

         6C A5            05         0374   943 		UCB$W_BOFF(R5),R0	;

                          50         0377       

            50            04     C4  0378   944 	MULL	#4,R0			;CALCULATE BIT NUMBER

            04            50     EF  037B   945 	EXTZV	R0,#4,DENSITY,R0	;EXTRACT DENSITY CODE

            50       FC97 CF         037E       

                          04     EF  0382   946 	EXTZV	#MT$V_FORMAT,#MT$S_FORMAT,- ;EXTRACT FORMAT CODE

         6C A5            04         0384   947 		UCB$W_BOFF(R5),R1	;

                          51         0387       

            51            04     C4  0388   948 	MULL	#4,R1			;CALCULATE BIT NUMBER

            04            51     EF  038B   949 	EXTZV	R1,#4,FORMAT,R1		;EXTRACT FORMAT CODE

            51       FCBB CF         038E       

            53       00F0 8F     3C  0392   950 	MOVZWL	#MT$M_FORMAT,R3		;SET INITIAL MASK WORD

            52            01     E1  0397   951 	BBC	#MT_DS_V_BOT,R2,10$	;IF CLR, TAPE NOT AT BEGINNING

                          0C         039A       

                                     039B   952  

                                     039B   953 ;

                                     039B   954 ; TAPE DENSITY CAN ONLY BE SET WHEN THE SELECTED DRIVE IS AT BEGINNING OF TAPE

                                     039B   955 ;

                                     039B   956  

                          50     F0  039B   957 	INSV	R0,#MT_TC_V_DEN,-	;SET NEW DENSITY

            03            08         039D   958 		#MT_TC_S_DEN,UCB$W_MT_TC(R5) ;

                     009A C5         039F       

            53       1F00 8F     A8  03A2   959 	BISW	#MT$M_DENSITY,R3	;SET DENSITY MASK BITS

       009A C5            08     AA  03A7   960 10$:	BICW	#MT_TC_M_EPAR,UCB$W_MT_TC(R5) ;CLEAR EVEN PARITY

         3C A5            08     AA  03AC   961 	BICW	#MT$M_PARITY,UCB$L_DEVDEPEND(R5) ;CLEAR EVEN PARITY

       009A C5            0A     E0  03B0   962 	BBS	#MT_TC_V_DEN+2,UCB$W_MT_TC(R5),20$ ;IF SET, PHASE ENCODED TAPE

                          0D         03B5       

                                     03B6   963  

                                     03B6   964 ;

                                     03B6   965 ; TAPE PARITY CAN ONLY BE SET IF NRZI FORMATTED TAPE IS BEING READ OR WRITTEN

                                     03B6   966 ;

                                     03B6   967  

         6C A5            03     E1  03B6   968 	BBC	#MT$V_PARITY,UCB$W_BOFF(R5),20$ ;IF CLR, ODD PARITY

                          08         03BA       

       009A C5            08     A8  03BB   969 	BISW	#MT_TC_M_EPAR,UCB$W_MT_TC(R5) ;SET EVEN PARITY

            53            08     A8  03C0   970 	BISW	#MT$M_PARITY,R3		;SET PARITY MASK BIT

                          51     F0  03C3   971 20$:	INSV	R1,#MT_TC_V_FSEL,-	;SET NEW FORMAT

            04            04         03C5   972 		#MT_TC_S_FSEL,UCB$W_MT_TC(R5) ;

                     009A C5         03C7       

         3C A5            53     AA  03CA   973 	BICW	R3,UCB$L_DEVDEPEND(R5)	;CLEAR OLD FIELD VALUES

            53            53     D2  03CE   974 	MCOML	R3,R3			;COMPLEMENT MASK

         6C A5            53     AA  03D1   975 	BICW	R3,UCB$W_BOFF(R5)	;CLEAR FIELDS NOT BE BE INSERTED

         3C A5         6C A5     A8  03D5   976 	BISW	UCB$W_BOFF(R5),UCB$L_DEVDEPEND(R5) ;INSERT NEW FIELD VALUES

                     008C C5     B4  03DA   977 30$:	CLRW	UCB$W_MT_FC(R5)		;CLEAR SAVED FRAME COUNT REGISTER

            50            00'    3C  03DE   978 	MOVZWL	S^#SS$_NORMAL,R0	;SET NORMAL COMPLETION

                          048D   31  03E1   979 	BRW	FUNCXT			;

                                     03E4   980 	.DSABL	LSB

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  20

01              REWIND AND UNLOAD FUNCTIONS                                                                                      (1)



                                     03E4   982 	.SBTTL	REWIND AND UNLOAD FUNCTIONS

                                     03E4   983 ;

                                     03E4   984 ; REWIND AND UNLOAD FUNCTIONS INCLUDE:

                                     03E4   985 ;

                                     03E4   986 ;	READIN PRESET,

                                     03E4   987 ;	REWIND, AND

                                     03E4   988 ;	UNLOAD.

                                     03E4   989 ;

                                     03E4   990 ; IF THE FUNCTION ENDS WITH A NONFATAL DRIVE ERRORS IT IS RETRIED. FATAL ERRORS

                                     03E4   991 ; TERMINATE THE FUNCTION IN THE FUNCTION EXECUTOR.

                                     03E4   992 ;

                                     03E4   993 ; FATAL DRIVE ERRORS ARE:

                                     03E4   994 ;

                                     03E4   995 ;	ILF	= ILLEGAL FUNCTION.

                                     03E4   996 ;	ILR	= ILLEGAL REGISTER.

                                     03E4   997 ;	NEF	= NONEXECUTABLE FUNCTION.

                                     03E4   998 ;	RMR	= REGISTER MODIFY REFUSE.

                                     03E4   999 ;	UNS	= UNSAFE.

                                     03E4  1000 ;

                                     03E4  1001 ; IGNORED DRIVE ERRORS ARE:

                                     03E4  1002 ;

                                     03E4  1003 ;	FMT	= FORMAT.

                                     03E4  1004 ;	DPAR	= DATA BUS PARITY.

                                     03E4  1005 ;	INC/VPE	= INCORRECTABLE OR VERTICLE PARITY ERROR.

                                     03E4  1006 ;	PEF/LRC	= FORMAT (PE) OR LONGITUDINAL PARITY ERROR.

                                     03E4  1007 ;	NSG	= NONSTANDARD GAP.

                                     03E4  1008 ;	FCE	= FRAME COUNT.

                                     03E4  1009 ;	CS/ITM	= CORRECTABLE SKEW OR INVALID TAPE MARK.

                                     03E4  1010 ;	DTE	= DRIVE TIMING.

                                     03E4  1011 ;	OPI	= OPERATION INCOMPLETE.

                                     03E4  1012 ;	COR/CRC	= CORRECTABLE OR CHECK CHARACTER ERROR.

                                     03E4  1013 ;

                                     03E4  1014  

                                     03E4  1015 READPRESET:				;READ IN PRESET

                       48 A5     B5  03E4  1016 	TSTW	UCB$W_UNIT(R5)		;UNIT ZERO?

                          03     13  03E7  1017 	BEQL	REWIND			;IF EQL YES

            50            03     9A  03E9  1018 	MOVZBL	#CDF_REWIND,R0		;CONVERT FUNCTION TO REWIND

                                     03EC  1019  

                                     03EC  1020 ;

                                     03EC  1021 ; UNLOAD AND REWIND FUNCTIONS

                                     03EC  1022 ;

                                     03EC  1023  

                                     03EC  1024 REWIND:					;REWIND TO BEGINNING OF TAPE

                                     03EC  1025 UNLOAD:					;UNLOAD VOLUME

                                     03EC  1026 	EXFUNC	LOSTPOS			;EXECUTE FUNCTION

                     008C C5     B4  03F1  1027 	CLRW	UCB$W_MT_FC(R5)		;CLEAR SAVED FRAME COUNT REGISTER

            50            00'    3C  03F5  1028 	MOVZWL	S^#SS$_NORMAL,R0	;SET NORMAL COMPLETION STATUS

            52            0C     E0  03F8  1029 	BBS	#MT_DS_V_MOL,R2,10$	;IF SET, MEDIUM ONLINE

                          06         03FB       

         58 A5       0800 8F     AA  03FC  1030 	BICW	#UCB$M_VALID,UCB$W_STS(R5) ;SET VOLUME SOFTWARE INVALID

                          046C   31  0402  1031 10$:	BRW	FUNCXT			;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  21

01              SPACING FUNCTIONS                                                                                                (1)



                                     0405  1033 	.SBTTL	SPACING FUNCTIONS

                                     0405  1034 ;

                                     0405  1035 ; SPACING FUNCTIONS INCLUDE:

                                     0405  1036 ;

                                     0405  1037 ;	SPACE FILE FORWARD,

                                     0405  1038 ;	SPACE FILE REVERSE,

                                     0405  1039 ;	SPACE RECORD FORWARD, AND

                                     0405  1040 ;	SPACE RECORD REVERSE.

                                     0405  1041 ;

                                     0405  1042 ; ALL ARE IMPLEMENTED VIA THE SPACE RECORD FUNCTIONS.

                                     0405  1043 ;

                                     0405  1044 ; A SPACING FUNCTION CAN END WITH A NONFATAL DRIVE ERROR. FATAL ERRORS TERMINATE

                                     0405  1045 ; THE FUNCTION IN THE FUNCTION EXECUTOR.

                                     0405  1046 ;

                                     0405  1047 ; FATAL DRIVE ERRORS ARE:

                                     0405  1048 ;

                                     0405  1049 ;	ILF	= ILLEGAL FUNCTION.

                                     0405  1050 ;	ILR	= ILLEGAL REGISTER.

                                     0405  1051 ;	NEF	= NONEXECUTABLE FUNCTION (FORWARD FUNCTIONS).

                                     0405  1052 ;	RMR	= REGISTER MODIFY REFUSE.

                                     0405  1053 ;	UNS	= UNSAFE.

                                     0405  1054 ;

                                     0405  1055 ; NONFATAL DRIVE ERRORS ARE:

                                     0405  1056 ;

                                     0405  1057 ;	CPAR	= CONTROL BUS PARITY.

                                     0405  1058 ;	FCE	= FRAME COUNT.

                                     0405  1059 ;	NEF	= NONEXECUTABLE FUNCTION (REVERSE FUNCTIONS INTO BEGINNING OF TAPE).

                                     0405  1060 ;	OPI	= OPERATION INCOMPLETE (REVERSE FUNCTIONS INTO BEGINNING OF TAPE).

                                     0405  1061 ;

                                     0405  1062 ; IGNORED DRIVE ERRORS ARE:

                                     0405  1063 ;

                                     0405  1064 ;	FMT	= FORMAT.

                                     0405  1065 ;	DPAR	= DATA BUS PARITY.

                                     0405  1066 ;	INC/VPE	= INCORRECTABLE OR VERTICLE PARITY ERROR.

                                     0405  1067 ;	PEF/LRC	= FORMAT (PE) OR LONGITUDINAL PARITY ERROR.

                                     0405  1068 ;	NSG	= NONSTANDARD GAP.

                                     0405  1069 ;	CS/ITM	= CORRECTABLE SKEW OR INVALID TAPE MARK.

                                     0405  1070 ;	DTE	= DRIVE TIMING.

                                     0405  1071 ;	COR/CRC	= CORRECTABLE OR CHECK CHARACTER ERROR.

                                     0405  1072 ;

                                     0405  1073 ; SPACE FILE FORWARD

                                     0405  1074 ;

                                     0405  1075 ;	SPACING FILES IS ACCOMPLISHED BY SPACING A VERY LARGE NUMBER OF RECORDS.

                                     0405  1076 ;	IF THE RECORD SPACING OPERATION COMPLETES WITHOUT ERROR, THEN THE RECORD

                                     0405  1077 ;	COUNT IS INCREASED BY 65,536 AND THE SPACING OPERATION IS CONTINUED.

                                     0405  1078 ;

                                     0405  1079 ;	SEVERAL SPECIAL CONDITIONS CAN ARISE DURING A SPACE FILE FORWARD:

                                     0405  1080 ;

                                     0405  1081 ;		1. A CONTROL BUS PARITY ERROR OCCURS.

                                     0405  1082 ;

                                     0405  1083 ;			THE OPERATION IS MERELY RETRIED SINCE TAPE MOTION COULD

                                     0405  1084 ;			NOT HAVE OCCURED.

                                     0405  1085 ;

                                     0405  1086 ;		2. AN END OF TAPE IS ENCOUNTERED WITHOUT AN END OF FILE.

                                     0405  1087 ;

                                     0405  1088 ;			THE OPERATION IS CONTINUED SINCE END OF TAPE WHILE FILE

                                     0405  1089 ;			SKIPPING DOES NOT TERMINATE THE OPERATION.

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  22

01              SPACING FUNCTIONS                                                                                                (1)



                                     0405  1090 ;

                                     0405  1091 ;		3. AN END OF FILE IS ENCOUNTERED.

                                     0405  1092 ;

                                     0405  1093 ;			THE FILE SKIP COUNT IS DECREMENTED AND IF NONZERO, THE

                                     0405  1094 ;			OPERATION IS CONTINUED.

                                     0405  1095 ;

                                     0405  1096 ;	UNLESS A HARD ERROR IS ENCOUNTERED, NORMAL COMPLETION IS ALWAYS RETURNED

                                     0405  1097 ;	FOR A SKIP FILE FORWARD FUNCTION.

                                     0405  1098 ;

                                     0405  1099 ;	AS RECORDS ARE SKIPPED FORWARD ON THE TAPE, THE CURRENT TAPE POSITION IS

                                     0405  1100 ;	MAINTAINED BY ADDING THE NUMBER OF RECORDS AND TAPE MARKS SKIPPED OVER.

                                     0405  1101 ;

                                     0405  1102  

                                     0405  1103 SPCFILFOR:				;SPACE FILE FORWARD

                                     0405  1104 	EXFUNC	10$,F_SPCFILFOR		;EXECUTE FUNCTION

                     0096 C5     B6  040D  1105 	INCW	UCB$L_MT_RECORD+2(R5)	;UPDATE TAPE POSITION

                          F2     11  0411  1106 	BRB	SPCFILFOR		;

                                     0413  1107 10$:	CHECK_ERROR			;CHECK FOR FATAL OF RETRIABLE ERROR

            50       008C C5     3C  0416  1108 	MOVZWL	UCB$W_MT_FC(R5),R0	;GET NUMBER OF RECORDS SKIPPED OVER

       0094 C5            50     C0  041B  1109 	ADDL	R0,UCB$L_MT_RECORD(R5)	;UPDATE TAPE POSITION

            52            02     E1  0420  1110 	BBC	#MT_DS_V_TM,R2,SPCFILFOR ;IF CLR, TAPE MARK NOT ENCOUNTERED

                          E1         0423       

                       6C A5     B7  0424  1111 	DECW	UCB$W_BOFF(R5)		;DECREMENT NUMBER OF FILES TO SKIP

                          DC     12  0427  1112 	BNEQ	SPCFILFOR		;IF NEQ MORE TO GO

                          0085   31  0429  1113 	BRW	NORXIT			;

                                     042C  1114  

                                     042C  1115 ;

                                     042C  1116 ; SPACE FILE REVERSE

                                     042C  1117 ;

                                     042C  1118 ;	SPACING FILES IS ACCOMPLISHED BY SPACING A VERY LARGE NUMBER OF RECORDS.

                                     042C  1119 ;	IF THE RECORD SPACING OPERATION COMPLETES WITHOUT ERROR, THE THE RECORD

                                     042C  1120 ;	COUNT IS REDUCED BY 65,536 AND THE SPACING OPERATION IS CONTINUED.

                                     042C  1121 ;

                                     042C  1122 ;	SEVERAL SPECIAL CONDITIONS CAN ARISE DURING A SPACE FILE REVERSE:

                                     042C  1123 ;

                                     042C  1124 ;		1. A CONTROL BUS PARITY ERROR OCCURS.

                                     042C  1125 ;

                                     042C  1126 ;			THE OPERATION IS MERELY RETRIED SINCE TAPE MOTION COULD

                                     042C  1127 ;			NOT HAVE OCCURED.

                                     042C  1128 ;

                                     042C  1129 ;		2. AN END OF TAPE IS ENCOUNTERED WITHOUT AN END OF FILE.

                                     042C  1130 ;

                                     042C  1131 ;			THE OPERATION IS CONTINUED SINCE END OF TAPE WHILE FILE

                                     042C  1132 ;			SKIPPING DOES NOT TERMINATE THE OPERATION.

                                     042C  1133 ;

                                     042C  1134 ;		3. A BEGINNING OF TAPE IS ENCOUNTERED.

                                     042C  1135 ;

                                     042C  1136 ;			THE OPERATION IS IMMEDIATELY TERMINATED.

                                     042C  1137 ;

                                     042C  1138 ;		4. AN END OF FILE IS ENCOUNTERED.

                                     042C  1139 ;

                                     042C  1140 ;			THE FILE SKIP COUNT IS DECREMENTED AND IF NONZERO, THE

                                     042C  1141 ;			OPERATION IS CONTINUED.

                                     042C  1142 ;

                                     042C  1143 ;	UNLESS A HARD ERROR IS ENCOUNTERED, NORMAL COMPLETION IS ALWAYS RETURNED

                                     042C  1144 ;	FOR A SKIP FILE REVERSE OPERATION.

                                     042C  1145 ;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  23

01              SPACING FUNCTIONS                                                                                                (1)



                                     042C  1146 ;	AS RECORDS ARE SKIPPED BACKWARDS ON THE TAPE, THE CURRENT TAPE POSITION

                                     042C  1147 ;	IS MAINTAINED BY SUBTRACTING THE NUMBER RECORDS AND TAPE MARKS SKIPPED

                                     042C  1148 ;	OVER.

                                     042C  1149 ;

                                     042C  1150  

                                     042C  1151 SPCFILREV:				;SPACE FILE REVERSE

                                     042C  1152 	EXFUNC	10$,F_SPCFILREV		;EXECUTE FUNCTION

                     0096 C5     B7  0434  1153 	DECW	UCB$L_MT_RECORD+2(R5)	;UPDATE RECORD POSITION

                          F2     11  0438  1154 	BRB	SPCFILREV		;

                                     043A  1155 10$:	CHECK_ERROR			;CHECK FOR FATAL OR RETRIABLE ERROR

            50       008C C5     3C  043D  1156 	MOVZWL	UCB$W_MT_FC(R5),R0	;GET NUMBER OF RECORDS SKIPPED OVER

       0094 C5            50     C2  0442  1157 	SUBL	R0,UCB$L_MT_RECORD(R5)	;UPDATE TAPE POSITION

            52            06     B3  0447  1158 	BITW	#MT_DS_M_BOT!MT_DS_M_TM,R2 ;NOT AT BOT AND NO TAPE MARK ENCOUNTERED?

                          E0     13  044A  1159 	BEQL	SPCFILREV		;IF EQL YES

            52            01     E0  044C  1160 	BBS	#MT_DS_V_BOT,R2,20$	;IF SET, BEGINNING OF TAPE

                          05         044F       

                       6C A5     B7  0450  1161 	DECW	UCB$W_BOFF(R5)		;ANY MORE FILES TO SKIP?

                          D7     12  0453  1162 	BNEQ	SPCFILREV		;IF NEQ YES

                          5A     11  0455  1163 20$:	BRB	NORXIT			;

                                     0457  1164  

                                     0457  1165 ;

                                     0457  1166 ; SPACE RECORD FORWARD

                                     0457  1167 ;

                                     0457  1168 ;	SEVERAL SPECIAL CONDITIONS CAN ARISE DURING A SPACE FORWARD:

                                     0457  1169 ;

                                     0457  1170 ;		1. A CONTROL BUS PARITY ERROR OCCURS.

                                     0457  1171 ;

                                     0457  1172 ;			THE OPERATION IS MERELY RETRIED SINCE TAPE MOTION COULD

                                     0457  1173 ;			NOT HAVE OCCURED.

                                     0457  1174 ;

                                     0457  1175 ;		2. AN END OF TAPE IS ENCOUNTERED WITHOUT AN END OF FILE.

                                     0457  1176 ;

                                     0457  1177 ;			THE OPERATION IS TERMINATED WITH A FINAL STATUS OF END OF

                                     0457  1178 ;			TAPE.

                                     0457  1179 ;

                                     0457  1180 ;		3. AN END OF FILE IS ENCOUNTERED.

                                     0457  1181 ;

                                     0457  1182 ;			THE OPERATION IS TERMINATED WITH A FINAL STATUS OF END OF

                                     0457  1183 ;			FILE.

                                     0457  1184 ;

                                     0457  1185 ;	UNLESS A HARD ERROR IS ENCOUNTERED, THE CURRENT TAPE POSITION IS MAINTAINED

                                     0457  1186 ;	BY ADDING THE TOTAL NUMBER OF RECORDS SKIPPED OVER.

                                     0457  1187 ;

                                     0457  1188  

                                     0457  1189 SPCRECFOR:				;SPACE RECORD FORWARD

                                     0457  1190 	EXFUNC	10$			;EXECUTE FUNCTION

                          03     11  045C  1191 	BRB	20$			;

                                     045E  1192 10$:	CHECK_ERROR			;CHECK FOR FATAL OR RETRIABLE ERROR

                          50     D4  0461  1193 20$:	CLRL	R0			;CLEAR UPPER HALF OF REGISTER

         6C A5       008C C5     A1  0463  1194 	ADDW3	UCB$W_MT_FC(R5),UCB$W_BOFF(R5),R0 ;CALCULATE RECORDS SKIPPED

                          50         0469       

       0094 C5            50     C0  046A  1195 	ADDL	R0,UCB$L_MT_RECORD(R5)	;UPDATE TAPE POSITION

         6C A5       008C C5     AE  046F  1196 	MNEGW	UCB$W_MT_FC(R5),UCB$W_BOFF(R5) ;SET REMAINING RECORD SKIP COUNT

            52            02     E0  0475  1197 	BBS	#MT_DS_V_TM,R2,SETEOF	;IF SET, END OF FILE ENCOUNTERED

                          3D         0478       

                          36     11  0479  1198 	BRB	NORXIT			;

                                     047B  1199  

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  24

01              SPACING FUNCTIONS                                                                                                (1)



                                     047B  1200 ;

                                     047B  1201 ; SPACE RECORD REVERSE

                                     047B  1202 ;

                                     047B  1203 ;	SEVERAL SPECIAL CONDITIONS CAN ARISE DURING A SPACE RECORD REVERSE:

                                     047B  1204 ;

                                     047B  1205 ;		1. A CONTROL BUS PARITY ERROR.

                                     047B  1206 ;

                                     047B  1207 ;			THE OPERATION IS MERELY RETRIED SINCE TAPE MOTION COULD

                                     047B  1208 ;			NOT HAVE OCCURED.

                                     047B  1209 ;

                                     047B  1210 ;		2. A BEGINNING OF TAPE IS ENCOUNTERED.

                                     047B  1211 ;

                                     047B  1212 ;			THE OPERATION IS TERMINATED WITH A FINAL STATUS OF END OF

                                     047B  1213 ;			FILE.

                                     047B  1214 ;

                                     047B  1215 ;		3. AN END OF TAPE IS ENCOUNTERED WITHOUT AN END OF FILE.

                                     047B  1216 ;

                                     047B  1217 ;			THE OPERATION IS CONTINUED SINCE AN END OF TAPE WHILE

                                     047B  1218 ;			SKIPPING RECORDS BACKWARDS DOES NOT TERMINATE THE OPER-

                                     047B  1219 ;			ATION.

                                     047B  1220 ;

                                     047B  1221 ;		4. AN END OF FILE IS ENCOUNTERED.

                                     047B  1222 ;

                                     047B  1223 ;			THE OPERATION IS TERMINATED WITH A FINAL STATUS OF END OF

                                     047B  1224 ;			FILE.

                                     047B  1225 ;

                                     047B  1226 ;	UNLESS A HARD ERROR IS ENCOUNTERED, THE CURRENT TAPE POSITION IS MAINTAINED

                                     047B  1227 ;	BY SUBTRACTING THE TOTAL NUMBER OF RECORDS SKIPPED OVER.

                                     047B  1228 ;

                                     047B  1229  

                                     047B  1230 SPCRECREV:				;SPACE RECORD REVERSE

                                     047B  1231 	EXFUNC	10$,F_SPCRECREV		;EXECUTE FUNCTION

                          03     11  0483  1232 	BRB	20$			;

                                     0485  1233 10$:	CHECK_ERROR			;CHECK FOR FATAL OR RETRIABLE ERROR

                          50     D4  0488  1234 20$:	CLRL	R0			;CLEAR UPPER HALF OF REGISTER

         6C A5       008C C5     A1  048A  1235 	ADDW3	UCB$W_MT_FC(R5),UCB$W_BOFF(R5),R0 ;CALCULATE RECORD SKIP COUNT

                          50         0490       

       0094 C5            50     C2  0491  1236 	SUBL	R0,UCB$L_MT_RECORD(R5)	;UPDATE TAPE POSITION

         6C A5       008C C5     AE  0496  1237 	MNEGW	UCB$W_MT_FC(R5),UCB$W_BOFF(R5) ;SET REMAINING RECORD SKIP COUNT

       008E C5       008C C5     B0  049C  1238 	MOVW	UCB$W_MT_FC(R5),UCB$W_MT_SPACNT(R5) ;RESET SPACING COUNT

            52            02     E0  04A3  1239 	BBS	#MT_DS_V_TM,R2,SETEOF	;IF SET, END OF FILE ENCOUNTERED

                          0F         04A6       

                          08     13  04A7  1240 	BEQL	NORXIT			;IF EQL ALL RECORDS SPACED OVER

            52            01     E0  04A9  1241 	BBS	#MT_DS_V_BOT,R2,SETEOF	;IF SET, BEGINNING OF TAPE ENCOUNTERED

                          09         04AC       

            52            0A     E0  04AD  1242 	BBS	#MT_DS_V_EOT,R2,SPCRECREV ;IF SET, AT END OF TAPE

                          CA         04B0       

                                     04B1  1243  

                                     04B1  1244 ;

                                     04B1  1245 ; NORMAL SPACING FUNCTION EXIT

                                     04B1  1246 ;

                                     04B1  1247  

                                     04B1  1248 	.ENABL	LSB

            50            00'    3C  04B1  1249 NORXIT:	MOVZWL	S^#SS$_NORMAL,R0	;SET NORMAL COMPLETION STATUS

                          05     11  04B4  1250 	BRB	10$			;

                                     04B6  1251  

                                     04B6  1252 ;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  25

01              SPACING FUNCTIONS                                                                                                (1)



                                     04B6  1253 ; SET EOF OF FILE STATUS

                                     04B6  1254 ;

                                     04B6  1255  

            50       0000'8F     3C  04B6  1256 SETEOF:	MOVZWL	#SS$_ENDOFFILE,R0	;SET END OF FILE STATUS

                       6C A5     A3  04BB  1257 10$:	SUBW3	UCB$W_BOFF(R5),UCB$W_BCNT(R5),- ;CALCULATE TOTAL NUMBER OF FILES

       008C C5         6E A5         04BE  1258 		UCB$W_MT_FC(R5)		;OR RECORDS SKIPPED OVER

                          03AB   31  04C3  1259 	BRW	FUNCXT			;

                                     04C6  1260 	.DSABL	LSB

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  26

01              READ DATA FORWARD AND WRITECHECK DATA FORWARD F                                                                  (1)



                                     04C6  1262 	.SBTTL	READ DATA FORWARD AND WRITECHECK DATA FORWARD FUNCTIONS

                                     04C6  1263 ;

                                     04C6  1264 ; READ DATA FORWARD AND WRITECHECK DATA FORWARD FUNCTIONS

                                     04C6  1265 ;

                                     04C6  1266  

                                     04C6  1267 WRITECHECK:				;WRITE CHECK FORWARD

         7E A5       4000 8F     AA  04C6  1268 	BICW	#IO$M_DATACHECK,UCB$W_FUNC(R5) ;CLEAR DATA CHECK REQUEST

                                     04CC  1269 READDATA:				;READ DATA FORWARD

                                     04CC  1270 	REQSCHAN			;REQUEST SECONDARY I/O CHANNEL

            50         76 A5     9A  04D2  1271 5$:	MOVZBL	UCB$B_FEX(R5),R0	;RETRIEVE FUNCTION INDEX

                                     04D6  1272 	EXFUNC	20$			;EXECUTE FUNCTION

       008C C5            0E     B1  04DB  1273 	CMPW	#MIN_RECORD,UCB$W_MT_FC(R5) ;MINIMUM RECORD READ?

                          F0     1A  04E0  1274 	BGTRU	5$			;IF GTRU NO

         7E A5            0E     E1  04E2  1275 10$:	BBC	#IO$V_DATACHECK,UCB$W_FUNC(R5),50$ ;IF CLR, NO DATA CHECK

                          5B         04E6       

                                     04E7  1276 	EXFUNC	DOUBLE,F_INTSPCREV	;SPACE RECORD REVERSE

                                     04EF  1277 	EXFUNC	20$,F_WRITECHECK	;WRITE CHECK DATA

                          49     11  04F7  1278 	BRB	50$			;

                                     04F9  1279  

                                     04F9  1280 ;

                                     04F9  1281 ; FUNCTION ENDED IN AN ERROR

                                     04F9  1282 ;

                                     04F9  1283 ; THE ERROR COULD BE A NONFATAL CONTROLLER OR DRIVE ERROR. FATAL ERRORS TERMINATE

                                     04F9  1284 ; THE FUNCTION IN THE FUNCTION EXECUTOR.

                                     04F9  1285 ;

                                     04F9  1286 ; FATAL CONTROLLER ERRORS ARE:

                                     04F9  1287 ;

                                     04F9  1288 ;	ERCONF	= ERROR CONFIRMATION.

                                     04F9  1289 ;	ISTO	= INTERFACE SEQUENCE TIMEOUT.

                                     04F9  1290 ;	PGE	= PROGRAMMING ERROR.

                                     04F9  1291 ;	NED	= NONEXISTENT DRIVE.

                                     04F9  1292 ;	RDTO	= READ DATA TIMEOUT.

                                     04F9  1293 ;

                                     04F9  1294 ; FATAL DRIVE ERRORS ARE:

                                     04F9  1295 ;

                                     04F9  1296 ;	ILF	= ILLEGAL FUNCTION.

                                     04F9  1297 ;	ILR	= ILLEGAL REGISTER.

                                     04F9  1298 ;	NEF	= NONEXECUTABLE FUNCTION.

                                     04F9  1299 ;	RMR	= REGISTER MODIFY REFUSE.

                                     04F9  1300 ;	UNS	= UNSAFE.

                                     04F9  1301 ;

                                     04F9  1302 ; IGNORED DRIVE ERRORS ARE:

                                     04F9  1303 ;

                                     04F9  1304 ;	DPAR	= DATA BUS PARITY.

                                     04F9  1305 ;

                                     04F9  1306 ; NOTE THAT IT IS ASSUMED THAT MASSBUS EXCEPTION (MBEXC) WILL OCCUR ONLY IN

                                     04F9  1307 ; COMBINATION WITH ANOTHER DRIVE OR CONTROLLER ERROR.

                                     04F9  1308 ;

                                     04F9  1309  

            51   00020974 8F     D3  04F9  1310 20$:	BITL	#MBA$M_SR_DLT!-		;DATA LATE OR,

                                     0500  1311 		MBA$M_SR_INVMAP!-	;INVALID MAP REGISTER OR,

                                     0500  1312 		MBA$M_SR_MAPPE!-	;MAP PARITY ERROR OR,

                                     0500  1313 		MBA$M_SR_MCPE!-		;MASSBUS CONTROL PARITY ERROR OR,

                                     0500  1314 		MBA$M_SR_MDPE!-		;MASSBUS DATA PARITY ERROR OR,

                                     0500  1315 		MBA$M_SR_MXF!-		;MISSED TRANSFER OR,

                                     0500  1316 		MBA$M_SR_RDS,R1		;READ DATA SUBSTITUTE?

                          57     12  0500  1317 	BNEQ	80$			;IF NEQ YES

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  27

01              READ DATA FORWARD AND WRITECHECK DATA FORWARD F                                                                  (1)



            52            02     E0  0502  1318 	BBS	#MT_DS_V_TM,R2,30$	;IF SET, TAPE MARK DETECTED

                          07         0505       

            51       0600 8F     B3  0506  1319 	BITW	#MBA$M_SR_WCKLWR!-	;WRITE CHECK LOWER BYTE OR,

                                     050B  1320 		MBA$M_SR_WCKUPR,R1	;WRITE CHECK UPPER BYTE?

                          4C     12  050B  1321 	BNEQ	80$			;IF NEQ YES

            50       31D8 8F     B3  050D  1322 30$:	BITW	#MT_ER_M_CPAR!-		;CONTROL BUS PARITY ERROR OR,

                                     0512  1323 		MT_ER_M_DTE!-		;DRIVE TIMING ERROR OR,

                                     0512  1324 		MT_ER_M_FMT!-		;FORMAT ERROR OR,

                                     0512  1325 		MT_ER_M_INC!-		;INCORRECTABLE ERROR (PE) OR,

                                     0512  1326 		MT_ER_M_LRC!-		;LONGITUDINAL PARITY ERROR (NRZI) OR,

                                     0512  1327 		MT_ER_M_NSG!-		;NONSTANDARD GAP OR,

                                     0512  1328 		MT_ER_M_OPI!-		;OPERATION INCOMPLETE OR,

                                     0512  1329 		MT_ER_M_PEF!-		;FORMAT ERROR (PE) OR,

                                     0512  1330 		MT_ER_M_VPE,R0		;VERTICLE PARITY ERROR (NRZI)?

                          38     12  0512  1331 	BNEQ	70$			;IF NEQ YES

            52            05     E0  0514  1332 	BBS	#MT_DS_V_PES,R2,40$	;IF SET, PHASE ENCODED TAPE

                          07         0517       

            50       8400 8F     B3  0518  1333 	BITW	#MT_ER_M_CRC!MT_ER_M_ITM,R0 ;CRC OR INVALID TAPE MARK?

                          3A     12  051D  1334 	BNEQ	80$			;IF NEQ YES

                                     051F  1335  

                                     051F  1336 ;

                                     051F  1337 ; FRAME COUNT ERROR

                                     051F  1338 ;

                                     051F  1339 ; IF THE RECORD CONTAINED MORE BYTES THAN THE SPECIFIED BUFFER, THEN A DATA OVERRUN

                                     051F  1340 ; ERROR IS RETURNED. ELSE A CHECK IS MADE FOR END OF FILE AND IMPLICIT WRITECHECK.

                                     051F  1341 ;

                                     051F  1342  

            50       0000'8F     3C  051F  1343 40$:	MOVZWL	#SS$_DATAOVERUN,R0	;SET DATA OVER RUN STATUS

         6E A5       008C C5     B1  0524  1344 	CMPW	UCB$W_MT_FC(R5),UCB$W_BCNT(R5) ;DATA OVER RUN?

                          19     1A  052A  1345 	BGTRU	60$			;IF GTR YES

            50       0000'8F     3C  052C  1346 	MOVZWL	#SS$_ENDOFFILE,R0	;ASSUME END OF FILE

            52            02     E0  0531  1347 	BBS	#MT_DS_V_TM,R2,60$	;IF SET, TAPE MARK ENCOUNTERED

                          10         0534       

       008C C5            0E     B1  0535  1348 	CMPW	#MIN_RECORD,UCB$W_MT_FC(R5) ;MINIMUM RECORD READ?

                          96     1A  053A  1349 	BGTRU	5$			;IF GTRU NO

         77 A5            0C     91  053C  1350 	CMPB	#CDF_READDATA,UCB$B_CEX(R5) ;LAST FUNCTION READ DATA?

                          A0     13  0540  1351 	BEQL	10$			;IF EQL YES

            50            00'    3C  0542  1352 50$:	MOVZWL	S^#SS$_NORMAL,R0	;SET NORMAL COMPLETION STATUS

                     0094 C5     D6  0545  1353 60$:	INCL	UCB$L_MT_RECORD(R5)	;INCREMENT RECORD POSITION

                          0325   31  0549  1354 	BRW	FUNCXT			;

                                     054C  1355  

                                     054C  1356 ;

                                     054C  1357 ; RECOVERABLE CONTROLLER OR DRIVE ERROR

                                     054C  1358 ;

                                     054C  1359 ; A CHECK IS MADE TO DETERMINE IF OPERATION INCOMPLETE IS THE ONLY ERROR AND THAT

                                     054C  1360 ; THE TRANSFERED BYTE COUNT WAS ZERO. IF THIS CHECK IS SATISFIED, THEN BLANK TAPE

                                     054C  1361 ; IS BEING READ AND THE FATAL ERROR EXIT IS TAKEN.

                                     054C  1362 ;

                                     054C  1363 ; A CHECK IS MADE TO DETERMINE IF ANY RETRIES REMAIN. IF THE NUMBER OF RETRIES IS

                                     054C  1364 ; EXHAUSTED, THEN AN ERROR IS RETURNED. ELSE RECOVERY IS ATTEMPTED. THE METHOD USED

                                     054C  1365 ; DEPENDS ON THE PREVIOUS NUMBER OF RETRIES.

                                     054C  1366 ;

                                     054C  1367 ; IF THE PREVIOUSLY ATTEMPTED RETRIES HAVE EXCEEDED A THRESHOLD, THEN THE TAPE IS

                                     054C  1368 ; BACKSPACED THE ERROR BACKSPACE COUNT, FORWARD SPACED THAT NUMBER MINUS ONE, AND

                                     054C  1369 ; THE OPERATION IS REPEATED.

                                     054C  1370 ;

                                     054C  1371 ; IF THE PREVIOULY ATTEMPTED RETRIES HAVE NOT EXCEEDED THE THRESHOLD, THEN THE TAPE

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  28

01              READ DATA FORWARD AND WRITECHECK DATA FORWARD F                                                                  (1)



                                     054C  1372 ; IS BACKSPACED ONE RECORD AND THE OPERATION IS RETRIED.

                                     054C  1373 ;

                                     054C  1374  

            50       DFFF 8F     B3  054C  1375 70$:	BITW	#^C<MT_ER_M_OPI>,R0	;OPERATION INCOMPLETE ONLY ERROR?

                          06     12  0551  1376 	BNEQ	80$			;IF NEQ NO

                     008C C5     B5  0553  1377 	TSTW	UCB$W_MT_FC(R5)		;TRANSFERED BYTE COUNT ZERO?

                          73     13  0557  1378 	BEQL	140$			;IF EQL YES

                                     0559  1379 80$:	TESTR	130$			;TEST REMAINING RETRIES

         70 A5            08     91  055E  1380 	CMPB	#THRESHOLD,UCB$B_ERTCNT(R5) ;TIME TO USE ALTERNATE RECOVERY?

                          55     1B  0562  1381 	BLEQU	120$			;IF LEQU NO

       0094 C5            05     D1  0564  1382 	CMPL	#ERR_SPACING,UCB$L_MT_RECORD(R5) ;ENOUGH RECORDS WRITTEN ON TAPE?

                          26     1B  0569  1383 	BLEQU	90$			;IF LEQU YES

                                     056B  1384 	RELSCHAN			;RELEASE SECONDARY CHANNEL

                                     0571  1385 	EXFUNC	DOUBLE,F_REWIND		;REWIND TAPE

                                     0579  1386 	REQPCHAN			;REQUEST PRIMARY CHANNEL

            53            54     D0  057F  1387 	MOVL	R4,R3			;SET ADDRESS OF DRIVE CONTROL REGISTER

                                     0582  1388 	REQSCHAN			;REQUEST SECONDARY CHANNEL

       0098 C5       0094 C5     B0  0588  1389 	MOVW	UCB$L_MT_RECORD(R5),UCB$W_MT_FORCNT(R5) ;SET PROPER RECORD COUNT

                          18     11  058F  1390 	BRB	110$			;

       0098 C5            05     B0  0591  1391 90$:	MOVW	#ERR_SPACING,UCB$W_MT_FORCNT(R5) ;SET RECORD COUNT

                                     0596  1392 100$:	EXFUNC	DOUBLE,F_INTSPCREV	;SPACE RECORD REVERSE

                     0098 C5     B7  059E  1393 	DECW	UCB$W_MT_FORCNT(R5)	;ANY MORE RECORDS TO SPACE?

                          F2     14  05A2  1394 	BGTR	100$			;IF GTR YES

       0098 C5            04     B0  05A4  1395 	MOVW	#ERR_SPACING-1,UCB$W_MT_FORCNT(R5) ;SET FORWARD SPACING COUNT

                                     05A9  1396 110$:	EXFUNC	DOUBLE,F_INTSPCFOR	;SPACE RECORD FORWARD

                     0098 C5     B7  05B1  1397 	DECW	UCB$W_MT_FORCNT(R5)	;ANY MORE RECORDS TO SPACE OVER?

                          F2     14  05B5  1398 	BGTR	110$			;IF GTR YES

                          10     11  05B7  1399 	BRB	130$			;

                                     05B9  1400 120$:	EXFUNC	DOUBLE,F_INTSPCREV	;SPACE RECORD REVERSE

                                     05C1  1401 	EXFUNC	DOUBLE,F_INTSPCFOR	;SPACE RECORD FORWARD

                          FF06   31  05C9  1402 130$:	BRW	5$			;

                          0233   31  05CC  1403 140$:	BRW	FATALERR		;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  29

01              READ DATA REVERSE AND WRITECHECK DATA REVERSE F                                                                  (1)



                                     05CF  1405 	.SBTTL	READ DATA REVERSE AND WRITECHECK DATA REVERSE FUNCTIONS

                                     05CF  1406 ;

                                     05CF  1407 ; READ DATA REVERSE AND WRITECHECK DATA REVERSE FUNCTIONS

                                     05CF  1408 ;

                                     05CF  1409  

                                     05CF  1410 WRITECHECKR:				;WRITE CHECK REVERSE

         7E A5       4000 8F     AA  05CF  1411 	BICW	#IO$M_DATACHECK,UCB$W_FUNC(R5) ;CLEAR DATA CHECK REQUEST

                                     05D5  1412 READDATAR:				;READ DATA REVERSE

                                     05D5  1413 	REQSCHAN			;REQUEST SECONDARY I/O CHANNEL

            50         76 A5     9A  05DB  1414 5$:	MOVZBL	UCB$B_FEX(R5),R0	;RETRIEVE FUNCTION INDEX

                                     05DF  1415 	EXFUNC	20$			;EXECUTE FUNCTION

       008C C5            0E     B1  05E4  1416 	CMPW	#MIN_RECORD,UCB$W_MT_FC(R5) ;MINIMUM RECORD READ?

                          F0     1A  05E9  1417 	BGTRU	5$			;IF GTRU NO

         7E A5            0E     E1  05EB  1418 10$:	BBC	#IO$V_DATACHECK,UCB$W_FUNC(R5),50$ ;IF CLR, NO DATA CHECK

                          5F         05EF       

                                     05F0  1419 	EXFUNC	DOUBLE,F_INTSPCFOR	;SPACE RECORD FORWARD

                                     05F8  1420 	EXFUNC	20$,F_WRITECHECKR	;WRITE CHECK DATA REVERSE

                          4D     11  0600  1421 	BRB	50$			;

                                     0602  1422  

                                     0602  1423 ;

                                     0602  1424 ; FUNCTION ENDED IN AN ERROR

                                     0602  1425 ;

                                     0602  1426 ; THE ERROR COULD BE A NONFATAL CONTROLLER OR DRIVE ERROR. FATAL ERRORS TERMINATE

                                     0602  1427 ; THE FUNCTION IN THE FUNCTION EXECUTOR.

                                     0602  1428 ;

                                     0602  1429 ; FATAL CONTROLLER ERRORS ARE:

                                     0602  1430 ;

                                     0602  1431 ;	ERCONF	= ERROR CONFIRMATION.

                                     0602  1432 ;	ISTO	= INTERFACE SEQUENCE TIMEOUT.

                                     0602  1433 ;	PGE	= PROGRAMMING ERROR.

                                     0602  1434 ;	NED	= NONEXISTENT DRIVE.

                                     0602  1435 ;	RDTO	= READ DATA TIMEOUT.

                                     0602  1436 ;

                                     0602  1437 ; FATAL DRIVE ERRORS ARE:

                                     0602  1438 ;

                                     0602  1439 ;	ILF	= ILLEGAL FUNCTION.

                                     0602  1440 ;	ILR	= ILLEGAL REGISTER.

                                     0602  1441 ;	RMR	= REGISTER MODIFY REFUSE.

                                     0602  1442 ;	UNS	= UNSAFE.

                                     0602  1443 ;

                                     0602  1444 ; IGNORED DRIVE ERRORS ARE:

                                     0602  1445 ;

                                     0602  1446 ;	DPAR	= DATA BUS PARITY.

                                     0602  1447 ;

                                     0602  1448 ; NOTE THAT IT IS ASSUMED THAT MASSBUS EXCEPTION (MBEXC) WILL OCCUR ONLY IN

                                     0602  1449 ; COMBINATION WITH ANOTHER DRIVE OR CONTROLLER ERROR.

                                     0602  1450 ;

                                     0602  1451  

            51   00020974 8F     D3  0602  1452 20$:	BITL	#MBA$M_SR_DLT!-		;DATA LATE OR,

                                     0609  1453 		MBA$M_SR_INVMAP!-	;INVALID MAP REGISTER OR,

                                     0609  1454 		MBA$M_SR_MAPPE!-	;MAP PARITY ERROR OR,

                                     0609  1455 		MBA$M_SR_MCPE!-		;MASSBUS CONTROL PARITY ERROR OR,

                                     0609  1456 		MBA$M_SR_MDPE!-		;MASSBUS DATA PARITY ERROR OR,

                                     0609  1457 		MBA$M_SR_MXF!-		;MISSED TRANSFER OR,

                                     0609  1458 		MBA$M_SR_RDS,R1		;READ DATA SUBSTITUTE OR,

                          4E     12  0609  1459 	BNEQ	70$			;IF NEQ YES

            52            02     E0  060B  1460 	BBS	#MT_DS_V_TM,R2,30$	;IF SET, TAPE MARK DETECTED

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  30

01              READ DATA REVERSE AND WRITECHECK DATA REVERSE F                                                                  (1)



                          07         060E       

            51       0600 8F     B3  060F  1461 	BITW	#MBA$M_SR_WCKLWR!-	;WRITE CHECK LOWER BYTE OR,

                                     0614  1462 		MBA$M_SR_WCKUPR,R1	;WRITE CHECK UPPER BYTE?

                          43     12  0614  1463 	BNEQ	70$			;IF NEQ YES

            50       31D8 8F     B3  0616  1464 30$:	BITW	#MT_ER_M_CPAR!-		;CONTROL BUS PARITY ERROR OR,

                                     061B  1465 		MT_ER_M_DTE!-		;DRIVE TIMING ERROR OR,

                                     061B  1466 		MT_ER_M_FMT!-		;FORMAT ERROR OR,

                                     061B  1467 		MT_ER_M_INC!-		;INCORRECTABLE ERROR (PE) OR,

                                     061B  1468 		MT_ER_M_LRC!-		;LONGITUDINAL PARITY ERROR (NRZI) OR,

                                     061B  1469 		MT_ER_M_NSG!-		;NONSTANDARD GAP OR,

                                     061B  1470 		MT_ER_M_OPI!-		;OPERATION INCOMPLETE OR,

                                     061B  1471 		MT_ER_M_PEF!-		;FORMAT ERROR (PE) OR,

                                     061B  1472 		MT_ER_M_VPE,R0		;VERTICLE PARITY ERROR (NRZI)?

                          3C     12  061B  1473 	BNEQ	70$			;IF NEQ YES

            52            05     E0  061D  1474 	BBS	#MT_DS_V_PES,R2,40$	;IF SET, PHASE ENCODED TAPE

                          07         0620       

            50       8400 8F     B3  0621  1475 	BITW	#MT_ER_M_CRC!MT_ER_M_ITM,R0 ;CRC OR INVALID TAPE MARK?

                          31     12  0626  1476 	BNEQ	70$			;IF NEQ YES

                                     0628  1477  

                                     0628  1478 ;

                                     0628  1479 ; FRAME COUNT OR NONEXECUTABLE FUNCTION

                                     0628  1480 ;

                                     0628  1481 ; IF THE RECORD CONTAINED MORE BYTES THAN THE SPECIFIED BUFFER, THEN A DATA OVERRUN

                                     0628  1482 ; IS RETURNED. ELSE A CHECK IS MADE FOR END OF FILE, BEGINNING OF TAPE, AND

                                     0628  1483 ; IMPLICIT WRITECHECK.

                                     0628  1484 ;

                                     0628  1485  

            50       0000'8F     3C  0628  1486 40$:	MOVZWL	#SS$_DATAOVERUN,R0	;SET DATA OVER RUN STATUS

         6E A5       008C C5     B1  062D  1487 	CMPW	UCB$W_MT_FC(R5),UCB$W_BCNT(R5) ;DATA OVER RUN?

                          1D     1A  0633  1488 	BGTRU	60$			;IF GTR YES

            50       0000'8F     3C  0635  1489 	MOVZWL	#SS$_ENDOFFILE,R0	;SET END OF FILE STATUS

            52            02     E0  063A  1490 	BBS	#MT_DS_V_TM,R2,60$	;IF SET, TAPE MARK ENCOUNTERED

                          14         063D       

            52            01     E0  063E  1491 	BBS	#MT_DS_V_BOT,R2,60$	;IF SET, BEGINNING OF TAPE

                          10         0641       

       008C C5            0E     B1  0642  1492 	CMPW	#MIN_RECORD,UCB$W_MT_FC(R5) ;MINIMUM RECORD READ?

                          92     1A  0647  1493 	BGTRU	5$			;IF GTRU NO

         77 A5            0F     91  0649  1494 	CMPB	#CDF_READDATAR,UCB$B_CEX(R5) ;LAST FUNCTION READ DATA?

                          9C     13  064D  1495 	BEQL	10$			;IF EQL YES

            50            00'    3C  064F  1496 50$:	MOVZWL	S^#SS$_NORMAL,R0	;SET NORMAL COMPLETION STATUS

                     0094 C5     D7  0652  1497 60$:	DECL	UCB$L_MT_RECORD(R5)	;DECREMENT TAPE POSITION

                          0218   31  0656  1498 	BRW	FUNCXT			;

                                     0659  1499  

                                     0659  1500 ;

                                     0659  1501 ; FUNCTION ENDED IN A RETRIABLE ERROR

                                     0659  1502 ;

                                     0659  1503  

                                     0659  1504 70$:	TESTR	130$			;TEST FOR RETRIES

         6C A5         6E A5     A0  065E  1505 	ADDW	UCB$W_BCNT(R5),UCB$W_BOFF(R5) ;CALCULATE CORRECT BUFFER ADDRESS

         6C A5       008C C5     A2  0663  1506 	SUBW	UCB$W_MT_FC(R5),UCB$W_BOFF(R5) ;

         6E A5       008C C5     B0  0669  1507 	MOVW	UCB$W_MT_FC(R5),UCB$W_BCNT(R5) ;SET BYTE COUNT TO ACTUAL RECORD SIZE

         70 A5            08     91  066F  1508 	CMPB	#THRESHOLD,UCB$B_ERTCNT(R5) ;TIME TO USE ALTERNATE RECOVERY?

                          26     1B  0673  1509 	BLEQU	90$			;IF LEQU NO

       0098 C5            05     B0  0675  1510 	MOVW	#ERR_SPACING,UCB$W_MT_FORCNT(R5) ;SET FORWARD SPACING COUNT

                                     067A  1511 80$:	EXFUNC	DOUBLE,F_INTSPCFOR	;SPACE RECORD FORWARD

                     0098 C5     B7  0682  1512 	DECW	UCB$W_MT_FORCNT(R5)	;ANY MORE RECORDS TO SPACE?

                          F2     14  0686  1513 	BGTR	80$			;IF GTR YES

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  31

01              READ DATA REVERSE AND WRITECHECK DATA REVERSE F                                                                  (1)



       0098 C5            05     B0  0688  1514 	MOVW	#ERR_SPACING,UCB$W_MT_FORCNT(R5) ;SET REVERSE SPACE COUNT

                                     068D  1515 85$:	EXFUNC	DOUBLE,F_INTSPCREV	;SPACE RECORD REVERSE

                     0098 C5     B7  0695  1516 	DECW	UCB$W_MT_FORCNT(R5)	;ANY MORE RECORDS TO SPACE?

                          F2     14  0699  1517 	BGTR	85$			;IF GTR YES

         77 A5            0D     91  069B  1518 90$:	CMPB	#CDF_WRITECHECKR,UCB$B_CEX(R5) ;WRITE CHECK REVERSE?

                          3D     13  069F  1519 	BEQL	120$			;IF EQL YES

                                     06A1  1520 	EXFUNC	100$,F_READDATA		;READ DATA FORWARD

            51   00060974 8F     D3  06A9  1521 100$:	BITL	#MBA$M_SR_DLT!-		;DATA LATE OR,

                                     06B0  1522 		MBA$M_SR_INVMAP!-	;INVALID MAP REGISTER OR,

                                     06B0  1523 		MBA$M_SR_MAPPE!-	;MAP PARITY ERROR OR,

                                     06B0  1524 		MBA$M_SR_MCPE!-		;MASSBUS CONTROL PARITY ERROR OR,

                                     06B0  1525 		MBA$M_SR_MDPE!-		;MASSBUS DATA PARITY ERROR OR,

                                     06B0  1526 		MBA$M_SR_MXF!-		;MISSED TRANSFER OR,

                                     06B0  1527 		MBA$M_SR_NED!-		;NONEXISTENT DISK OR,

                                     06B0  1528 		MBA$M_SR_RDS,R1		;READ DATA SUBSTITUTE.

                          22     12  06B0  1529 	BNEQ	110$			;IF NEQ YES

            50       3718 8F     B3  06B2  1530 	BITW	#MT_ER_M_CPAR!-		;CONTROL BUS PARITY ERROR, OR

                                     06B7  1531 		MT_ER_M_DTE!-		;DRIVE TIMING ERROR ,OR

                                     06B7  1532 		MT_ER_M_FCE!-		;FRAME COUNT ERROR OR,

                                     06B7  1533 		MT_ER_M_FMT!-		;FORMAT ERROR OR,

                                     06B7  1534 		MT_ER_M_ITM!-		;INVALID TAPE MARK OR,

                                     06B7  1535 		MT_ER_M_NSG!-		;NONSTANDARD GAP OR,

                                     06B7  1536 		MT_ER_M_OPI,R0		;OPERATION INCOMPLETE.

                          1B     12  06B7  1537 	BNEQ	110$			;IF NEQ YES

                                     06B9  1538 	EXFUNC	DOUBLE,F_INTSPCREV	;SPACE RECORD REVERSE

                                     06C1  1539 	EXFUNC	110$,F_READDATA		;READ DATA FORWARD

                                     06C9  1540 	EXFUNC	DOUBLE,F_INTSPCREV	;SPACE RECORD REVERSE

                          FF17   31  06D1  1541 	BRW	10$			;

                       70 A5     96  06D4  1542 110$:	INCB	UCB$B_ERTCNT(R5)	;BIAS ERROR RETRY COUNT

                                     06D7  1543 	TESTR	120$			;TEST FOR TAPE MOVEMENT

                          08     11  06DC  1544 	BRB	130$			;

                                     06DE  1545 120$:	EXFUNC	DOUBLE,F_INTSPCFOR	;SPACE RECORD FORWARD

                          FEF2   31  06E6  1546 130$:	BRW	5$			;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  32

01              WRITE DATA FORWARD FUNCTION                                                                                      (1)



                                     06E9  1548 	.SBTTL	WRITE DATA FORWARD FUNCTION

                                     06E9  1549 ;

                                     06E9  1550 ; WRITE DATA FORWARD FUNCTION

                                     06E9  1551 ;

                                     06E9  1552  

                                     06E9  1553 WRITEDATA:				;WRITE DATA FORWARD

                                     06E9  1554 	REQSCHAN			;REQUEST SECONDARY CHANNEL

                                     06EF  1555 5$:	EXFUNC	20$,F_WRITEDATA		;EXECUTE FUNCTION

         7E A5            0E     E1  06F7  1556 	BBC	#IO$V_DATACHECK,UCB$W_FUNC(R5),10$ ;IF CLR, NO DATA CHECK

                          10         06FB       

                                     06FC  1557 	EXFUNC	DOUBLE,F_INTSPCREV	;SPACE RECORD REVERSE

                                     0704  1558 	EXFUNC	50$,F_WRITECHECK	;WRITE CHECK DATA

       008C C5         6E A5     B0  070C  1559 10$:	MOVW	UCB$W_BCNT(R5),UCB$W_MT_FC(R5) ;SET TRANSFER BYTE COUNT

                     0094 C5     D6  0712  1560 	INCL	UCB$L_MT_RECORD(R5)	;INCREMENT TAPE POSITION

            50            00'    3C  0716  1561 	MOVZWL	S^#SS$_NORMAL,R0	;SET NORMAL COMPLETION STATUS

                          0155   31  0719  1562 	BRW	FUNCXT			;

                                     071C  1563  

                                     071C  1564 ;

                                     071C  1565 ; WRITE FUNCTION ENDED IN AN ERROR

                                     071C  1566 ;

                                     071C  1567 ; THE ERROR COULD BE A NONFATAL CONTROLLER OR DRIVE ERROR. FATAL ERRORS TERMINATE

                                     071C  1568 ; THE FUNCTION IN THE FUNCTION EXECUTOR.

                                     071C  1569 ;

                                     071C  1570 ; FATAL CONTROLLER ERRORS ARE:

                                     071C  1571 ;

                                     071C  1572 ;	ERCONF	= ERROR CONFIRMATION.

                                     071C  1573 ;	ISTO	= INTERFACE SEQUENCE TIMEOUT.

                                     071C  1574 ;	PGE	= PROGRAMMING ERROR.

                                     071C  1575 ;	NED	= NONEXISTENT DRIVE.

                                     071C  1576 ;	RDTO	= READ DATA TIMEOUT.

                                     071C  1577 ;

                                     071C  1578 ; FATAL DRIVE ERRORS ARE:

                                     071C  1579 ;

                                     071C  1580 ;	ILF	= ILLEGAL FUNCTION.

                                     071C  1581 ;	ILR	= ILLEGAL REGISTER.

                                     071C  1582 ;	NEF	= NONEXECUTABLE FUNCTION.

                                     071C  1583 ;	RMR	= REGISTER MODIFY REFUSE.

                                     071C  1584 ;	UNS	= UNSAFE.

                                     071C  1585 ;

                                     071C  1586 ; IGNORED DRIVE ERRORS ARE:

                                     071C  1587 ;

                                     071C  1588 ;	NONE.

                                     071C  1589 ;

                                     071C  1590  

         7E A5       4000 8F     A8  071C  1591 20$:	BISW	#IO$M_DATACHECK,UCB$W_FUNC(R5) ;FORCE DATA CHECK

       008C C5         6E A5     A0  0722  1592 	ADDW	UCB$W_BCNT(R5),UCB$W_MT_FC(R5) ;CALCULATE ACTUAL BYTES TRANSFERED

                                     0728  1593 	TESTR	30$			;TEST REMAINING RETRIES

                                     072D  1594 	EXFUNC	DOUBLE,F_INTSPCREV	;SPACE RECORD REVERSE

         7E A5            0C     E0  0735  1595 30$:	BBS	#IO$V_INHEXTGAP,UCB$W_FUNC(R5),40$ ;IF SET, NO EXTENDED GAP

                          14         0739       

                                     073A  1596 	RELSCHAN			;RELEASE SECONDARY CHANNEL

                                     0740  1597 	EXFUNC	DOUBLE,F_ERASE		;ERASE TAPE

                                     0748  1598 	REQSCHAN			;REQUEST SECONDARY CHANNEL

                          9F     11  074E  1599 40$:	BRB	5$			;

                                     0750  1600  

                                     0750  1601 ;

                                     0750  1602 ; WRITECHECK FUNCTION ENDED IN ERROR

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  33

01              WRITE DATA FORWARD FUNCTION                                                                                      (1)



                                     0750  1603 ;

                                     0750  1604 ; THE WRITECHECK ERROR IS NOT COUNTED AGAINST THE RETRY COUNT, BUT RATHER THE

                                     0750  1605 ; TAPE IS REPOSITIONED AND THE WRITE IS RETRIED.

                                     0750  1606 ;

                                     0750  1607  

       008C C5         6E A5     A0  0750  1608 50$:	ADDW	UCB$W_BCNT(R5),UCB$W_MT_FC(R5) ;CALCULATE TRANSFERED BYTE COUNT

                       70 A5     96  0756  1609 	INCB	UCB$B_ERTCNT(R5)	;BIAS ERROR RETRY COUNT

                                     0759  1610 	TESTR	5$			;TEST REMAINING RETRIES

                                     075E  1611 	EXFUNC	DOUBLE,F_INTSPCREV	;SPACE RECORD REVERSE

                          87     11  0766  1612 	BRB	5$			;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  34

01              CHECK FOR FATAL OR RETRIABLE SPACING ERROR                                                                       (1)



                                     0768  1614 	.SBTTL	CHECK FOR FATAL OR RETRIABLE SPACING ERROR

                                     0768  1615 ;

                                     0768  1616 ; CHECK_ERROR - CHECK FOR FATAL OR RETRIABLE SPACING ERROR

                                     0768  1617 ;

                                     0768  1618 ; THIS ROUTINE IS CALLED FROM THE SPACE FILE FORWARD, SPACE RECORD FORWARD, SPACE

                                     0768  1619 ; FILE REVERSE, AND SPACE RECORD REVERSE FUNCTION ROUTINES TO TEST WHETHER A

                                     0768  1620 ; SPACING ERROR IS FATAL AND WHETHER ANY RETRIES REMAIN.

                                     0768  1621 ;

                                     0768  1622 ; INPUTS:

                                     0768  1623 ;

                                     0768  1624 ;	R0 = DRIVE ERROR REGISTER.

                                     0768  1625 ;	R1 = MBA STATUS REGISTER.

                                     0768  1626 ;	R2 = DRIVE STATUS REGISTER.

                                     0768  1627 ;

                                     0768  1628 ;	UCB$B_CEX(R5) = FUNCTION INDEX OF LAST FUNCTION EXECUTED.

                                     0768  1629 ;	UCB$B_ERTCNT(R5) = NUMBER OF ERROR RETRIES REMAINING.

                                     0768  1630 ;	UCB$W_BCNT(R5) = ORIGINAL SPACING COUNT.

                                     0768  1631 ;	UCB$W_BOFF(R5) = REMAINING SPACING COUNT.

                                     0768  1632 ;

                                     0768  1633 ; OUTPUTS:

                                     0768  1634 ;

                                     0768  1635 ;	IF ONLY A FRAME COUNT ERROR OCCURED, OR THE FUNCTION WAS A REVERSE DIRECTION

                                     0768  1636 ;	FUNCTION AND A CONTROL BUS PARITY ERROR DID NOT OCCUR, THEN AN IMMEDIATE

                                     0768  1637 ;	RETURN TO THE CALLER IS EXECUTED. ELSE THE REMAINING RETRY COUNT IS DE-

                                     0768  1638 ;	CREMENTED, AND IF THE RESULT IS ZERO, THEN THE FUNCTION IS TERMINATED VIA

                                     0768  1639 ;	THE DOUBLE ERROR EXIT. ELSE THE FUNCTION IS REDISPATCHED.

                                     0768  1640 ;

                                     0768  1641  

                                     0768  1642 CHECK_ERROR:				;

                          51   8ED0  0768  1643 	POPL	R1			;REMOVE RETURN ADDRESS FROM STACK

            50       FDFF 8F     B3  076B  1644 	BITW	#^C<MT_ER_M_FCE>,R0	;RETRIABLE OR FATAL ERROR?

                          14     13  0770  1645 	BEQL	20$			;IF EQL NO

                                     0772  1646  

                                     0772  1647 ;

                                     0772  1648 ; RETRIABLE OR FATAL DRIVE ERROR

                                     0772  1649 ;

                                     0772  1650 ;	CPAR	= CONTROL BUS PARITY ERROR.

                                     0772  1651 ;	NEF	= NONEXECUTABLE FUNCTION.

                                     0772  1652 ;	OPI	= OPERATION INCOMPLETE.

                                     0772  1653 ;

                                     0772  1654  

            50            03     E0  0772  1655 	BBS	#MT_ER_V_CPAR,R0,40$	;IF SET, CONTROL BUS PARITY ERROR

                          16         0775       

                                     0776  1656  

                                     0776  1657 ;

                                     0776  1658 ; ERROR WAS EITHER A NONEXECUTABLE FUNCTION OR OPERATION INCOMPLETE

                                     0776  1659 ;

                                     0776  1660  

         77 A5            05     91  0776  1661 	CMPB	#CDF_SPCFILREV,UCB$B_CEX(R5) ;SPACE FILE REVERSE?

                          06     13  077A  1662 	BEQL	10$			;IF EQL YES

         77 A5            07     91  077C  1663 	CMPB	#CDF_SPCRECREV,UCB$B_CEX(R5) ;SPACE RECORD REVERSE?

                          06     12  0780  1664 	BNEQ	30$			;IF NEQ NO

            52            01     E1  0782  1665 10$:	BBC	#MT_DS_V_BOT,R2,30$	;IF CLR, NOT AT BEGINNING OF TAPE

                          02         0785       

                          61     17  0786  1666 20$:	JMP	(R1)			;

                                     0788  1667  

                                     0788  1668 ;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  35

01              CHECK FOR FATAL OR RETRIABLE SPACING ERROR                                                                       (1)



                                     0788  1669 ; FORCE FATAL ERROR ON NONEXECUTABLE FUNCTION OR OPERATION INCOMPLETE FOR A FORWARD

                                     0788  1670 ; DIRECTION FUNCTION, OR A REVERSE DIRECTION FUNCTION THAT DID NOT END UP AT BEGINNI

                                     0788  1671 ; OF TAPE.

                                     0788  1672 ;

                                     0788  1673  

         70 A5            01     90  0788  1674 30$:	MOVB	#1,UCB$B_ERTCNT(R5)	;SET RETRY COUNT TO ONE

                                     078C  1675  

                                     078C  1676 ;

                                     078C  1677 ; ERROR WAS A CONTROL BUS PARITY ERROR OR A NONEXECUTABLE FUNCTION OR OPERATION

                                     078C  1678 ; INCOMPLETE IN COMBINATION WITH A REVERSE DIRECTION FUNCTION

                                     078C  1679 ;

                                     078C  1680  

                       6C A5     A3  078C  1681 40$:	SUBW3	UCB$W_BOFF(R5),UCB$W_BCNT(R5),- ;CALCULATE TOTAL SPACE COUNT

       008C C5         6E A5         078F  1682 		UCB$W_MT_FC(R5)		;

                 00000000'GF     16  0794  1683 	JSB	G^ERL$DEVICERR		;LOG DEVICE ERROR

                       70 A5     97  079A  1684 	DECB	UCB$B_ERTCNT(R5)	;ANY RETRIES REMAINING?

                          5F     13  079D  1685 	BEQL	DOUBLE			;IF EQL NO

                          FAAA   31  079F  1686 	BRW	FDISPATCH		;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  36

01              TEST FOR REMAINING RETRIES                                                                                       (1)



                                     07A2  1688 	.SBTTL	TEST FOR REMAINING RETRIES

                                     07A2  1689 ;

                                     07A2  1690 ; TESTR - TEST FOR REMAINING RETRIES

                                     07A2  1691 ;

                                     07A2  1692 ; THIS ROUTINE IS CALLED FROM THE READ DATA, READ DATA REVERSE, WRITECHECK,

                                     07A2  1693 ; WRITECHECK REVERSE, WRITE DATA, AND WRITE TAPE MARK FUNCTION ROUTINES TO

                                     07A2  1694 ; TEST FOR REMAINING RETRIES.

                                     07A2  1695 ;

                                     07A2  1696 ; INPUTS:

                                     07A2  1697 ;

                                     07A2  1698 ;	R0 = DRIVE ERROR REGISTER.

                                     07A2  1699 ;	R1 = MBA STATUS REGISTER.

                                     07A2  1700 ;	R2 = DRIVE STATUS REGISTER.

                                     07A2  1701 ;

                                     07A2  1702 ;	UCB$B_CEX(R5) = FUNCTION INDEX OF LAST FUNCTION EXECUTED.

                                     07A2  1703 ;	UCB$B_ERTCNT(R5) = NUMBER OF ERROR RETRIES REMAINING.

                                     07A2  1704 ;	UCB$L_MT_RECORD(R5) = CURRENT TAPE POSITION BEFORE FUNCTION EXECUTION.

                                     07A2  1705 ;	UCB$W_MT_DS(R5) = SAVED DRIVE STATUS REGISTER.

                                     07A2  1706 ;	UCB$W_FUNC(R5) = ORIGINAL FUNCTION WORD.

                                     07A2  1707 ;	UCB$W_MT_FC(R5) = NUMBER OF BYTES THAT WERE READ OR WRITTEN TO/FROM TAPE.

                                     07A2  1708 ;

                                     07A2  1709 ;	@(SP) = SIGNED BRANCH DISPLACEMENT TO CONDITIONAL EXIT POINT.

                                     07A2  1710 ;

                                     07A2  1711 ; OUTPUTS:

                                     07A2  1712 ;

                                     07A2  1713 ;	THE REMAINING RETRY COUNT IS DECREMENTED AND IF THE RESULT IS ZERO, THEN

                                     07A2  1714 ;	THE FUNCTION IS TERMINATED WITH AN ERROR VIA THE FATAL ERROR EXIT AFTER

                                     07A2  1715 ;	HAVING ADJUSTED THE CURRENT TAPE POSITION. ELSE THE CONDITIONAL BRANCH

                                     07A2  1716 ;	EXIT IS TAKEN IF NO TAPE MOVEMENT OCCURED.

                                     07A2  1717 ;

                                     07A2  1718  

                                     07A2  1719 TESTR:					;

                 00000000'GF     16  07A2  1720 	JSB	G^ERL$DEVICERR		;LOG DEVICE ERROR

                       70 A5     97  07A8  1721 	DECB	UCB$B_ERTCNT(R5)	;ANY RETRIES REMAINING?

                          18     13  07AB  1722 	BEQL	20$			;IF EQL NO

       008C C5            0E     B1  07AD  1723 	CMPW	#MIN_RECORD,UCB$W_MT_FC(R5) ;ANY TAPE MOVEMENT?

                          0D     1B  07B2  1724 	BLEQU	10$			;IF LEQU YES

       0088 C5            02     E0  07B4  1725 	BBS	#MT_DS_V_TM,UCB$W_MT_DS(R5),10$ ;IF SET, TAPE MARK DETECTED

                          07         07B9       

            7E         00 BE     32  07BA  1726 	CVTWL	@(SP),-(SP)		;GET DISPLACEMENT VALUE

            6E            8E     C0  07BE  1727 	ADDL	(SP)+,(SP)		;CALCULATE BRANCH ADDRESS

            6E            02     C0  07C1  1728 10$:	ADDL	#2,(SP)			;

                                 05  07C4  1729 	RSB				;

                                     07C5  1730  

                                     07C5  1731 ;

                                     07C5  1732 ; ERROR RETRIES EXHAUSTED

                                     07C5  1733 ;

                                     07C5  1734 ; CHECK FOR TAPE MOVEMENT, ADJUST TAPE POSITION AS APPROPRIATE, AND TAKE FATAL

                                     07C5  1735 ; ERROR EXIT.

                                     07C5  1736 ;

                                     07C5  1737  

                          8E     D5  07C5  1738 20$:	TSTL	(SP)+			;REMOVE RETURN FROM STACK

       0088 C5            02     E0  07C7  1739 	BBS	#MT_DS_V_TM,UCB$W_MT_DS(R5),30$ ;IF SET, TAPE MARK DETECTED

                          07         07CC       

       008C C5            0E     B1  07CD  1740 	CMPW	#MIN_RECORD,UCB$W_MT_FC(R5) ;ANY TAPE MOVEMENT?

                          15     1A  07D2  1741 	BGTRU	40$			;IF GTRU NO

                     0094 C5     D7  07D4  1742 30$:	DECL	UCB$L_MT_RECORD(R5)	;ASSUME REVERSE TAPE OPERATION

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  37

01              TEST FOR REMAINING RETRIES                                                                                       (1)



         77 A5            0F     91  07D8  1743 	CMPB	#CDF_READDATAR,UCB$B_CEX(R5) ;READ DATA REVERSE?

                          0B     13  07DC  1744 	BEQL	40$			;IF EQL YES

         77 A5            0D     91  07DE  1745 	CMPB	#CDF_WRITECHECKR,UCB$B_CEX(R5) ;WRITE CHECK REVERSE?

                          05     13  07E2  1746 	BEQL	40$			;IF EQL YES

       0094 C5            02     C0  07E4  1747 	ADDL	#2,UCB$L_MT_RECORD(R5)	;ADJUST FOR FORWARD TAPE OPERATION

                          0016   31  07E9  1748 40$:	BRW	FATALERR		;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  38

01              TAPE POSITION LOST                                                                                               (1)



                                     07EC  1750 	.SBTTL	TAPE POSITION LOST

                                     07EC  1751 ;

                                     07EC  1752 ; TAPE POSITION LOST

                                     07EC  1753 ;

                                     07EC  1754  

                                     07EC  1755 LOSTPOS:				;

         3E A5            10     A8  07EC  1756 	BISW	#<MT$M_LOST@-16>,UCB$L_DEVDEPEND+2(R5) ;SET TAPE POSITION LOST

                                     07F0  1757  

                                     07F0  1758 ;

                                     07F0  1759 ; TEST FOR RETRY

                                     07F0  1760 ;

                                     07F0  1761  

                                     07F0  1762 RETRY:					;TEST FOR RETRY

                 00000000'GF     16  07F0  1763 	JSB	G^ERL$DEVICERR		;LOG DEVICE ERROR

                       70 A5     97  07F6  1764 	DECB	UCB$B_ERTCNT(R5)	;ANY RETRIES REMAINING?

                          07     13  07F9  1765 	BEQL	FATALERR		;IF EQL NO

                          FA4E   31  07FB  1766 	BRW	FDISPATCH		;

                                     07FE  1767  

                                     07FE  1768 ;

                                     07FE  1769 ; DOUBLE ERROR WHILE TRYING TO REPOSITION TAPE - TAPE POSITION LOST

                                     07FE  1770 ;

                                     07FE  1771  

                                     07FE  1772 DOUBLE:					;

         3E A5            10     A8  07FE  1773 	BISW	#<MT$M_LOST@-16>,UCB$L_DEVDEPEND+2(R5) ;SET LOST POSITION STATUS

                                     0802  1774  

                                     0802  1775 ;

                                     0802  1776 ; FATAL CONTROLLER/DRIVE ERROR, ERROR RETRY COUNT EXHAUSTED, ERROR RETRY

                                     0802  1777 ; INHIBITED, OR FINAL OFFSET TRIED

                                     0802  1778 ;

                                     0802  1779  

                                     0802  1780 FATALERR:				;FATAL ERROR - SET STATUS

            53            50     D0  0802  1781 	MOVL	R0,R3			;COPY ERROR STATUS REGISTER

            50       0000'8F     3C  0805  1782 	MOVZWL	#SS$_MEDOFL,R0		;SET MEDIUM OFFLINE STATUS

            52            0C     E1  080A  1783 	BBC	#MT_DS_V_MOL,R2,FUNCXT	;IF CLR, MEDIUM OFFLINE

                          63         080D       

            53            0B     E1  080E  1784 	BBC	#MT_ER_V_NEF,R3,10$	;IF CLR, EXECUTABLE FUNCTION

                          09         0811       

            50       0000'8F     3C  0812  1785 	MOVZWL	#SS$_WRITLCK,R0		;SET WRITE LOCK ERROR STATUS

            52            0B     E0  0817  1786 	BBS	#MT_DS_V_WRL,R2,FUNCXT	;IF SET, DRIVE HARDWARE WRITE LOCKED

                          56         081A       

            50       0000'8F     3C  081B  1787 10$:	MOVZWL	#SS$_UNSAFE,R0		;SET DRIVE UNSAFE STATUS

            53            0E     E0  0820  1788 	BBS	#MT_ER_V_UNS,R3,FUNCXT	;IF SET, DRIVE UNSAFE

                          4D         0823       

            50       0000'8F     3C  0824  1789 	MOVZWL	#SS$_OPINCOMPL,R0	;SET OPERATION INCOMPLETE STATUS

            53            0D     E0  0829  1790 	BBS	#MT_ER_V_OPI,R3,FUNCXT	;IF SET, OPERATION INCOMPLETE

                          44         082C       

            50       0000'8F     3C  082D  1791 	MOVZWL	#SS$_FORMAT,R0		;SET FORMAT ERROR STATUS

            53            04     E0  0832  1792 	BBS	#MT_ER_V_FMT,R3,FUNCXT	;IF SET, FORMAT ERROR

                          3B         0835       

            50       0000'8F     3C  0836  1793 	MOVZWL	#SS$_DRVERR,R0		;SET DRIVE ERROR STATUS

            53       1807 8F     B3  083B  1794 	BITW	#MT_ER_M_DTE!-		;DRIVE TIMING ERROR OR,

                                     0840  1795 		MT_ER_M_ILF!-		;ILLEGAL FUNCTION OR,

                                     0840  1796 		MT_ER_M_ILR!-		;ILLEGAL REGISTER OR,

                                     0840  1797 		MT_ER_M_NEF!-		;NON-EXECUTABLE FUNCTION OR,

                                     0840  1798 		MT_ER_M_RMR,R3		;REGISTER MODIFY REFUSE

                          2F     12  0840  1799 	BNEQ	FUNCXT			;IF NEQ YES

            50       0000'8F     3C  0842  1800 	MOVZWL	#SS$_PARITY,R0		;SET PARITY ERROR STATUS

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  39

01              TAPE POSITION LOST                                                                                               (1)



            53       85E8 8F     B3  0847  1801 	BITW	#MT_ER_M_CRC!-		;CRC ERROR OR,

                                     084C  1802 		MT_ER_M_CPAR!-		;CONTROL BUS PARITY ERROR OR,

                                     084C  1803 		MT_ER_M_COR!-		;CORRECTABLE DATA ERROR (PE) OR,

                                     084C  1804 		MT_ER_M_CS!-		;CORRECTABLE SKEW (PE) OR,

                                     084C  1805 		MT_ER_M_DPAR!-		;DATA PARITY ERROR OR,

                                     084C  1806 		MT_ER_M_INC!-		;INCORRECTABLE ERROR (PE) OR,

                                     084C  1807 		MT_ER_M_ITM!-		;INVALID TAPE MARK OR,

                                     084C  1808 		MT_ER_M_LRC!-		;LONGITUDINAL PARITY ERROR (NRZI) OR,

                                     084C  1809 		MT_ER_M_NSG!-		;NONSTANDARD GAP OR,

                                     084C  1810 		MT_ER_M_PEF!-		;FORMAT ERROR (PE) OR,

                                     084C  1811 		MT_ER_M_VPE,R3		;VERTICLE PARITY ERROR (NRZI)?

                          23     12  084C  1812 	BNEQ	FUNCXT			;IF NEQ YES

            51   00020064 8F     D3  084E  1813 	BITL	#MBA$M_SR_MAPPE!-	;MAP PARITY ERROR OR,

                                     0855  1814 		MBA$M_SR_MCPE!-		;MASSBUS CONTROL PARITY ERROR OR,

                                     0855  1815 		MBA$M_SR_MDPE!-		;MASSBUS DATA PARITY ERROR OR,

                                     0855  1816 		MBA$M_SR_RDS,R1		;READ DATA SUBSTITUTE?

                          1A     12  0855  1817 	BNEQ	FUNCXT			;IF NEQ YES

            50       0000'8F     3C  0857  1818 	MOVZWL	#SS$_DATACHECK,R0	;SET DATA CHECK ERROR STATUS

            51       0600 8F     B3  085C  1819 	BITW	#MBA$M_SR_WCKLWR!-	;WRITE CHECK ERROR LOWER BYTE OR,

                                     0861  1820 		MBA$M_SR_WCKUPR,R1	;WRITE CHECK ERROR UPPER BYTE?

                          0E     12  0861  1821 	BNEQ	FUNCXT			;IF NEQ YES

            50       0000'8F     3C  0863  1822 	MOVZWL	#SS$_NONEXDRV,R0	;SET NONEXISTENT DRIVE STATUS

            51            12     E0  0868  1823 	BBS	#MBA$V_SR_NED,R1,FUNCXT	;IF SET, NONEXISTENT DRIVE

                          05         086B       

            50       0000'8F     3C  086C  1824 	MOVZWL	#SS$_CTRLERR,R0		;SET CONTROLLER ERROR STATUS

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  40

01              FUNCTION COMPLETION COMMON EXIT                                                                                  (1)



                                     0871  1826 	.SBTTL	FUNCTION COMPLETION COMMON EXIT

                                     0871  1827 ;

                                     0871  1828 ; FUNCTION COMPLETION COMMON EXIT

                                     0871  1829 ;

                                     0871  1830 ; THIS ROUTINE IS JUMPED TO AT THE END OF ALL MAGTAPE OPERATIONS.

                                     0871  1831 ;

                                     0871  1832 ; INPUTS:

                                     0871  1833 ;

                                     0871  1834 ;	R0 = FINAL I/O COMPLETION STATUS.

                                     0871  1835 ;	R2 = DRIVE STATUS REGISTER.

                                     0871  1836 ;

                                     0871  1837 ;	UCB$B_FEX(R5) = FUNCTION EXECUTION INDEX.

                                     0871  1838 ;

                                     0871  1839 ; OUTPUTS:

                                     0871  1840 ;

                                     0871  1841 ;	THE FINAL DRIVE STATUS IS TESTED AND THE FOLLOWING STATUS BITS ARE SET

                                     0871  1842 ;	IN THE SECOND WORD OF THE DEVICE DEPENDENT CHARACTERISTICS LONGWORD.

                                     0871  1843 ;

                                     0871  1844 ;		MT$M_BOT = SET IF TAPE IS AT BEGINNING OF TAPE AT END OF FUNCTION.

                                     0871  1845 ;		MT$M_EOF = SET IF A VALID TAPE MARK WAS DETECTED DURING THE TAPE

                                     0871  1846 ;			OPERATION.

                                     0871  1847 ;		MT$M_EOT = SET IF AN END OF TAPE CONDITION WAS PRESENT AT THE END

                                     0871  1848 ;			OF THE TAPE OPERATION AND THE FUNCTION WAS A READ DATA

                                     0871  1849 ;			FORWARD, WRITECHECK DATA FORWARD, WRITE DATA FORWARD, OR

                                     0871  1850 ;			SPACE RECORD FORWARD FUNCTION.

                                     0871  1851 ;		MT$M_HWL = SET IF THE SLAVE DRIVE HAS A TAPE MOUNTED THAT DOES NOT

                                     0871  1852 ;			CONTAIN A WRITE RING.

                                     0871  1853 ;

                                     0871  1854  

                                     0871  1855 FUNCXT:					;FUNCTION EXIT

            51         76 A5     9A  0871  1856 	MOVZBL	UCB$B_FEX(R5),R1	;GET FUNCTION DISPATCH INDEX

         3E A5            0F     AA  0875  1857 	BICW	#<MT$M_BOT!-		;CLEAR BEGINNING OF TAPE AND,

                                     0879  1858 		MT$M_EOF!-		;END OF FILE AND,

                                     0879  1859 		MT$M_EOT!-		;END OF TAPE AND,

                                     0879  1860 		MT$M_HWL>@-16,UCB$L_DEVDEPEND+2(R5) ;HARDWARE WRITE LOCK

            52            01     E1  0879  1861 	BBC	#MT_DS_V_BOT,R2,10$	;IF CLR, NOT AT BEGINNING OF TAPE

                          0C         087C       

         3E A5            01     A8  087D  1862 	BISW	#<MT$M_BOT@-16>,UCB$L_DEVDEPEND+2(R5) ;SET BEGINNING OF TAPE

         3E A5            10     AA  0881  1863 	BICW	#<MT$M_LOST@-16>,UCB$L_DEVDEPEND+2(R5) ;CLEAR TAPE POSITION LOST

                     0094 C5     D4  0885  1864 	CLRL	UCB$L_MT_RECORD(R5)	;CLEAR TAPE POSITION

            52            02     E1  0889  1865 10$:	BBC	#MT_DS_V_TM,R2,30$	;IF CLR, NO TAPE MARK DETECTED

                          23         088C       

         3E A5            02     A8  088D  1866 	BISW	#<MT$M_EOF@-16>,UCB$L_DEVDEPEND+2(R5) ;SET END OF FILE

            51            0A     91  0891  1867 	CMPB	#CDF_WRITECHECK,R1	;DATA TRANSFER FUNCTION?

                          1A     1A  0894  1868 	BGTRU	30$			;IF GTRU NO

            51            13     91  0896  1869 	CMPB	#CDF_WRITEMARK,R1	;WRITE TAPE MARK FUNCTION?

                          05     13  0899  1870 	BEQL	20$			;IF EQL YES

            51            10     91  089B  1871 	CMPB	#CDF_READPRESET,R1	;DATA TRANSFER FUNCTION?

                          10     1B  089E  1872 	BLEQU	30$			;IF LEQU NO

                     008C C5     B4  08A0  1873 20$:	CLRW	UCB$W_MT_FC(R5)		;CLEAR FRAME COUNT

            50       0000'8F     B1  08A4  1874 	CMPW	#SS$_DATACHECK,R0	;WRITE CHECK ERROR?

                          05     12  08A9  1875 	BNEQ	30$			;IF NEQ NO

            50       0000'8F     3C  08AB  1876 	MOVZWL	#SS$_ENDOFFILE,R0	;SET END OF FILE STATUS

            52            0A     E1  08B0  1877 30$:	BBC	#MT_DS_V_EOT,R2,40$	;IF CLR, NOT AT END OF TAPE

                          20         08B3       

            51            05     91  08B4  1878 	CMPB	#CDF_SPCFILREV,R1	;SPACE FILE REVERSE?

                          1B     13  08B7  1879 	BEQL	40$			;IF EQL YES

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  41

01              FUNCTION COMPLETION COMMON EXIT                                                                                  (1)



            51            07     91  08B9  1880 	CMPB	#CDF_SPCRECREV,R1	;SPACE RECORD REVERSE?

                          16     13  08BC  1881 	BEQL	40$			;IF EQL YES

            51            0D     91  08BE  1882 	CMPB	#CDF_WRITECHECKR,R1	;WRITE CHECK REVERSE?

                          11     13  08C1  1883 	BEQL	40$			;IF EQL YES

            51            0F     91  08C3  1884 	CMPB	#CDF_READDATAR,R1	;READ DATA REVERSE?

                          0C     13  08C6  1885 	BEQL	40$			;IF EQL YES

         3E A5            04     A8  08C8  1886 	BISW	#<MT$M_EOT@-16>,UCB$L_DEVDEPEND+2(R5) ;SET END OF TAPE

            05            50     E9  08CC  1887 	BLBC	R0,40$			;IF LBC ALREADY RETURNING ERROR

            50       0000'8F     3C  08CF  1888 	MOVZWL	#SS$_ENDOFTAPE,R0	;SET END OF TAPE STATUS

            52            0B     E1  08D4  1889 40$:	BBC	#MT_DS_V_WRL,R2,50$	;IF CLR, NOT HARDWARE WRITE LOCKED

                          04         08D7       

         3E A5            08     A8  08D8  1890 	BISW	#<MT$M_HWL@-16>,UCB$L_DEVDEPEND+2(R5) ;SET HARDWARE WRITE LOCKED

                          50     DD  08DC  1891 50$:	PUSHL	R0			;SAVE FINAL STATUS

                 00000000'GF     16  08DE  1892 	JSB	G^IOC$DIAGBUFILL	;FILL DIAGNOSTIC BUFFER IF PRESENT

         02 AE       008C C5     B0  08E4  1893 	MOVW	UCB$W_MT_FC(R5),2(SP)	;SET BYTES TRANSFERED OR RECORDS/FILES SKIPPED

            36            6E     E8  08EA  1894 	BLBS	(SP),70$		;IF LBS SUCCESSFUL COMPLETION

            54         4C A5     D0  08ED  1895 	MOVL	UCB$L_IRP(R5),R4	;GET ADDRESS OF CURRENT I/O PACKET

         2A A4            04     E1  08F1  1896 	BBC	#IRP$V_VIRTUAL,IRP$W_STS(R4),70$ ;IF CLR, NOT VIRTUAL FUNCTION

                          2D         08F5       

            54         18 A4     D0  08F6  1897 	MOVL	IRP$L_WIND(R4),R4	;GET ADDRESS OF WINDOW BLOCK

                       16 A4     B4  08FA  1898 	CLRW	WCB$W_NMAP(R4)		;CLEAR NUMBER OF MAPPING POINTERS

            54         30 A5     D0  08FD  1899 	MOVL	UCB$L_VCB(R5),R4	;GET ADDRESS OF VCB LISTHEAD

            52         40 A5     9E  0901  1900 	MOVAB	UCB$L_IOQFL(R5),R2	;GET ADDRESS OF I/O QUEUE

            53            52     D0  0905  1901 	MOVL	R2,R3			;SET ADDRESS OF PREVIOUS ENTRY

            53            63     D0  0908  1902 60$:	MOVL	(R3),R3			;GET ADDRESS OF NEXT ENTRY

            52            53     D1  090B  1903 	CMPL	R3,R2			;END OF LIST?

                          13     13  090E  1904 	BEQL	70$			;IF EQL YES

         2A A3            04     E1  0910  1905 	BBC	#IRP$V_VIRTUAL,IRP$W_STS(R3),60$ ;IF CLR, NOT VIRTUAL FUNCTION

                          F3         0914       

            53         04 A3     D0  0915  1906 	MOVL	4(R3),R3		;RETRIEVE ADDRESS OF PREVIOUS ENTRY

            51         00 B3     0F  0919  1907 	REMQUE	@(R3),R1		;REMOVE ENTRY FROM DRIVER QUEUE

         04 B4            61     0E  091D  1908 	INSQUE	(R1),@4(R4)		;INSERT ENTRY IN BLOCKED I/O LIST

                          E5     11  0921  1909 	BRB	60$			;

                          50   8ED0  0923  1910 70$:	POPL	R0			;RETRIEVE FINAL STATUS

            51         3C A5     D0  0926  1911 STSXIT:	MOVL	UCB$L_DEVDEPEND(R5),R1	;SET MAGTAPE STATUS AND CHARACTERISTICS

                                     092A  1912 	REQCOM				;COMPLETE REQUEST

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  42

01              TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION                                                                       (1)



                                     0930  1914 	.SBTTL	TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION

                                     0930  1915 ;

                                     0930  1916 ; FEX - TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION

                                     0930  1917 ;

                                     0930  1918 ; THIS ROUTINE IS CALLED VIA A BSB WITH A WORD IMMEDIATELY FOLLOWING THAT

                                     0930  1919 ; SPECIFIES THE ADDRESS OF AN ERROR ROUTINE. ALL DATA IS ASSUMED TO HAVE BEEN

                                     0930  1920 ; SET UP IN THE UCB BEFORE THE CALL. THE APPROPRIATE PARAMETERS ARE LOADED

                                     0930  1921 ; INTO DEVICE REGISTERS AND THE FUNCTION IS INITIATED. IF THE FUNCTION IS AN

                                     0930  1922 ; IMMEDIATE FUNCTION CONTROL RETURNS IMMEDIATELY. ELSE THE RETURN ADDRESS

                                     0930  1923 ; IS STORED IN THE UCB AND A WAITFOR INTERRUPT IS EXECUTED. WHEN THE INTER-

                                     0930  1924 ; RUPT OCCURS, CONTROL IS RETURNED TO THE CALLER.

                                     0930  1925 ;

                                     0930  1926 ; INPUTS:

                                     0930  1927 ;

                                     0930  1928 ;	R0 = FUNCTION TABLE DISPATCH INDEX.

                                     0930  1929 ;	R3 = ADDRESS OF DRIVE CONTROL STATUS REGISTER 1.

                                     0930  1930 ;	R4 = ADDRESS OF MBA CONFIGURATION STATUS REGISTER.

                                     0930  1931 ;	R5 = DEVICE UNIT UCB ADDRESS.

                                     0930  1932 ;

                                     0930  1933 ;	00(SP) = RETURN ADDRESS OF CALLER.

                                     0930  1934 ;	04(SP) = RETURN ADDRESS OF CALLER'S CALLER.

                                     0930  1935 ;

                                     0930  1936 ;	IMMEDIATELY FOLLOWING INLINE AT THE CALL SITE IS A WORD WHICH CONTAINS

                                     0930  1937 ;	A BRANCH DESTINATION TO AN ERROR RETRY ROUTINE.

                                     0930  1938 ;

                                     0930  1939 ; OUTPUTS:

                                     0930  1940 ;

                                     0930  1941 ;	THERE ARE FOUR EXITS FROM THIS ROUTINE:

                                     0930  1942 ;

                                     0930  1943 ;	1. SPECIAL CONDITION - THIS EXIT IS TAKEN IF A POWER FAILURE OCCURS

                                     0930  1944 ;		OR THE OPERATION TIMES OUT. IT IS A JUMP TO THE APPROPRIATE

                                     0930  1945 ;		ERROR ROUTINE.

                                     0930  1946 ;

                                     0930  1947 ;	2. FATAL ERROR - THIS EXIT IS TAKEN IF A FATAL CONTROLLER OR DRIVE

                                     0930  1948 ;		ERROR OCCURS OR IF ANY ERROR OCCURS AND ERROR RETRY IS

                                     0930  1949 ;		INHIBITED. IT IS A JUMP TO THE FATAL ERROR EXIT ROUTINE.

                                     0930  1950 ;

                                     0930  1951 ;	3. RETRIABLE ERROR - THIS EXIT IS TAKEN IF A RETRIABLE CONTROLLER

                                     0930  1952 ;		OR DRIVE ERROR OCCURS AND ERROR RETRY IS NOT INHIBITED.

                                     0930  1953 ;		IT CONSISTS OF TAKING THE ERROR BRANCH EXIT.

                                     0930  1954 ;

                                     0930  1955 ;	4. SUCCESSFUL OPERATION - THIS EXIT IS TAKEN IF NO ERROR OCCURS

                                     0930  1956 ;		DURING THE OPERATION. IT CONSISTS OF A RETURN INLINE.

                                     0930  1957 ;

                                     0930  1958 ;	IN ALL CASES IF AN ERROR OCCURS, AN ATTEMPT IS MADE TO LOG THE ERROR.

                                     0930  1959 ;

                                     0930  1960 ;	IN ALL CASES FINAL DRIVE AND CONTROLLER REGISTERS ARE RETURNED VIA

                                     0930  1961 ;	THE GENERAL REGISTERS R0, R1, AND R2, AND THE UCB.

                                     0930  1962 ;

                                     0930  1963 ;	R0 = DRIVE ERROR REGISTER.

                                     0930  1964 ;	R1 = MBA STATUS REGISTER.

                                     0930  1965 ;	R2 = DRIVE STATUS REGISTER.

                                     0930  1966 ;

                                     0930  1967 ;	UCB$W_MT_FC(R5) = FRAME COUNT REGISTER.

                                     0930  1968 ;

                                     0930  1969  

                                     0930  1970 FEX:					;FUNCTION EXECUTOR

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  43

01              TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION                                                                       (1)



                     0080 C5   8ED0  0930  1971 	POPL	UCB$L_DPC(R5)		;SAVE DRIVER PC VALUE

         77 A5            50     90  0935  1972 	MOVB	R0,UCB$B_CEX(R5)	;SAVE CASE INDEX

                                     0939  1973 RESTART:				;RESTART FUNCTION

         24 A3       009A C5     3C  0939  1974 	MOVZWL	UCB$W_MT_TC(R5),MT_TC(R3) ;SELECT DRIVE AND SET CHARACTERISTICS

            63            09     9A  093F  1975 	MOVZBL	#F_DRVCLR!1,MT_CS1(R3)	;CLEAR DRIVE

                                     0942  1976 	CASE	R0,<-			;DISPATCH TO PROPER FUNCTION ROUTINE

                                     0942  1977 		IMMED,-			;NO OPERATION

                                     0942  1978 		POSIT,-			;UNLOAD VOLUME

                                     0942  1979 		POSIT,-			;SPACE FILE FORWARD

                                     0942  1980 		RECAL,-			;REWIND

                                     0942  1981 		IMMED,-			;DRIVE CLEAR

                                     0942  1982 		POSIT,-			;SPACE FILE REVERSE

                                     0942  1983 		POSIT,-			;ERASE TAPE

                                     0942  1984 		POSIT,-			;SPACE RECORD REVERSE

                                     0942  1985 		IMMED,-			;NO OPERATION

                                     0942  1986 		POSIT,-			;SPACE RECORD FORWARD

                                     0942  1987 		XFER,-			;WRITE CHECK FORWARD

                                     0942  1988 		XFER,-			;WRITE DATA FORWARD

                                     0942  1989 		XFER,-			;READ DATA FORWARD

                                     0942  1990 		XFER,-			;WRITECHECK REVERSE

                                     0942  1991 		XFER,-			;WRITE DATA FORWARD

                                     0942  1992 		XFER,-			;READ DATA REVERSE

                                     0942  1993 		RECAL,-			;READ IN PRESET

                                     0942  1994 		IMMED,-			;SET TAPE CHARACTERISTICS

                                     0942  1995 		IMMED,-			;SENSE CHARACTERISTICS

                                     0942  1996 		POSIT,-			;WRITE TAPE MARK

                                     0942  1997 		>			;

                                     096E  1998  

                                     096E  1999 ;

                                     096E  2000 ; INTERNAL SPACING FUNCTIONS

                                     096E  2001 ;

                                     096E  2002 ;	SPACE RECORD FORWARD, AND

                                     096E  2003 ;	SPACE RECORD REVERSE.

                                     096E  2004 ;

                                     096E  2005 ; THESE FUNCTIONS ARE EXECUTED TO EFFECT SPACING OPERATIONS DURING THE ERROR

                                     096E  2006 ; RECOVERY OF WRITE TAPE MARK, ERASE TAPE, AND ALL DATA TRANSFER FUNCTIONS.

                                     096E  2007 ; WRITE CHECK AND WRITE CHECK REVERSE FUNCTIONS ARE USED TO ACTUALLY POSITION

                                     096E  2008 ; THE TAPE. IF A NOISE RECORD IS ENCOUNTERED, IT IS IGNORED.

                                     096E  2009 ;

                                     096E  2010  

                                     096E  2011 INTSPC:					;INTERNAL SPACE FUNCTIONS

                          050F   30  096E  2012 	BSBW	TM_SETINTSPC		;SETUP FOR INTERNAL SPACE FUNCTION

            50         77 A5     9A  0971  2013 	MOVZBL	UCB$B_CEX(R5),R0	;RETRIEVE FUNCTION INDEX

            50            15     91  0975  2014 	CMPB	#CDF_INTSPCREV,R0	;SPACE RECORD REVERSE?

                          06     12  0978  2015 	BNEQ	10$			;IF NEQ NO

         0C A4       01FF 8F     3C  097A  2016 	MOVZWL	#511,MBA$L_VAR(R4)	;ADJUST VIRTUAL ADDRESS REGISTER

                                     0980  2017 10$:	DSBINT				;DISABLE INTERRUPTS

         58 A5            05     E0  0986  2018 	BBS	#UCB$V_POWER,UCB$W_STS(R5),20$ ;IF SET, POWER FAILED

                          50         098A       

            63       F6A6 CF40   9A  098B  2019 	MOVZBL	FTAB[R0],MT_CS1(R3)	;EXECUTE FUNCTION

                                     0991  2020 	WFIKPCH	RETREG,TIME_OUT[R0]	;WAIT FOR INTERRUPT AND KEEP CHANNEL

       0084 C5         08 A4     D0  099E  2021 	MOVL	MBA$L_SR(R4),UCB$L_MT_SR(R5) ;SAVE FINAL MBA STATUS

                          04B8   30  09A4  2022 	BSBW	TM_SAVDRVSTS		;SAVE DRIVE STATUS

                                     09A7  2023 	IOFORK				;CREATE FORK PROCESS

         58 A5            05     E0  09AD  2024 	BBS	#UCB$V_POWER,UCB$W_STS(R5),30$ ;IF SET, POWER FAILED

                          2C         09B1       

       0084 C5   00013F80 8F     CA  09B2  2025 	BICL	#MBA$M_SR_ATTN!-	;CLEAR ATTENTION AND,

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  44

01              TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION                                                                       (1)



                                     09BB  2026 		MBA$M_SR_DLT!-		;DATA LATE AND,

                                     09BB  2027 		MBA$M_SR_DTABT!-	;DATA TRANSFER ABORT AND,

                                     09BB  2028 		MBA$M_SR_DTCOMP!-	;DATA TRANSFER COMPLETE AND,

                                     09BB  2029 		MBA$M_SR_MBEXC!-	;MASSBUSS EXCEPTION AND,

                                     09BB  2030 		MBA$M_SR_MXF!-		;MISSED TRANSFER AND,

                                     09BB  2031 		MBA$M_SR_WCKLWR!-	;WRITE CHECK LOWER AND,

                                     09BB  2032 		MBA$M_SR_WCKUPR,UCB$L_MT_SR(R5) ;WRITE CHECK UPPER

                          21     12  09BB  2033 	BNEQ	30$			;IF NEQ FATAL SPACING ERROR

            50         77 A5     9A  09BD  2034 	MOVZBL	UCB$B_CEX(R5),R0	;GET FUNCTION INDEX

       008A C5       F6E6 CF40   AA  09C1  2035 	BICW	XTAB[R0],UCB$W_MT_ER(R5) ;CLEAR EXTRANEOUS DRIVE ERROR BITS

                          13     12  09C9  2036 	BNEQ	30$			;IF NEQ FATAL SPACING ERROR

       0088 C5            02     E0  09CB  2037 	BBS	#MT_DS_V_TM,UCB$W_MT_DS(R5),30$ ;IF SET, TAPE MARK ENCOUNTERED

                          0D         09D0       

       008C C5            0E     B1  09D1  2038 	CMPW	#MIN_RECORD,UCB$W_MT_FC(R5) ;MINIMUM RECORD READ?

                          06     1B  09D6  2039 	BLEQU	30$			;IF LEQU YES

                          FF5E   31  09D8  2040 	BRW	RESTART			;RESTART FUNCTION

                          0125   31  09DB  2041 20$:	BRW	ENBXIT			;

                          013C   31  09DE  2042 30$:	BRW	RETREG			;

                                     09E1  2043  

                                     09E1  2044 ;

                                     09E1  2045 ; POSITIONING FUNCTION EXECUTION

                                     09E1  2046 ;

                                     09E1  2047 ;	FUNCTIONS INCLUDE:

                                     09E1  2048 ;

                                     09E1  2049 ;		SPACE FILE FORWARD,

                                     09E1  2050 ;		SPACE FILE REVERSE,

                                     09E1  2051 ;		ERASE TAPE,

                                     09E1  2052 ;		SPACE RECORD REVERSE,

                                     09E1  2053 ;		SPACE RECORD FORWARD,

                                     09E1  2054 ;		UNLOAD, AND

                                     09E1  2055 ;		WRITE TAPE MARK.

                                     09E1  2056 ;

                                     09E1  2057 ; THE FUNCTION IS INITIATED AND A WAITFOR INTERRUPT IS EXECUTED. WHEN THE INTERRUPT

                                     09E1  2058 ; OCCURS FINAL DEVICE REGISTERS ARE RETURNED TO THE CALLER.

                                     09E1  2059 ;

                                     09E1  2060  

                                     09E1  2061 POSIT:					;POSITIONING FUNCTION EXECUTION

                                     09E1  2062 	DSBINT				;DISABLE ALL INTERRUPTS

         58 A5            05     E0  09E7  2063 	BBS	#UCB$V_POWER,UCB$W_STS(R5),ENBEXT ;IF SET, POWER HAS FAILED

                          2D         09EB       

         14 A3       008E C5     32  09EC  2064 	CVTWL	UCB$W_MT_SPACNT(R5),MT_FC(R3) ;LOAD FRAME COUNT REGISTER

            63       F63F CF40   9A  09F2  2065 	MOVZBL	FTAB[R0],MT_CS1(R3)	;EXECUTE FUNCTION

                                     09F8  2066 	WFIKPCH	RETREG,TIME_OUT[R0]	;WAITFOR INTERRUPT AND KEEP CHANNEL

                          00F0   31  0A05  2067 	BRW	DRVREG			;

                                     0A08  2068  

                                     0A08  2069 ;

                                     0A08  2070 ; IMMEDIATE FUNCTION EXECUTION

                                     0A08  2071 ;

                                     0A08  2072 ;	FUNCTIONS INCLUDE:

                                     0A08  2073 ;

                                     0A08  2074 ;		NO OPERATION, AND

                                     0A08  2075 ;		DRIVE CLEAR.

                                     0A08  2076 ;

                                     0A08  2077 ; THESE FUNCTIONS ARE EXECUTED IMMEDIATELY AND THE FINAL DEVICE REGISTERS

                                     0A08  2078 ; ARE RETURNED TO THE CALLER.

                                     0A08  2079 ;

                                     0A08  2080  

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  45

01              TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION                                                                       (1)



                                     0A08  2081 IMMED:					;IMMEDIATE FUNCTION EXECUTION

                                     0A08  2082 	DSBINT				;DISABLE INTERRUPTS

         58 A5            05     E0  0A0E  2083 	BBS	#UCB$V_POWER,UCB$W_STS(R5),ENBEXT ;IF SET, POWER HAS FAILED

                          06         0A12       

            63       F61E CF40   9A  0A13  2084 	MOVZBL	FTAB[R0],MT_CS1(R3)	;EXECUTE FUNCTION

                                     0A19  2085 ENBEXT:					;

                          00E7   31  0A19  2086 	BRW	ENBXIT			;

                                     0A1C  2087  

                                     0A1C  2088 ;

                                     0A1C  2089 ; RECALIBRATE FUNCTION EXECUTION

                                     0A1C  2090 ;

                                     0A1C  2091 ;	FUNCTIONS INCLUDE:

                                     0A1C  2092 ;

                                     0A1C  2093 ;		READ IN PRESET, AND

                                     0A1C  2094 ;		REWIND.

                                     0A1C  2095 ;

                                     0A1C  2096 ; THE FUNCTION IS INITIATED AND A WAITFOR INTERRUPT IS EXECUTED. WHEN THE INTERRUPT

                                     0A1C  2097 ; OCCURS A TEST IS MADE TO SEE IF POSITIONING IS STILL IN PROGRESS. IF POSITIONING

                                     0A1C  2098 ; IS STILL IN PROGRESS, THEN ANOTHER WAITFOR INTERRUPT IS EXECUTED. ELSE FINAL DRIVE

                                     0A1C  2099 ; REGISTERS ARE RETURNED TO THE CALLED.

                                     0A1C  2100 ;

                                     0A1C  2101  

                                     0A1C  2102 RECAL:					;RECALIBRATE FUNCTION EXECUTION

                                     0A1C  2103 	DSBINT				;DISABLE INTERRUPTS

         58 A5            05     E0  0A22  2104 	BBS	#UCB$V_POWER,UCB$W_STS(R5),ENBEXT ;IF SET, POWER HAS FAILED

                          F2         0A26       

            63       F60A CF40   9A  0A27  2105 	MOVZBL	FTAB[R0],MT_CS1(R3)	;EXECUTE FUNCTION

                                     0A2D  2106 	WFIKPCH	RETREG,#60*7		;WAITFOR INTERRUPT

         04 A3            12     78  0A3B  2107 	ASHL	#31-MT_DS_V_PIP,MT_DS(R3),R2 ;POSITIONING IN PROGRESS?

                          52         0A3F       

                          2B     18  0A40  2108 	BGEQ	10$			;IF GEQ NO

                                     0A42  2109 	IOFORK				;CREATE FORK PROCESS

                                     0A48  2110 	DSBINT				;DISABLE INTERRUPTS

         04 A3            12     78  0A4E  2111 	ASHL	#31-MT_DS_V_PIP,MT_DS(R3),R2 ;POSITIONING IN PROGRESS?

                          52         0A52       

                          C4     18  0A53  2112 	BGEQ	ENBEXT			;IF GEQ NO

         58 A5            05     E0  0A55  2113 	BBS	#UCB$V_POWER,UCB$W_STS(R5),ENBEXT ;IF SET, POWER HAS FAILED

                          BF         0A59       

         7E A5            07     E0  0A5A  2114 	BBS	#IO$V_NOWAIT,UCB$W_FUNC(R5),20$ ;IF SET, NO WAIT FOR REWIND

                          11         0A5E       

                                     0A5F  2115 	WFIRLCH	RETREG,#60*7		;WAITFOR FINAL INTERRUPT

                          0088   31  0A6D  2116 10$:	BRW	DRVREG			;

         5A A5            01     A8  0A70  2117 20$:	BISW	#UCB$M_MT_REWIND,UCB$W_DEVSTS(R5) ;SET REWIND IN PROGRESS

       0088 C5         04 A3     F7  0A74  2118 	CVTLW	MT_DS(R3),UCB$W_MT_DS(R5) ;SAVE DRIVE STATUS

                     008A C5     B4  0A7A  2119 	CLRW	UCB$W_MT_ER(R5)		;CLEAR SAVED ERROR STATUS

                                     0A7E  2120 	ENBINT				;ENABLE INTERRUPTS

                          0099   31  0A81  2121 	BRW	RETREG			;

                                     0A84  2122  

                                     0A84  2123 ;

                                     0A84  2124 ; TRANSFER FUNCTION EXECUTION

                                     0A84  2125 ;

                                     0A84  2126 ;	FUNCTIONS INCLUDE:

                                     0A84  2127 ;

                                     0A84  2128 ;		WRITE CHECK,

                                     0A84  2129 ;		WRITE DATA,

                                     0A84  2130 ;		READ DATA,

                                     0A84  2131 ;		READ DATA REVERSE, AND

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  46

01              TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION                                                                       (1)



                                     0A84  2132 ;		WRITECHECK DATA REVERSE.

                                     0A84  2133 ;

                                     0A84  2134 ; THE MAP REGISTERS, BYTE COUNT REGISTER, AND VIRTUAL ADDRESS REGISTERS ARE LOADED.

                                     0A84  2135 ; THE FUNCTION IS INITIATED AND A WAITFOR INTERRUPT IS EXECUTED. WHEN THE INTERRUPT

                                     0A84  2136 ; OCCURS FINAL DEVICE REGISTERS ARE RETURNED TO THE CALLER.

                                     0A84  2137 ;

                                     0A84  2138  

                                     0A84  2139 XFER:					;TRANSFER FUNCTION EXECUTION

         08 A4            00     D2  0A84  2140 	MCOML	#0,MBA$L_SR(R4)		;CLEAR MASSBUS ADAPTER ERRORS

                                     0A88  2141 	LOADMBA				;LOAD MAP, BYTE COUNT, AND VIRTUAL ADDRESS

            50         77 A5     9A  0A8E  2142 	MOVZBL	UCB$B_CEX(R5),R0	;RETRIEVE FUNCTION TABLE INDEX

            50            0F     91  0A92  2143 	CMPB	#CDF_READDATAR,R0	;READ DATA REVERSE?

                          05     13  0A95  2144 	BEQL	10$			;IF EQL YES

            50            0D     91  0A97  2145 	CMPB	#CDF_WRITECHECKR,R0	;WRITE CHECK DATA REVERSE?

                          0A     12  0A9A  2146 	BNEQ	20$			;IF NEQ NO

            51         6E A5     3C  0A9C  2147 10$:	MOVZWL	UCB$W_BCNT(R5),R1	;GET TRANSFER BYTE COUNT

                          51     D7  0AA0  2148 	DECL	R1			;REDUCE BYTE COUNT BY ONE

         0C A4            51     C0  0AA2  2149 	ADDL	R1,MBA$L_VAR(R4)	;CALCULATE ENDING ADDRESS OF BUFFER

                                     0AA6  2150 20$:	DSBINT				;DISABLE INTERRUPTS

         58 A5            05     E0  0AAC  2151 	BBS	#UCB$V_POWER,UCB$W_STS(R5),ENBXIT ;IF SET, POWER FAILED

                          52         0AB0       

         14 A3         10 A4     D0  0AB1  2152 	MOVL	MBA$L_BCR(R4),MT_FC(R3)	;LOAD FRAME COUNT REGISTER

            63       F57B CF40   9A  0AB6  2153 	MOVZBL	FTAB[R0],MT_CS1(R3)	;INITIATE FUNCTION

                                     0ABC  2154 	WFIKPCH	RETREG,TIME_OUT[R0]	;WAITFOR INTERRUPT AND KEEP CHANNEL

       0084 C5         08 A4     D0  0AC9  2155 	MOVL	MBA$L_SR(R4),UCB$L_MT_SR(R5) ;SAVE FINAL CONTROLLER STATUS

                          03     F0  0ACF  2156 	INSV	#MT$K_NRZI_800,#MT$V_DENSITY,- ;SET CORRECT DENSITY CODE

            05            08         0AD1  2157 		#MT$S_DENSITY,UCB$L_DEVDEPEND(R5) ;

                       3C A5         0AD3       

                          03     F0  0AD5  2158 	INSV	#3,#MT_TC_V_DEN,-	;

            03            08         0AD7  2159 		#MT_TC_S_DEN,UCB$W_MT_TC(R5) ;

                     009A C5         0AD9       

         04 A3            20     D3  0ADC  2160 	BITL	#MT_DS_M_PES,MT_DS(R3)	;NRZI ENCODED TAPE?

                          16     13  0AE0  2161 	BEQL	DRVREG			;IF EQL YES

                          04     F0  0AE2  2162 	INSV	#MT$K_PE_1600,#MT$V_DENSITY,- ;SWITCH TO PHASE ENCODED TAPE

            05            08         0AE4  2163 		#MT$S_DENSITY,UCB$L_DEVDEPEND(R5) ;

                       3C A5         0AE6       

                          04     F0  0AE8  2164 	INSV	#4,#MT_TC_V_DEN,-	;

            03            08         0AEA  2165 		#MT_TC_S_DEN,UCB$W_MT_TC(R5) ;

                     009A C5         0AEC       

         3C A5            08     AA  0AEF  2166 	BICW	#MT$M_PARITY,UCB$L_DEVDEPEND(R5) ;CLEAR EVEN PARITY

       009A C5            08     AA  0AF3  2167 	BICW	#MT_TC_M_EPAR,UCB$W_MT_TC(R5) ;

                                     0AF8  2168 DRVREG:					;SAVE DRIVE REGISTERS

                          0364   30  0AF8  2169 	BSBW	TM_SAVDRVSTS		;SAVE DRIVE STATUS

                                     0AFB  2170 	IOFORK				;CREATE FORK PROCESS

                          1A     11  0B01  2171 	BRB	RETREG			;

                                     0B03  2172  

                                     0B03  2173 ;

                                     0B03  2174 ; ENABLE INTERRUPTS

                                     0B03  2175 ;

                                     0B03  2176  

                                     0B03  2177 ENBXIT:					;

       008A C5         08 A3     F7  0B03  2178 	CVTLW	MT_ER(R3),UCB$W_MT_ER(R5) ;SAVE ERROR STATUS REGISTER

       0088 C5         04 A3     F7  0B09  2179 	CVTLW	MT_DS(R3),UCB$W_MT_DS(R5) ;SAVE DRIVE STATUS REGISTER

       0092 C5         24 A3     F7  0B0F  2180 	CVTLW	MT_TC(R3),UCB$W_MT_TC_SAV(R5) ;SAVE TAPE CONTROL REGISTER

       0090 C5            63     F7  0B15  2181 	CVTLW	MT_CS1(R3),UCB$W_MT_CS1(R5) ;SAVE DRIVE CONTROL REGISTER

                                     0B1A  2182 	ENBINT				;ENABLE INTERRUPTS

                                     0B1D  2183  

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  47

01              TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION                                                                       (1)



                                     0B1D  2184 ;

                                     0B1D  2185 ; RETURN REGISTERS

                                     0B1D  2186 ;

                                     0B1D  2187  

                                     0B1D  2188 	.ENABL	LSB

                                     0B1D  2189 RETREG:					;RETURN FINAL DEVICE REGISTERS

            51         77 A5     9A  0B1D  2190 	MOVZBL	UCB$B_CEX(R5),R1	;GET CURRENT FUNCTION INDEX

       008A C5       F586 CF41   AB  0B21  2191 	BICW3	XTAB[R1],UCB$W_MT_ER(R5),R0 ;GET FINAL DRIVE ERROR STATUS

                          50         0B29       

            51       0084 C5     D0  0B2A  2192 	MOVL	UCB$L_MT_SR(R5),R1	;RETRIEVE FINAL CONTROLLER STATUS

            52       0088 C5     3C  0B2F  2193 	MOVZWL	UCB$W_MT_DS(R5),R2	;RETRIEVE CONTENTS OF DRIVE STATUS REGISTER

         58 A5       0060 8F     B3  0B34  2194 	BITW	#UCB$M_POWER!-		;POWER FAIL OR DEVICE TIMEOUT?

                                     0B3A  2195 		UCB$M_TIMOUT,UCB$W_STS(R5) ;

                          7B     12  0B3A  2196 	BNEQ	70$			;IF NEQ YES - SPECIAL CONDITION

         77 A5            0A     91  0B3C  2197 	CMPB	#CDF_WRITECHECK,UCB$B_CEX(R5) ;DRIVE RELATED FUNCTION?

                          27     1A  0B40  2198 	BGTRU	10$			;IF GTRU YES

         77 A5            14     91  0B42  2199 	CMPB	#CDF_INTSPCFOR,UCB$B_CEX(R5) ;INTERNAL SPACE FUNCTION?

                          06     15  0B46  2200 	BLEQ	5$			;IF LEQ YES

         77 A5            10     91  0B48  2201 	CMPB	#CDF_READPRESET,UCB$B_CEX(R5) ;DRIVE RELATED FUNCTION?

                          1B     1B  0B4C  2202 	BLEQU	10$			;IF LEQU YES

                                     0B4E  2203  

                                     0B4E  2204 ;

                                     0B4E  2205 ; CONTROLLER RELATED FUNCTION

                                     0B4E  2206 ;

                                     0B4E  2207  

            51   000E1FFF 8F     D3  0B4E  2208 5$:	BITL	#MBA$M_ERROR,R1		;ANY CONTROLLER ERRORS?

                          4E     13  0B55  2209 	BEQL	50$			;IF EQL NO

            51   000C000B 8F     D3  0B57  2210 	BITL	#MBA$M_SR_ERCONF!-	;ERROR CONFIRMATION OR,

                                     0B5E  2211 		MBA$M_SR_ISTO!-		;INTERFACE SEQUENCE TIMEOUT OR,

                                     0B5E  2212 		MBA$M_SR_PGE!-		;PROGRAMMING ERROR OR,

                                     0B5E  2213 		MBA$M_SR_NED!-		;NONEXISTENT DRIVE, OR

                                     0B5E  2214 		MBA$M_SR_RDTO,R1	;READ TIMEOUT?

                          4E     12  0B5E  2215 	BNEQ	60$			;IF NEQ YES - FATAL CONTROLLER ERROR

            51   00020F74 8F     D3  0B60  2216 	BITL	#MBA$M_SR_DLT!-		;DATA LATE OR,

                                     0B67  2217 		MBA$M_SR_INVMAP!-	;INVALID MAP REGISTER OR,

                                     0B67  2218 		MBA$M_SR_MAPPE!-	;MAP REGISTER PARITY ERROR OR,

                                     0B67  2219 		MBA$M_SR_MCPE!-		;MASSBUS CONTROL PARITY ERROR OR,

                                     0B67  2220 		MBA$M_SR_MDPE!-		;MASSBUS DATA PARITY ERROR OR,

                                     0B67  2221 		MBA$M_SR_MXF!-		;MISSED TRANSFER OR,

                                     0B67  2222 		MBA$M_SR_RDS!-		;READ DATA SUBSTITUTE OR,

                                     0B67  2223 		MBA$M_SR_WCKLWR!-	;WRITE CHECK LOWER BYTE OR,

                                     0B67  2224 		MBA$M_SR_WCKUPR,R1	;WRITE CHECK UPPER BYTE?

                          06     12  0B67  2225 	BNEQ	20$			;IF NEQ YES - RETRIABLE CONTROLLER ERROR

                                     0B69  2226  

                                     0B69  2227 ;

                                     0B69  2228 ; DRIVE RELATED FUNCTION

                                     0B69  2229 ;

                                     0B69  2230  

                          51     D4  0B69  2231 10$:	CLRL	R1			;CLEAR CONTENTS OF STATUS REGISTER

                          50     B5  0B6B  2232 	TSTW	R0			;ANY DRIVE ERRORS?

                          36     13  0B6D  2233 	BEQL	50$			;IF EQL NO

            50       4007 8F     B3  0B6F  2234 20$:	BITW	#MT_ER_M_ILF!-		;ILLEGAL FUNCTION OR,

                                     0B74  2235 		MT_ER_M_ILR!-		;ILLEGAL REGISTER OR,

                                     0B74  2236 		MT_ER_M_RMR!-		;REGISTER MODIFY REFUSE OR,

                                     0B74  2237 		MT_ER_M_UNS,R0		;DRIVE UNSAFE

                          38     12  0B74  2238 	BNEQ	60$			;IF NEQ YES - FATAL DRIVE ERROR

            50            0B     E1  0B76  2239 	BBC	#MT_ER_V_NEF,R0,40$	;IF CLR, NOT NONEXECUTABLE FUNCTION

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  48

01              TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION                                                                       (1)



                          1C         0B79       

         77 A5            0F     91  0B7A  2240 	CMPB	#CDF_READDATAR,UCB$B_CEX(R5) ;READ DATA REVERSE?

                          12     13  0B7E  2241 	BEQL	30$			;IF EQL YES

         77 A5            05     91  0B80  2242 	CMPB	#CDF_SPCFILREV,UCB$B_CEX(R5) ;SPACE FILE REVERSE?

                          0C     13  0B84  2243 	BEQL	30$			;IF EQL YES

         77 A5            07     91  0B86  2244 	CMPB	#CDF_SPCRECREV,UCB$B_CEX(R5) ;SPACE RECORD REVERSE?

                          06     13  0B8A  2245 	BEQL	30$			;IF EQL YES

         77 A5            0D     91  0B8C  2246 	CMPB	#CDF_WRITECHECKR,UCB$B_CEX(R5) ;WRITECHECK REVERSE?

                          1C     12  0B90  2247 	BNEQ	60$			;IF NEQ NO

                     008C C5     B4  0B92  2248 30$:	CLRW	UCB$W_MT_FC(R5)		;CLEAR SAVED FRAME COUNT REGISTER

                                     0B96  2249  

                                     0B96  2250 ;

                                     0B96  2251 ; RETRIABLE ERROR EXIT

                                     0B96  2252 ;

                                     0B96  2253  

            7E       0080 D5     32  0B96  2254 40$:	CVTWL	@UCB$L_DPC(R5),-(SP)	;GET BRANCH DISPLACEMENT

       0080 C5            8E     C0  0B9B  2255 	ADDL	(SP)+,UCB$L_DPC(R5)	;CALCULATE RETURN ADDRESS - 2

         7E A5            0F     E0  0BA0  2256 	BBS	#IO$V_INHRETRY,UCB$W_FUNC(R5),60$ ;IF SET, RETRY INHIBITED

                          09         0BA4       

       0080 C5            02     C0  0BA5  2257 50$:	ADDL	#2,UCB$L_DPC(R5)	;ADJUST TO CORRECT RETURN ADDRESS

                     0080 D5     17  0BAA  2258 	JMP	@UCB$L_DPC(R5)		;RETURN TO DRIVER

                                     0BAE  2259  

                                     0BAE  2260 ;

                                     0BAE  2261 ; FATAL CONTROLLER OR DRIVE ERROR

                                     0BAE  2262 ;

                                     0BAE  2263  

                 00000000'GF     16  0BAE  2264 60$:	JSB	G^ERL$DEVICERR		;LOG DEVICE ERROR

                          FC4B   31  0BB4  2265 	BRW	FATALERR		;

                                     0BB7  2266  

                                     0BB7  2267 ;

                                     0BB7  2268 ; SPECIAL CONDITION ( POWER FAILURE OR DEVICE TIME OUT)

                                     0BB7  2269 ;

                                     0BB7  2270  

         5A A5            01     AA  0BB7  2271 70$:	BICW	#UCB$M_MT_REWIND,UCB$W_DEVSTS(R5) ;CLEAR REWIND IN PROGRESS

         3E A5            10     A8  0BBB  2272 	BISW	#<MT$M_LOST@-16>,UCB$L_DEVDEPEND+2(R5) ;SET POSITION LOST

         58 A5            05     E4  0BBF  2273 	BBSC	#UCB$V_POWER,UCB$W_STS(R5),100$ ;IF SET, POWER FAILURE

                          38         0BC3       

                                     0BC4  2274  

                                     0BC4  2275 ;

                                     0BC4  2276 ; DEVICE TIME OUT

                                     0BC4  2277 ;

                                     0BC4  2278  

                 00000000'GF     16  0BC4  2279 	JSB	G^ERL$DEVICTMO		;LOG DEVICE TIME OUT

            53         20 A5     D0  0BCA  2280 	MOVL	UCB$L_CRB(R5),R3	;GET ADDRESS OF PRIMARY CRB

            53         10 A3     D0  0BCE  2281 	MOVL	CRB$L_LINK(R3),R3	;GET ADDRESS OF SECONDARY CRB

            53         1C A3     D0  0BD2  2282 	MOVL	CRB$L_INTD+VEC$L_IDB(R3),R3 ;GET ADDRESS OF SECONDARY IDB

         04 A3            55     D1  0BD6  2283 	CMPL	R5,IDB$L_OWNER(R3)	;DEVICE OWN CONTROLLER?

                          08     12  0BDA  2284 	BNEQ	80$			;IF NEQ NO

         04 A4            01     D0  0BDC  2285 	MOVL	#MBA$M_CR_INIT,MBA$L_CR(R4) ;INITIALIZE ENTIRE MBA

         04 A4            04     D0  0BE0  2286 	MOVL	#MBA$M_CR_IE,MBA$L_CR(R4) ;ENABLE MBA INTERRUPTS

                                     0BE4  2287 80$:	SETIPL	UCB$B_FIPL(R5)		;LOWER IPL TO DEVICE FORK LEVEL

         58 A5       0800 8F     AA  0BE8  2288 90$:	BICW	#UCB$M_VALID,UCB$W_STS(R5) ;SET VOLUME SOFTWARE INVALID

                                     0BEE  2289 TIMEOUT:				;

            50       0000'8F     3C  0BEE  2290 	MOVZWL	#SS$_TIMEOUT,R0		;SET FINAL COMPLETION STATUS

                                     0BF3  2291  

                                     0BF3  2292 ;

                                     0BF3  2293 ; RESET TRANSFER BYTE COUNT TO ZERO

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  49

01              TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION                                                                       (1)



                                     0BF3  2294 ;

                                     0BF3  2295  

                                     0BF3  2296 RESETXFR:				;

                     008C C5     B4  0BF3  2297 	CLRW	UCB$W_MT_FC(R5)		;CLEAR SAVED FRAME COUNT

                          52     D4  0BF7  2298 	CLRL	R2			;CLEAR DRIVE STATUS

                          FC75   31  0BF9  2299 	BRW	FUNCXT			;

                                     0BFC  2300  

                                     0BFC  2301 ;

                                     0BFC  2302 ; POWER FAILURE

                                     0BFC  2303 ;

                                     0BFC  2304  

         58 A5            0B     E1  0BFC  2305 100$:	BBC	#UCB$V_VALID,UCB$W_STS(R5),90$ ;IF CLR, VOLUME SOFTWARE INVALID

                          E7         0C00       

                                     0C01  2306 103$:	RELCHAN				;RELEASE ALL CHANNELS

                                     0C07  2307  

                                     0C07  2308 ;

                                     0C07  2309 ; WAIT FOR UNIT TO BE REWOUND AND REACH BEGINNING OF TAPE

                                     0C07  2310 ;

                                     0C07  2311  

                       77 A5     94  0C07  2312 105$:	CLRB	UCB$B_CEX(R5)		;CLEAR MESSAGE TIME COUNTER

                                     0C0A  2313 110$:	DSBINT				;DISABLE INTERRUPTS

                                     0C10  2314 	WFIKPCH	115$,#2			;WAITFOR INTERRUPT OR TIME OUT

                                     0C1A  2315 	IOFORK				;CREATE FORK PROCESS

                                     0C20  2316 115$:	SETIPL	UCB$B_FIPL(R5)		;LOWER IPL TO FORK LEVEL

                                     0C24  2317 	REQPCHAN			;REQUEST PRIMARY CHANNEL

         24 A4       009A C5     3C  0C2A  2318 	MOVZWL	UCB$W_MT_TC(R5),MT_TC(R4) ;SELECT DRIVE

                       04 A4     DD  0C30  2319 	PUSHL	MT_DS(R4)		;SAVE DRIVE STATUS

                                     0C33  2320 	RELCHAN				;RELEASE ALL CHANNELS

                          52   8ED0  0C39  2321 	POPL	R2			;RETRIEVE SAVED DRIVE STATUS

         58 A5            05     E4  0C3C  2322 	BBSC	#UCB$V_POWER,UCB$W_STS(R5),100$ ;IF SET, ANOTHER POWER FAILURE

                          BB         0C40       

            52            0D     E0  0C41  2323 	BBS	#MT_DS_V_PIP,R2,105$	;IF SET, POSITIONING IN PROGRESS

                          C2         0C44       

            52            0C     E1  0C45  2324 	BBC	#MT_DS_V_MOL,R2,120$	;IF CLR, MEDIUM OFFLINE

                          04         0C48       

            52            01     E0  0C49  2325 	BBS	#MT_DS_V_BOT,R2,125$	;IF SET, AT BEGINNING OF TAPE

                          1A         0C4C       

            01            0F     9D  0C4D  2326 120$:	ACBB	#15,#1,UCB$B_CEX(R5),110$ ;TIME TO OUTPUT MESSAGE?

            FFB6       77 A5         0C50       

            54         00'8F     9A  0C54  2327 	MOVZBL	#MSG$_DEVOFFLIN,R4	;SET MESSAGE NUMBER

            53   00000000'GF     9E  0C58  2328 	MOVAB	G^SYS$GL_OPRMBX,R3	;GET ADDRESS OF OPERATOR MAILBOX

                 00000000'GF     16  0C5F  2329 	JSB	G^EXE$SNDEVMSG		;SEND MESSAGE TO OPERATOR

                          A0     11  0C65  2330 	BRB	105$			;

                                     0C67  2331  

                                     0C67  2332 ;

                                     0C67  2333 ; MEDIUM ONLINE AND UNIT POSITIONED TO BEGINNING OF TAPE

                                     0C67  2334 ;

                                     0C67  2335  

         68 A5       0094 C5     D0  0C67  2336 125$:	MOVL	UCB$L_MT_RECORD(R5),UCB$L_SVAPTE(R5) ;SAVE TAPE POSITION

                     0094 C5     D4  0C6D  2337 	CLRL	UCB$L_MT_RECORD(R5)	;CLEAR CURRENT POSITION

                                     0C71  2338 	REQPCHAN			;REQUEST PRIMARY CHANNEL

            53            54     D0  0C77  2339 	MOVL	R4,R3			;SET ADDRESS OF DRIVE CONTROL REGISTER

                                     0C7A  2340 130$:	REQSCHAN			;REQUEST SECONDARY CHANNEL

         24 A3       009A C5     3C  0C80  2341 	MOVZWL	UCB$W_MT_TC(R5),MT_TC(R3) ;SET TAPE CONTROL PARAMETERS

            63            09     9A  0C86  2342 	MOVZBL	#F_DRVCLR!1,MT_CS1(R3)	;CLEAR DRIVE

         68 A5       0094 C5     D1  0C89  2343 	CMPL	UCB$L_MT_RECORD(R5),UCB$L_SVAPTE(R5) ;TAPE CORRECTLY POSITIONED?

                          7E     13  0C8F  2344 	BEQL	180$			;IF EQL YES

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  50

01              TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION                                                                       (1)



                          01EC   30  0C91  2345 	BSBW	TM_SETINTSPC		;SETUP MBA FOR INTERNAL SPACE FUNCTION

                                     0C94  2346 	DSBINT				;DISABLE INTERRUPTS

         58 A5            05     E0  0C9A  2347 	BBS	#UCB$V_POWER,UCB$W_STS(R5),160$ ;IF SET, ANOTHER POWER FAILURE

                          64         0C9E       

            63            29     9A  0C9F  2348 	MOVZBL	#F_WRITECHECK!1,MT_CS1(R3) ;EXECUTE FUNCTION

                                     0CA2  2349 	WFIKPCH	140$,#12		;WAIT FOR FUNCTION TO COMPLETE

       0084 C5         08 A4     D0  0CAC  2350 	MOVL	MBA$L_SR(R4),UCB$L_MT_SR(R5) ;SAVE FINAL MBA STATUS

                          01AA   30  0CB2  2351 	BSBW	TM_SAVDRVSTS		;SAVE DRIVE STATUS

                                     0CB5  2352 	IOFORK				;CREATE FORK PROCESS

                                     0CBB  2353 140$:	SETIPL	UCB$B_FIPL(R5)		;LOWER IPL TO FORK LEVEL

         58 A5            05     E0  0CBF  2354 	BBS	#UCB$V_POWER,UCB$W_STS(R5),170$ ;IF SET, ANOTHER POWER FAILURE

                          42         0CC3       

         58 A5            06     E0  0CC4  2355 	BBS	#UCB$V_TIMOUT,UCB$W_STS(R5),155$ ;IF SET, DEVICE TIME OUT

                          37         0CC8       

                                     0CC9  2356 	RELSCHAN			;RELEASE SECONDARY CHANNEL

       008A C5       F401 CF     AB  0CCF  2357 	BICW3	XTAB+<CDF_INTSPCFOR*2>,UCB$W_MT_ER(R5),R0 ;GET DRIVE ERROR STATUS

                          50         0CD6       

            51       0084 C5     D0  0CD7  2358 	MOVL	UCB$L_MT_SR(R5),R1	;GET FINAL MBA STATUS

            52       0088 C5     3C  0CDC  2359 	MOVZWL	UCB$W_MT_DS(R5),R2	;GET FINAL DRIVE STATUS

            51   00013F80 8F     CA  0CE1  2360 	BICL	#MBA$M_SR_DLT!-		;CLEAR DATA LATE AND,

                                     0CE8  2361 		MBA$M_SR_ATTN!-		;ATTENTION AND,

                                     0CE8  2362 		MBA$M_SR_DTABT!-	;DATA TRANSFER ABORT AND,

                                     0CE8  2363 		MBA$M_SR_DTCOMP!-	;DATA TRANSFER COMPLETE AND,

                                     0CE8  2364 		MBA$M_SR_MBEXC!-	;MASSBUS EXCEPTION AND,

                                     0CE8  2365 		MBA$M_SR_MXF!-		;MISSED TRANSFER AND,

                                     0CE8  2366 		MBA$M_SR_WCKLWR!-	;WRITE CHECK LOWER AND,

                                     0CE8  2367 		MBA$M_SR_WCKUPR,R1	;WRITE CHECK UPPER

                          41     12  0CE8  2368 	BNEQ	190$			;IF NEQ FATAL SPACING ERROR

                          50     B5  0CEA  2369 	TSTW	R0			;ANY FATAL DRIVE ERRORS?

                          3D     12  0CEC  2370 	BNEQ	190$			;IF NEQ YES

            52            02     E0  0CEE  2371 	BBS	#MT_DS_V_TM,R2,150$	;IF SET, TAPE MARK ENCOUNTERED

                          07         0CF1       

       008C C5            0E     B1  0CF2  2372 	CMPW	#MIN_RECORD,UCB$W_MT_FC(R5) ;MINIMUM RECORD READ?

                          81     1A  0CF7  2373 	BGTRU	130$			;IF GTRU NO

                     0094 C5     D6  0CF9  2374 150$:	INCL	UCB$L_MT_RECORD(R5)	;UPDATE CURRENT TAPE POSITION

                          FF7A   31  0CFD  2375 	BRW	130$			;

                          FEE5   31  0D00  2376 155$:	BRW	90$			;

                                     0D03  2377  

                                     0D03  2378 ;

                                     0D03  2379 ; POWER FAILURE DURING REPOSITIONING OF TAPE

                                     0D03  2380 ;

                                     0D03  2381  

                                     0D03  2382 160$:	ENBINT				;ENABLE INTERRUPTS

       0094 C5         68 A5     D0  0D06  2383 170$:	MOVL	UCB$L_SVAPTE(R5),UCB$L_MT_RECORD(R5) ;RESTORE TAPE POSITION

                          FEF2   31  0D0C  2384 	BRW	103$			;

                                     0D0F  2385  

                                     0D0F  2386 ;

                                     0D0F  2387 ; TAPE SUCCESSFULLY REPOSITIONED - RESTART FUNCTION

                                     0D0F  2388 ;

                                     0D0F  2389  

                                     0D0F  2390 180$:	RELCHAN				;RELEASE ALL CHANNELS

         3E A5            10     AA  0D15  2391 	BICW	#<MT$M_LOST@-16>,UCB$L_DEVDEPEND+2(R5) ;CLEAR LOST POSITION

         58 A5       0800 8F     A8  0D19  2392 	BISW	#UCB$M_VALID,UCB$W_STS(R5) ;SET VOLUME VALID

            53         4C A5     D0  0D1F  2393 	MOVL	UCB$L_IRP(R5),R3	;RETRIEVE ADDRESS OF I/O PACKET

         68 A5         2C A3     7D  0D23  2394 	MOVQ	IRP$L_SVAPTE(R3),UCB$L_SVAPTE(R5) ;RESTORE TRANSFER PARAMETERS

                          F475   31  0D28  2395 	BRW	TM_STARTIO		;

                                     0D2B  2396  

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  51

01              TM03-TE16/TU77 HARDWARE FUNCTION EXECUTION                                                                       (1)



                                     0D2B  2397 ;

                                     0D2B  2398 ; FATAL SPACING ERROR DURING REPOSITIONING OF TAPE

                                     0D2B  2399 ;

                                     0D2B  2400  

         58 A5       0800 8F     AA  0D2B  2401 190$:	BICW	#UCB$M_VALID,UCB$W_STS(R5) ;SET VOLUME SOFTWARE INVALID

                     008C C5     B4  0D31  2402 	CLRW	UCB$W_MT_FC(R5)		;CLEAR SAVED FRAME COUNT

                          FACA   31  0D35  2403 	BRW	FATALERR		;

                                     0D38  2404 	.DSABL	LSB

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  52

01              TE16/TU77 CLASSIFY DRIVE TYPE AND SET PARAMETER                                                                  (1)



                                     0D38  2406 	.SBTTL	TE16/TU77 CLASSIFY DRIVE TYPE AND SET PARAMETERS

                                     0D38  2407 ;

                                     0D38  2408 ; TM_DTYPE - TE16/TU77 CLASSIFY DRIVE TYPE AND SET PARAMETERS

                                     0D38  2409 ;

                                     0D38  2410 ; THIS ROUTINE IS CALLED WHEN AN UNSOLICITED INTERRUPT OCCURS ON A DRIVE, DURING

                                     0D38  2411 ; SYSTEM INITIALIZATION, AND AT POWER RECOVERY TO DETERMINE THE DRIVE TYPE AND

                                     0D38  2412 ; SET UNIT PARAMETERS.

                                     0D38  2413 ;

                                     0D38  2414 ; INPUTS:

                                     0D38  2415 ;

                                     0D38  2416 ;	R3 = ADDRESS OF TM03 DRIVE CONTROL REGISTER.

                                     0D38  2417 ;	R5 = DEVICE UNIT UCB ADDRESS.

                                     0D38  2418 ;

                                     0D38  2419 ; OUTPUTS:

                                     0D38  2420 ;

                                     0D38  2421 ;	THE DRIVE STATUS REGISTER IS INTERROGATED AND UNIT PARAMETERS ARE SET.

                                     0D38  2422 ;

                                     0D38  2423  

                                     0D38  2424 TM_DTYPE:				;CLASSIFY DRIVE TYPE AND SET PARAMETERS

                       18 A3     DD  0D38  2425 	PUSHL	MT_DT(R3)		;READ DRIVE TYPE REGISTER

            6E       FE00 8F     AA  0D3B  2426 	BICW	#^C<^X1FF>,(SP)		;CLEAR EXTRANEOUS BITS

            52       F2E4 CF     9E  0D40  2427 	MOVAB	TM_DTDESC,R2		;GET ADDRESS OF DESCRIPTOR TABLE

            82            6E     B1  0D45  2428 10$:	CMPW	(SP),(R2)+		;DRIVE TYPE MATCH?

                          0E     13  0D48  2429 	BEQL	20$			;IF EQL YES

            52            01     C0  0D4A  2430 	ADDL	#TM_DTDESCLEN-2,R2	;ADVANCE TO NEXT ENTRY

                          62     B5  0D4D  2431 	TSTW	(R2)			;END OF TABLE?

                          F4     12  0D4F  2432 	BNEQ	10$			;IF NEQ NO

         58 A5            10     AA  0D51  2433 	BICW	#UCB$M_ONLINE,UCB$W_STS(R5) ;SET UNIT OFFLINE

            52            01     C2  0D55  2434 	SUBL	#TM_DTDESCLEN-2,R2	;BACK UP TO LAST DRIVE DESCRIPTOR

         39 A5            62     90  0D58  2435 20$:	MOVB	(R2),UCB$B_DEVTYPE(R5)	;SET DRIVE TYPE

                          8E     D5  0D5C  2436 	TSTL	(SP)+			;REMOVE DRIVE TYPE FROM STACK

                                 05  0D5E  2437 	RSB				;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  53

01              TM03-TE16/TU77 REGISTER DUMP ROUTINE                                                                             (1)



                                     0D5F  2439 	.SBTTL	TM03-TE16/TU77 REGISTER DUMP ROUTINE

                                     0D5F  2440 ;

                                     0D5F  2441 ; TM_REGDUMP - TM03-TE16/TU77 REGISTER DUMP ROUTINE

                                     0D5F  2442 ;

                                     0D5F  2443 ; THIS ROUTINE IS CALLED TO SAVE THE CONTROLLER AND DRIVE REGISTERS IN A

                                     0D5F  2444 ; SPECIFIED BUFFER. IT IS CALLED FROM THE DEVICE ERROR LOGGING ROUTINE AND

                                     0D5F  2445 ; FROM THE DIAGNOSTIC BUFFER FILL ROUTINE.

                                     0D5F  2446 ;

                                     0D5F  2447 ; INPUTS:

                                     0D5F  2448 ;

                                     0D5F  2449 ;	R0 = ADDRESS OF REGISTER SAVE BUFFER.

                                     0D5F  2450 ;	R4 = ADDRESS OF ADAPTER CONFIGURATION REGISTER.

                                     0D5F  2451 ;	R5 = DEVICE UNIT UCB ADDRESS.

                                     0D5F  2452 ;

                                     0D5F  2453 ; OUTPUTS:

                                     0D5F  2454 ;

                                     0D5F  2455 ;	THE CONTROLLER AND DRIVE REGISTERS ARE SAVED IN THE SPECIFIED BUFFER.

                                     0D5F  2456 ;

                                     0D5F  2457  

                                     0D5F  2458 TM_REGDUMP:				;TM03-TE16/TU77 REGISTER DUMP ROUTINE

            80            11     D0  0D5F  2459 	MOVL	#<MT_TC+4+MBA$L_BCR+4+8>/4,(R0)+ ;INSERT NUMBER OF DEVICE REGISTERS

            80            64     D0  0D62  2460 	MOVL	MBA$L_CSR(R4),(R0)+	;SAVE CONFIGURATION REGISTER

            80         04 A4     D0  0D65  2461 	MOVL	MBA$L_CR(R4),(R0)+	;SAVE CONTROL REGISTER

            80       0084 C5     D0  0D69  2462 	MOVL	UCB$L_MT_SR(R5),(R0)+	;SAVE STATUS REGISTER

            80         0C A4     D0  0D6E  2463 	MOVL	MBA$L_VAR(R4),(R0)+	;SAVE VIRTUAL ADDRESS REGISTER

            80         10 A4     D0  0D72  2464 	MOVL	MBA$L_BCR(R4),(R0)+	;SAVE BYTE COUNT REGISTER

            08            09     EF  0D76  2465 	EXTZV	#9,#8,-8(R0),R1		;GET FINAL MAP REGISTER NUMBER

            51         F8 A0         0D79       

            80       0800 C441   D0  0D7C  2466 	MOVL	MBA$L_MAP(R4)[R1],(R0)+	;SAVE FINAL MAP REGISTER CONTENTS

                          80     D4  0D82  2467 	CLRL	(R0)+			;ASSUME NO PREVIOUS MAP REGISTER

                          51     D7  0D84  2468 	DECL	R1			;CALCULATE PREVIOUS MAP REGISTER NUMBER

                          07     19  0D86  2469 	BLSS	10$			;IF LSS NONE

         FC A0       0800 C441   D0  0D88  2470 	MOVL	MBA$L_MAP(R4)[R1],-4(R0) ;SAVE PREVIOUS MAP REGISTER CONTENTS

            51            06     9A  0D8F  2471 10$:	MOVZBL	#<MT_TC>/4-3,R1		;SET NUMBER OF DRIVE REGISTERS TO SAVE

            52         20 A5     D0  0D92  2472 	MOVL	UCB$L_CRB(R5),R2	;GET ADDRESS OF PRIMARY CRB

         1C B2            0C     C1  0D96  2473 	ADDL3	#3*4,@CRB$L_INTD+VEC$L_IDB(R2),R2 ;GET ADDRESS OF TM03-TE16/TU77 REGISTERS

                          52         0D9A       

            80       0090 C5     3C  0D9B  2474 	MOVZWL	UCB$W_MT_CS1(R5),(R0)+	;SAVE DRIVE CONTROL REGISTER

            80       0088 C5     3C  0DA0  2475 	MOVZWL	UCB$W_MT_DS(R5),(R0)+	;SAVE DRIVE STATUS REGISTER

            80       008A C5     3C  0DA5  2476 	MOVZWL	UCB$W_MT_ER(R5),(R0)+	;SAVE DRIVE ERROR REGISTER

            80            82     D0  0DAA  2477 20$:	MOVL	(R2)+,(R0)+		;SAVE DRIVE REGISTER

            FA            51     F5  0DAD  2478 	SOBGTR	R1,20$			;ANY MORE TO SAVE?

            80       0092 C5     3C  0DB0  2479 	MOVZWL	UCB$W_MT_TC_SAV(R5),(R0)+ ;SAVE TAPE CONTROL REGISTER

                                 05  0DB5  2480 	RSB				;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  54

01              TM03-TE16/TU77 TAPE DRIVE INITIALIZATION                                                                         (1)



                                     0DB6  2482 	.SBTTL	TM03-TE16/TU77 TAPE DRIVE INITIALIZATION

                                     0DB6  2483 ;

                                     0DB6  2484 ; TM_TXXX_INIT - TM03-TE16/TU77 TAPE DRIVE INITIALIZATION

                                     0DB6  2485 ;

                                     0DB6  2486 ; THIS ROUTINE IS CALLED AT SYSTEM INITIALIZATION AND AT POWER RECOVERY TO SET

                                     0DB6  2487 ; DRIVE PARAMETERS.

                                     0DB6  2488 ;

                                     0DB6  2489 ; INPUTS:

                                     0DB6  2490 ;

                                     0DB6  2491 ;	R3 = ADDRESS OF TM03 DRIVE CONTROL REGISTER.

                                     0DB6  2492 ;	R4 = ADDRESS OF MBA CONFIGURATION STATUS REGISTER.

                                     0DB6  2493 ;	R5 = DEVICE UNIT UCB ADDRESS.

                                     0DB6  2494 ;

                                     0DB6  2495 ; OUTPUTS:

                                     0DB6  2496 ;

                                     0DB6  2497 ;	UNIT PARAMETERS ARE ESTABLISHED.

                                     0DB6  2498 ;

                                     0DB6  2499  

                                     0DB6  2500 TM_TXXX_INIT:				;TE16/TU77 TAPE DRIVE INITIALIZATION

            53            54     C3  0DB6  2501 	SUBL3	R4,R3,R2		;CALCULATE OFFSET TO DRIVE CONTROL REGISTER

                          52         0DB9       

            52       FC00 C2     9E  0DBA  2502 	MOVAB	-MBA$L_ERB(R2),R2	;SUBTRACT OUT EXTERNAL REGISTER BASE

            52       0080 8F     A7  0DBF  2503 	DIVW3	#1@7,R2,UCB$B_SLAVE(R5)	;SET ADAPTER DRIVE NUMBER

                       74 A5         0DC4       

         74 A5            20     85  0DC6  2504 	MULB3	#1@7/4,UCB$B_SLAVE(R5),UCB$B_SLAVE+1(R5) ;SET DRIVE OFFSET CONSTANT

                       75 A5         0DCA       

            00         48 A5     F0  0DCC  2505 	INSV	UCB$W_UNIT(R5),#0,#3,UCB$W_MT_TC(R5) ;INSERT UNIT NUMBER

       009A C5            03         0DD0       

            63            09     9A  0DD4  2506 	MOVZBL	#F_DRVCLR!1,MT_CS1(R3)	;CLEAR DRIVE

            7E         58 A5     3C  0DD7  2507 	MOVZWL	UCB$W_STS(R5),-(SP)	;SAVE CURRENT UNIT STATUS

                       08 A4     DD  0DDB  2508 	PUSHL	MBA$L_SR(R4)		;READ MBA STATUS REGISTER

         5A A5            02     AA  0DDE  2509 	BICW	#UCB$M_MT_PRVMOL,UCB$W_DEVSTS(R5) ;CLEAR PREVIOUS MOL STATE

         58 A5       0810 8F     AA  0DE2  2510 	BICW	#UCB$M_ONLINE!UCB$M_VALID,UCB$W_STS(R5) ;SET UNIT OFFLINE/INVALID

            6E            12     E0  0DE8  2511 	BBS	#MBA$V_SR_NED,(SP),30$	;IF SET, NONEXISTENT TM03

                          3B         0DEB       

         24 A3       009A C5     3C  0DEC  2512 	MOVZWL	UCB$W_MT_TC(R5),MT_TC(R3) ;SELECT SLAVE DRIVE

         18 A3   FFFF01FF 8F     CB  0DF2  2513 	BICL3	#^C<^XFE00>,MT_DT(R3),R2 ;ISOLATE HIGH PART OF DRIVE TYPE

                          52         0DFA       

            52       C400 8F     B1  0DFB  2514 	CMPW	#^XC400,R2		;TAPE DRIVE AND SLAVE PRESENT?

                          22     12  0E00  2515 	BNEQ	20$			;IF NEQ NO

         58 A5            10     A8  0E02  2516 	BISW	#UCB$M_ONLINE,UCB$W_STS(R5) ;SET UNIT ONLINE

                          FF2F   30  0E06  2517 	BSBW	TM_DTYPE		;CLASSIFY DRIVE TYPE

         58 A5            04     E1  0E09  2518 	BBC	#UCB$V_ONLINE,UCB$W_STS(R5),20$ ;IF CLR, UNKNOWN DRIVE TYPE

                          16         0E0D       

         04 A3            13     78  0E0E  2519 	ASHL	#31-MT_DS_V_MOL,MT_DS(R3),R2 ;MEDIUM CURRENTLY ONLINE?

                          52         0E12       

                          04     18  0E13  2520 	BGEQ	15$			;IF GEQ NO

         5A A5            02     A8  0E15  2521 	BISW	#UCB$M_MT_PRVMOL,UCB$W_DEVSTS(R5) ;SET PREVIOUS MOL STATE

         04 AE            0B     E1  0E19  2522 15$:	BBC	#UCB$V_VALID,4(SP),20$	;IF CLR, VOLUME SOFTWARE INVALID

                          06         0E1D       

         58 A5       0800 8F     A8  0E1E  2523 	BISW	#UCB$M_VALID,UCB$W_STS(R5) ;SET VOLUME SOFTWARE VALID

            63            09     9A  0E24  2524 20$:	MOVZBL	#F_DRVCLR!1,MT_CS1(R3)	;CLEAR DRIVE

            8E            8E     C9  0E27  2525 30$:	BISL3	(SP)+,(SP)+,MBA$L_SR(R4) ;CLEAR MBA STATUS

                       08 A4         0E2A       

                                 05  0E2C  2526 	RSB				;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  55

01              TM03-TE16/TU77 UNSOLICITED INTERRUPT PROCESSING                                                                  (1)



                                     0E2D  2528 	.SBTTL	TM03-TE16/TU77 UNSOLICITED INTERRUPT PROCESSING

                                     0E2D  2529 ;

                                     0E2D  2530 ; TM_UNSOLNT - TM03-TE16/TU77 UNSOLICITED INTERRUPT PROCESSING

                                     0E2D  2531 ;

                                     0E2D  2532 ; THIS ROUTINE IS CALLED WHEN AN UNSOLICITED INTERRUPT IS RECEIVED FOR A SLAVE

                                     0E2D  2533 ; DRIVE.

                                     0E2D  2534 ;

                                     0E2D  2535 ; INPUTS:

                                     0E2D  2536 ;

                                     0E2D  2537 ;	R4 = ADDRESS OF TM03 DRIVE CONTROL REGISTER.

                                     0E2D  2538 ;	R5 = DEVICE UNIT UCB ADDRESS.

                                     0E2D  2539 ;

                                     0E2D  2540 ; OUTPUTS:

                                     0E2D  2541 ;

                                     0E2D  2542 ;	THE UNIT STATUS AND DRIVE TYPE IS ESTABLISHED.

                                     0E2D  2543 ;

                                     0E2D  2544  

                                     0E2D  2545 TM_UNSOLNT:				;UNSOLICITED INTERRUPT PROCESSING

         58 A5            10     AA  0E2D  2546 	BICW	#UCB$M_ONLINE,UCB$W_STS(R5) ;SET UNIT OFFLINE

         18 A4   FFFF01FF 8F     CB  0E31  2547 	BICL3	#^C<^XFE00>,MT_DT(R4),R2 ;ISOLATE HIGH PART OF DRIVE TYPE

                          52         0E39       

            52       C400 8F     B1  0E3A  2548 	CMPW	#^XC400,R2		;TAPE DRIVE AND SLAVE PRESENT?

                          14     12  0E3F  2549 	BNEQ	10$			;IF NEQ NO

         58 A5            10     A8  0E41  2550 	BISW	#UCB$M_ONLINE,UCB$W_STS(R5) ;SET UNIT ONLINE

            53            54     D0  0E45  2551 	MOVL	R4,R3			;SET ADDRESS OF TM03 DRIVE CONTROL REGISTER

                          FEED   30  0E48  2552 	BSBW	TM_DTYPE		;CLASSIFY DRIVE TYPE

         58 A5            04     E1  0E4B  2553 	BBC	#UCB$V_ONLINE,UCB$W_STS(R5),10$ ;IF CLR, UNKNOWN DRIVE TYPE

                          05         0E4F       

         58 A5            05     E0  0E50  2554 	BBS	#UCB$V_POWER,UCB$W_STS(R5),20$ ;IF SET, POWER FAILURE

                          06         0E54       

         58 A5       0800 8F     AA  0E55  2555 10$:	BICW	#UCB$M_VALID,UCB$W_STS(R5) ;CLEAR VOLUME SOFTWARE VALID

            64            09     9A  0E5B  2556 20$:	MOVZBL	#F_DRVCLR!1,MT_CS1(R4)	;CLEAR DRIVE

                                 05  0E5E  2557 	RSB				;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  56

01              TM03-TE16/TU77 DRIVE STATUS SAVE ROUTINE                                                                         (1)



                                     0E5F  2559 	.SBTTL	TM03-TE16/TU77 DRIVE STATUS SAVE ROUTINE

                                     0E5F  2560 ;

                                     0E5F  2561 ; TM_SAVDRVSTS - TM03-TE16/TU77 DRIVE STATUS SAVE ROUTINE

                                     0E5F  2562 ;

                                     0E5F  2563 ; THIS ROUTINE IS CALLED FROM DEVICE INTERRUPT LEVEL TO SAVE FINAL DRIVE REGISTERS

                                     0E5F  2564 ; AND THEN CLEAR THE DRIVE.

                                     0E5F  2565 ;

                                     0E5F  2566 ; INPUTS:

                                     0E5F  2567 ;

                                     0E5F  2568 ;	R3 = ADDRESS OF DRIVE CONTROL STATUS REGISTER 1.

                                     0E5F  2569 ;	R4 = ADDRESS OF MBA CONFIGURATION STATUS REGISTER.

                                     0E5F  2570 ;	R5 = DEVICE UNIT UCB ADDRESS.

                                     0E5F  2571 ;

                                     0E5F  2572 ; OUTPUTS:

                                     0E5F  2573 ;

                                     0E5F  2574 ;	THE FINAL DRIVE REGISTERS ARE SAVED AND THE DRIVE IS CLEARED.

                                     0E5F  2575 ;

                                     0E5F  2576  

                                     0E5F  2577 TM_SAVDRVSTS:				;SAVE DRIVE STATUS

       008C C5         14 A3     F7  0E5F  2578 	CVTLW	MT_FC(R3),UCB$W_MT_FC(R5) ;SAVE FRAME COUNT REGISTER

       008A C5         08 A3     F7  0E65  2579 	CVTLW	MT_ER(R3),UCB$W_MT_ER(R5) ;SAVE ERROR STATUS REGISTER

       0088 C5         04 A3     F7  0E6B  2580 	CVTLW	MT_DS(R3),UCB$W_MT_DS(R5) ;SAVE DRIVE STATUS REGISTER

       0092 C5         24 A3     F7  0E71  2581 	CVTLW	MT_TC(R3),UCB$W_MT_TC_SAV(R5) ;SAVE TAPE CONTROL REGISTER

       0090 C5            63     F7  0E77  2582 	CVTLW	MT_CS1(R3),UCB$W_MT_CS1(R5) ;SAVE DRIVE CONTROL REGISTER

            63            09     9A  0E7C  2583 	MOVZBL	#F_DRVCLR!1,MT_CS1(R3)	;CLEAR DRIVE

                                 05  0E7F  2584 	RSB				;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  57

01              TM03-TE16/TU77 SETUP MBA FOR INTERNAL SPACING F                                                                  (1)



                                     0E80  2586 	.SBTTL	TM03-TE16/TU77 SETUP MBA FOR INTERNAL SPACING FUNCTION

                                     0E80  2587 ;

                                     0E80  2588 ; TM_SETINTSPC - TM03-TE16/TU77 SETUP MBA FOR INTERNAL SPACING FUNCTION

                                     0E80  2589 ;

                                     0E80  2590 ; THIS ROUTINE IS CALLED TO SETUP THE MBA REGISTERS FOR AN INTERNAL SPACING

                                     0E80  2591 ; FUNCTION THAT USES THE INTERRUPT STACK AS A WRITECHECK BUFFER.

                                     0E80  2592 ;

                                     0E80  2593 ; INPUTS:

                                     0E80  2594 ;

                                     0E80  2595 ;	R3 = ADDRESS OF DRIVE CONTROL STATUS REGISTER 1.

                                     0E80  2596 ;	R4 = ADDRESS OF MBA CONFIGURATION STATUS REGISTER.

                                     0E80  2597 ;	R5 = DEVICE UNIT UCB ADDRESS.

                                     0E80  2598 ;

                                     0E80  2599 ; OUTPUTS:

                                     0E80  2600 ;

                                     0E80  2601 ;	THE MBA MAP REGISTERS, BYTE COUNT REGISTER, AND VIRTUAL ADDRESS REGISTER

                                     0E80  2602 ;	IS LOADED WITH VALUES THAT MAP ONE PAGE OF THE INTERRUPT STACK.

                                     0E80  2603 ;

                                     0E80  2604  

                                     0E80  2605 TM_SETINTSPC:				;SETUP MBA FOR INTERNAL SPACING FUNCTION

            7E         68 A5     7D  0E80  2606 	MOVQ	UCB$L_SVAPTE(R5),-(SP)	;SAVE CURRENT TRANSFER PARAMETERS

                       6C A5     B4  0E84  2607 	CLRW	UCB$W_BOFF(R5)		;CLEAR BYTE OFFSET IN PAGE

         6E A5       0200 8F     B0  0E87  2608 	MOVW	#512,UCB$W_BCNT(R5)	;SET TRANSFER BYTE COUNT

            50   00000000'GF     D0  0E8D  2609 	MOVL	G^MMG$GL_SPTBASE,R0	;GET BASE ADDRESS OF SYSTEM PAGE TABLE

            51       F168 CF     9E  0E94  2610 	MOVAB	TM$DDT,R1		;GET STARTING ADDRESS OF DRIVER

            00'           00'    EF  0E99  2611 	EXTZV	S^#VA$V_VPN,S^#VA$S_VPN,R1,R1 ;EXTRACT SYSTEM VIRTUAL PAGE NUMBER

            51            51         0E9C       

         68 A5            6041   DE  0E9E  2612 	MOVAL	(R0)[R1],UCB$L_SVAPTE(R5) ;SET STARTING PTE ADDRESS

         08 A4            00     D2  0EA3  2613 	MCOML	#0,MBA$L_SR(R4)		;CLEAR MBA STATUS REGISTER

                                     0EA7  2614 	LOADMBA				;LOAD MBA MAPPING REGISTERS

         68 A5            8E     7D  0EAD  2615 	MOVQ	(SP)+,UCB$L_SVAPTE(R5)	;RESTORE CURRENT TRANSFER PARAMETERS

                                 05  0EB1  2616 	RSB				;

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  58

01              TM03-TE16/TU77 SLAVE CONTROLLER INTERRUPT DISPA                                                                  (1)



                                     0EB2  2618 	.SBTTL	TM03-TE16/TU77 SLAVE CONTROLLER INTERRUPT DISPATCHER

                                     0EB2  2619 ;+

                                     0EB2  2620 ; TM$INT - TM03-TE16/TU77 SLAVE CONTROLLER INTERRUPT DISPATCHER

                                     0EB2  2621 ;

                                     0EB2  2622 ; THIS ROUTINE IS ENTERED VIA A JSB INSTRUCTION WHEN AN INTERRUPT OCCURS ON A

                                     0EB2  2623 ; TM03-TE16/TU77 SLAVE CONTROLLER. THE STATE OF THE STACK ON ENTRY IS:

                                     0EB2  2624 ;

                                     0EB2  2625 ;	00(SP) = ADDRESS OF IDB ADDRESS.

                                     0EB2  2626 ;	04(SP) = SAVED R2.

                                     0EB2  2627 ;	08(SP) = SAVED R3.

                                     0EB2  2628 ;	12(SP) = SAVED R4.

                                     0EB2  2629 ;	16(SP) = SAVED R5.

                                     0EB2  2630 ;	20(SP) = INTERRUPT PC.

                                     0EB2  2631 ;	24(SP) = INTERRUPT PSL.

                                     0EB2  2632 ;

                                     0EB2  2633 ; INTERRUPT DISPATCHING OCCURS AS FOLLOWS:

                                     0EB2  2634 ;

                                     0EB2  2635 ;	IF THE INTERRUPTING CONTROLLER IS CURRENTLY OWNED AND THE OWNER UNIT IS

                                     0EB2  2636 ;	EXPECTING AN INTERRUPT, THEN THAT UNIT IS DISPATCHED FIRST. ALL OTHER

                                     0EB2  2637 ;	UNITS ARE DISPATCHED BY SELECTING THE CORRESPONDING SLAVE DRIVE, READING

                                     0EB2  2638 ;	ITS STATUS, AND DISPATCHING IF AN ATTENTION CONDITION EXISTS. AS EACH UNIT

                                     0EB2  2639 ;	IS FOUND, A TEST IS MADE TO DETERMINE IF AN INTERRUPT IS EXPECTED ON THE

                                     0EB2  2640 ;	UNIT. IF YES, THEN THE DRIVER IS CALLED AT ITS INTERRUPT RETURN ADDRESS.

                                     0EB2  2641 ;	ELSE THE DRIVER IS CALLED AT ITS UNSOLICITED INTERRUPT ADDRESS. AS EACH

                                     0EB2  2642 ;	CALL TO THE DRIVER RETURNS, THE NEXT SLAVE UNIT IS SELECTED AND AN ATTEMPT

                                     0EB2  2643 ;	IS MADE TO DISPATCH THAT UNIT. WHEN ALL UNITS HAVE BEEN SELECTED AND NO

                                     0EB2  2644 ;	ATTENTION CONDITIONS REMAIN, THE INTERRUPT IS DISMISSED.

                                     0EB2  2645 ;-

                                     0EB2  2646  

                                     0EB2  2647 TM$INT::				;TM03-TE16/TU77 SLAVE CONTROLLER INTERRUPT DISPATHCER

            53         00 BE     D0  0EB2  2648 	MOVL	@(SP),R3		;GET ADDRESS OF IDB

            54            63     D0  0EB6  2649 	MOVL	IDB$L_CSR(R3),R4	;GET ADDRESS OF TM03-TE16/TU77 REGISTERS

         04 A4   00000080 8F     D3  0EB9  2650 	BITL	#MT_DS_M_DRY,MT_DS(R4)	;*****TEMP*****

                          02     12  0EC1  2651 	BNEQ	5$			;*****TEMP*****

                          FF     11  0EC3  2652 	BRB	.			;*****TEMP*****

                                     0EC5  2653 5$:					;*****TEMP*****

                       24 A4     DD  0EC5  2654 	PUSHL	MT_TC(R4)		;SAVE CONTENTS OF TAPE CONTROL REGISTER

            55         04 A3     D0  0EC8  2655 	MOVL	IDB$L_OWNER(R3),R5	;GET OWNER UCB ADDRESS

                          0C     13  0ECC  2656 	BEQL	10$			;IF EQL NONE

         58 A5            01     E5  0ECE  2657 	BBCC	#UCB$V_INT,UCB$W_STS(R5),10$ ;IF CLR, INTERRUPT NOT EXPECTED

                          07         0ED2       

            53         10 A5     7D  0ED3  2658 	MOVQ	UCB$L_FR3(R5),R3	;RESTORE DRIVER CONTEXT

                       0C B5     16  0ED7  2659 	JSB	@UCB$L_FPC(R5)		;CALL DRIVER

                          52     D4  0EDA  2660 10$:	CLRL	R2			;SET STARTING UNIT NUMBER

            53         04 BE     D0  0EDC  2661 20$:	MOVL	@4(SP),R3		;RETRIEVE ADDRESS OF IDB

            54            63     D0  0EE0  2662 	MOVL	IDB$L_CSR(R3),R4	;RETRIEVE ADDRESS OF TM03-TE16/TU77 REGISTERS

         24 A4            52     D0  0EE3  2663 	MOVL	R2,MT_TC(R4)		;SELECT NEXT SLAVE UNIT

            55         10 A342   D0  0EE7  2664 	MOVL	IDB$L_UCBLST(R3)[R2],R5	;GET ADDRESS OF UCB

                          3A     13  0EEC  2665 	BEQL	60$			;IF EQL NONE

            53         04 A4     D0  0EEE  2666 	MOVL	MT_DS(R4),R3		;READ SLAVE DRIVE STATUS

            53            00     E0  0EF2  2667 	BBS	#MT_DS_V_SLA,R3,30$	;IF SET, SLAVE TRANSITION TO ONLINE

                          1E         0EF5       

            53            0C     E1  0EF6  2668 	BBC	#MT_DS_V_MOL,R3,40$	;IF CLR, MEDIUM OFFLINE

                          20         0EF9       

            53            0D     E0  0EFA  2669 	BBS	#MT_DS_V_PIP,R3,70$	;IF SET, POSITIONING IN PROGRESS

                          2D         0EFD       

            53            01     E1  0EFE  2670 	BBC	#MT_DS_V_BOT,R3,70$	;IF CLR, NOT AT BEGINNING OF TAPE

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  59

01              TM03-TE16/TU77 SLAVE CONTROLLER INTERRUPT DISPA                                                                  (1)



                          29         0F01       

         5A A5            01     AA  0F02  2671 	BICW	#UCB$M_MT_REWIND,UCB$W_DEVSTS(R5) ;CLEAR REWIND IN PROGRESS

         58 A5            01     E5  0F06  2672 	BBCC	#UCB$V_INT,UCB$W_STS(R5),60$ ;IF CLR, INTERRUPT NOT EXPECTED

                          1D         0F0A       

            53         10 A5     7D  0F0B  2673 	MOVQ	UCB$L_FR3(R5),R3	;RESTORE DRIVER CONTEXT

                       0C B5     16  0F0F  2674 	JSB	@UCB$L_FPC(R5)		;CALL DRIVER

                          C6     11  0F12  2675 	BRB	10$			;

         5A A5            02     A8  0F14  2676 30$:	BISW	#UCB$M_MT_PRVMOL,UCB$W_DEVSTS(R5) ;SET PREVIOUS MOL STATE

                          05     11  0F18  2677 	BRB	50$			;

         5A A5            01     E5  0F1A  2678 40$:	BBCC	#UCB$V_MT_PRVMOL,UCB$W_DEVSTS(R5),70$ ;IF CLR, PREVIOUSLY OFFLINE

                          0C         0F1E       

         5A A5            01     AA  0F1F  2679 50$:	BICW	#UCB$M_MT_REWIND,UCB$W_DEVSTS(R5) ;CLEAR REWIND IN PROGRESS

                          FF07   30  0F23  2680 	BSBW	TM_UNSOLNT		;CALL UNSOLICITED INTERRUPT ENTRY

                          B2     11  0F26  2681 	BRB	10$			;

            64            09     9A  0F28  2682 60$:	MOVZBL	#F_DRVCLR!1,MT_CS1(R4)	;CLEAR DRIVE

            52            07     F3  0F2B  2683 70$:	AOBLEQ	#7,R2,20$		;ANY MORE SLAVE UNITS TO SCAN?

                          AD         0F2E       

         04 A4            19     78  0F2F  2684 	ASHL	#31-MT_DS_V_SSC,MT_DS(R4),R2 ;ANY SLAVE CHANGE STATUS

                          52         0F33       

                          A4     19  0F34  2685 	BLSS	10$			;IF LSS YES

                       24 A4   8ED0  0F36  2686 	POPL	MT_TC(R4)		;RESTORE CONTENTS OF TAPE CONTROL REGISTER

            5E            04     C0  0F3A  2687 	ADDL	#4,SP			;CLEAN STACK

            52            8E     7D  0F3D  2688 	MOVQ	(SP)+,R2		;RESTORE REGISTERS

            54            8E     7D  0F40  2689 	MOVQ	(SP)+,R4		;

                                 02  0F43  2690 	REI				;

                                     0F44  2691 TM_END:					;ADDRESS OF LAST LOCATION IN DRIVER

                                     0F44  2692  

                                     0F44  2693 	.END

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  60

SYMBOL TABLE                                                                                                                     (1)



$$OP           = 00000002            DDB$L_UCB        00000004            EMB$C_CR       = 00000025            

$.$            = 000096E0            DDB$T_DRVNAME    00000024            EMB$C_CS       = 00000020            

ACP$ACCESS       ********   X   04   DDB$T_NAME       00000014            EMB$C_DE       = 00000001            

ACP$DEACCESS     ********   X   04   DDB$W_SIZE       00000008            EMB$C_DT       = 00000060            

ACP$MODIFY       ********   X   04   DENSITY          00000018 R     04   EMB$C_HE       = 00000008            

ACP$MOUNT        ********   X   04   DEV$M_AVL        ********   X   03   EMB$C_LENGTH     00000004            

ACP$READBLK      ********   X   04   DEV$M_DIR        ********   X   03   EMB$C_MC       = 00000002            

ACP$WRITEBLK     ********   X   04   DEV$M_ELG        ********   X   03   EMB$C_NF       = 00000023            

AT$_MBA          ********   X   03   DEV$M_FOD        ********   X   03   EMB$C_NM       = 0000002A            

BIT...         = 00000002            DEV$M_IDV        ********   X   03   EMB$C_OM       = 00000029            

CDF_DRVCLR     = 00000004            DEV$M_ODV        ********   X   03   EMB$C_SA       = 00000005            

CDF_ERASE      = 00000006            DEV$M_SDI        ********   X   03   EMB$C_SBC      = 00000028            

CDF_INTSPCFOR  = 00000014            DEV$M_SQD        ********   X   03   EMB$C_SE       = 00000006            

CDF_INTSPCREV  = 00000015            DOUBLE           000007FE R     04   EMB$C_SS       = 00000027            

CDF_NOP        = 00000000            DPT$B_ADPTYPE    0000000C            EMB$C_TS       = 00000026            

CDF_PACKACK    = 00000008            DPT$B_FLAGS      0000000D            EMB$C_TS_LENGTH  00000010            

CDF_READDATA   = 0000000C            DPT$B_REFC       0000000B            EMB$C_UBC      = 00000070            

CDF_READDATAR  = 0000000F            DPT$B_TYPE       0000000A            EMB$C_UI       = 00000061            

CDF_READPRESET = 00000010            DPT$C_LENGTH     00000022            EMB$C_VD       = 00000041            

CDF_REWIND     = 00000003            DPT$INITAB       0000001F R     03   EMB$C_VM       = 00000040            

CDF_SENSECHAR  = 00000012            DPT$K_LENGTH     00000022            EMB$C_WS       = 00000024            

CDF_SETCHAR    = 00000011            DPT$L_BLINK      00000004            EMB$K_AW       = 00000007            

CDF_SPCFILFOR  = 00000002            DPT$L_FLINK      00000000            EMB$K_BE       = 00000004            

CDF_SPCFILREV  = 00000005            DPT$M_NOUNLOAD = 00000004            EMB$K_CR       = 00000025            

CDF_SPCRECFOR  = 00000009            DPT$M_SUBCNTRL = 00000001            EMB$K_CS       = 00000020            

CDF_SPCRECREV  = 00000007            DPT$M_SVP      = 00000002            EMB$K_DE       = 00000001            

CDF_UNLOAD     = 00000001            DPT$REINITAB     00000050 R     03   EMB$K_DT       = 00000060            

CDF_WRITE      = 0000000E            DPT$TAB          00000000 R     03   EMB$K_HE       = 00000008            

CDF_WRITECHECK = 0000000A            DPT$T_NAME       00000016            EMB$K_LENGTH     00000004            

CDF_WRITECHECKR= 0000000D            DPT$V_NOUNLOAD = 00000002            EMB$K_MC       = 00000002            

CDF_WRITEDATA  = 0000000B            DPT$V_SUBCNTRL = 00000000            EMB$K_NF       = 00000023            

CDF_WRITEMARK  = 00000013            DPT$V_SVP      = 00000001            EMB$K_NM       = 0000002A            

CHECK_ERROR      00000768 R     04   DPT$W_INITTAB    00000010            EMB$K_OM       = 00000029            

CRB$B_MASK       0000000E            DPT$W_REINITTAB  00000012            EMB$K_SA       = 00000005            

CRB$B_TT_ATTN    00000004            DPT$W_SIZE       00000008            EMB$K_SBC      = 00000028            

CRB$B_TT_EXPEC   00000005            DPT$W_UCBSIZE    0000000E            EMB$K_SE       = 00000006            

CRB$B_TYPE       0000000A            DPT$W_UNLOAD     00000014            EMB$K_SS       = 00000027            

CRB$C_LENGTH     00000038            DRVCLR           00000366 R     04   EMB$K_TS       = 00000026            

CRB$K_LENGTH     00000038            DRVREG           00000AF8 R     04   EMB$K_TS_LENGTH  00000010            

CRB$L_INTD       00000014            DT$_TE16         ********   X   04   EMB$K_UBC      = 00000070            

CRB$L_INTD2      00000038            DT$_TU45         ********   X   04   EMB$K_UI       = 00000061            

CRB$L_LINK       00000010            DT$_TU77         ********   X   04   EMB$K_VD       = 00000041            

CRB$L_TT_DIAL    00000000            DYN$C_CRB        ********   X   03   EMB$K_VM       = 00000040            

CRB$L_WQBL       00000004            DYN$C_DDB        ********   X   03   EMB$K_WS       = 00000024            

CRB$L_WQFL       00000000            DYN$C_DPT        ********   X   03   EMB$L_DV_CHAR    00000036            

CRB$M_BSY      = 00000001            DYN$C_UCB        ********   X   03   EMB$L_DV_MEDIA   00000026            

CRB$V_BSY      = 00000000            EMB$B_BUFIND     00000002            EMB$L_DV_OPCNT   0000002E            

CRB$W_REFC       0000000C            EMB$B_DEVCLS     00000005            EMB$L_DV_OWNUIC  00000032            

CRB$W_SIZE       00000008            EMB$B_DEVTYP     00000004            EMB$L_DV_REGSAV  0000004E            

DC$_TAPE         ********   X   03   EMB$B_DV_CLASS   0000001C            EMB$L_DV_RQPID   0000001E            

DDB$B_ACPCLASS   00000013            EMB$B_DV_ERTCNT  00000010            EMB$Q_DV_IOSB    00000012            

DDB$B_TYPE       0000000A            EMB$B_DV_ERTMAX  00000011            EMB$Q_DV_TIME    00000006            

DDB$C_LENGTH     00000034            EMB$B_DV_SLAVE   0000003A            EMB$Q_HD_TIME    00000006            

DDB$K_LENGTH     00000034            EMB$B_DV_TYPE    0000001D            EMB$Q_TS_TIME    00000006            

DDB$L_ACPD       00000010            EMB$B_VALID      00000003            EMB$T_DV_NAME    0000003E            

DDB$L_DDT        0000000C            EMB$C_AW       = 00000007            EMB$W_DV_BCNT    00000024            

DDB$L_LINK       00000000            EMB$C_BE       = 00000004            EMB$W_DV_BOFF    00000022            

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  61

SYMBOL TABLE                                                                                                                     (1)



EMB$W_DV_DEVSTS  0000001A            IDB$L_OWNER      00000004            IO$V_DMOUNT    = 0000000A            

EMB$W_DV_ENTRY   00000004            IDB$L_UCBLST     00000010            IO$V_DSABLMBX  = 0000000A            

EMB$W_DV_ERRCNT  0000002C            IDB$W_SIZE       00000008            IO$V_ENABLMBX  = 00000007            

EMB$W_DV_ERRSEQ  0000000E            IMMED            00000A08 R     04   IO$V_FCODE     = 00000000            

EMB$W_DV_FUNC    0000003C            INTSPC           0000096E R     04   IO$V_HANGUP    = 00000009            

EMB$W_DV_UNIT    0000002A            IO$M_ABORT     = 00000100            IO$V_INHERLOG  = 0000000B            

EMB$W_HD_ENTRY   00000004            IO$M_ACCESS    = 00000040            IO$V_INHEXTGAP = 0000000C            

EMB$W_HD_ERRSEQ  0000000E            IO$M_ATTNAST   = 00000100            IO$V_INHRETRY  = 0000000F            

EMB$W_SIZE       00000000            IO$M_BINARY    = 00000040            IO$V_INHSEEK   = 0000000C            

EMB$W_TS_ENTRY   00000004            IO$M_CANCTRLO  = 00000040            IO$V_INTERRUPT = 00000006            

EMB$W_TS_ERRSEQ  0000000E            IO$M_COMMOD    = 00000040            IO$V_INTSKIP   = 00000008            

ENBEXT           00000A19 R     04   IO$M_CREATE    = 00000080            IO$V_MOUNT     = 00000009            

ENBXIT           00000B03 R     04   IO$M_CTRLCAST  = 00000100            IO$V_NOECHO    = 00000006            

ERASE            0000031B R     04   IO$M_CTRLYAST  = 00000080            IO$V_NOFILTR   = 00000009            

ERL$DEVICERR     ********   X   04   IO$M_CVTLOW    = 00000100            IO$V_NOFORMAT  = 00000008            

ERL$DEVICTMO     ********   X   04   IO$M_DATACHECK = 00004000            IO$V_NOW       = 00000006            

ERR_SPACING    = 00000005            IO$M_DELETE    = 00000100            IO$V_NOWAIT    = 00000007            

EXE$IOFORK       ********   X   04   IO$M_DMOUNT    = 00000400            IO$V_PACKED    = 00000007            

EXE$ONEPARM      ********   X   04   IO$M_DSABLMBX  = 00000400            IO$V_PURGE     = 0000000B            

EXE$SETMODE      ********   X   04   IO$M_ENABLMBX  = 00000080            IO$V_READATTN  = 00000007            

EXE$SNDEVMSG     ********   X   04   IO$M_FCODE     = 0000003F            IO$V_REVERSE   = 00000006            

EXE$ZEROPARM     ********   X   04   IO$M_HANGUP    = 00000200            IO$V_SHUTDOWN  = 00000007            

FATALERR         00000802 R     04   IO$M_INHERLOG  = 00000800            IO$V_STARTUP   = 00000006            

FDISPATCH        0000024C R     04   IO$M_INHEXTGAP = 00001000            IO$V_SYNCH     = 00000009            

FEX              00000930 R     04   IO$M_INHRETRY  = 00008000            IO$V_TIMED     = 00000007            

FORMAT           0000004C R     04   IO$M_INHSEEK   = 00001000            IO$V_TRMNOECHO = 0000000C            

FTAB             00000036 R     04   IO$M_INTERRUPT = 00000040            IO$V_WRTATTN   = 00000008            

FUNCXT           00000871 R     04   IO$M_INTSKIP   = 00000100            IO$_ACCESS     = 00000032            

F_DRVCLR       = 00000008            IO$M_MOUNT     = 00000200            IO$_ACPCONTROL = 00000038            

F_ERASE        = 00000014            IO$M_NOECHO    = 00000040            IO$_CREATE     = 00000033            

F_INTSPCFOR    = 00000028            IO$M_NOFILTR   = 00000200            IO$_DEACCESS   = 00000034            

F_INTSPCREV    = 0000002E            IO$M_NOFORMAT  = 00000100            IO$_DELETE     = 00000035            

F_NOP          = 00000000            IO$M_NOW       = 00000040            IO$_DIAGNOSE   = 0000001D            

F_PACKACK      = 00000000            IO$M_NOWAIT    = 00000080            IO$_DRVCLR     = 00000004            

F_READDATA     = 00000038            IO$M_PACKED    = 00000080            IO$_ERASETAPE  = 00000006            

F_READDATAR    = 0000003E            IO$M_PURGE     = 00000800            IO$_LOGICAL    = 0000002F            

F_READPRESET   = 00000010            IO$M_READATTN  = 00000080            IO$_MODIFY     = 00000036            

F_REWIND       = 00000006            IO$M_REVERSE   = 00000040            IO$_MOUNT      = 00000039            

F_SENSECHAR    = 00000000            IO$M_SHUTDOWN  = 00000080            IO$_NOP        = 00000000            

F_SETCHAR      = 00000000            IO$M_STARTUP   = 00000040            IO$_OFFSET     = 00000006            

F_SPCFILFOR    = 00000018            IO$M_SYNCH     = 00000200            IO$_PACKACK    = 00000008            

F_SPCFILREV    = 0000001A            IO$M_TIMED     = 00000080            IO$_PHYSICAL   = 0000001F            

F_SPCRECFOR    = 00000018            IO$M_TRMNOECHO = 00001000            IO$_READHEAD   = 0000000E            

F_SPCRECREV    = 0000001A            IO$M_WRTATTN   = 00000100            IO$_READLBLK   = 00000021            

F_UNLOAD       = 00000002            IO$S_FCODE     = 00000006            IO$_READPBLK   = 0000000C            

F_WRITE        = 00000030            IO$V_ABORT     = 00000008            IO$_READPRESET = 00000019            

F_WRITECHECK   = 00000028            IO$V_ACCESS    = 00000006            IO$_READPROMPT = 00000037            

F_WRITECHECKR  = 0000002E            IO$V_ATTNAST   = 00000008            IO$_READTRACKD = 00000010            

F_WRITEDATA    = 00000030            IO$V_BINARY    = 00000006            IO$_READVBLK   = 00000031            

F_WRITEMARK    = 00000016            IO$V_CANCTRLO  = 00000006            IO$_RECAL      = 00000003            

GBL...         = 00000001            IO$V_COMMOD    = 00000006            IO$_RELEASE    = 00000005            

IDB$B_TYPE       0000000A            IO$V_CREATE    = 00000007            IO$_RETCENTER  = 00000007            

IDB$B_UNITS      0000000B            IO$V_CTRLCAST  = 00000008            IO$_REWIND     = 00000024            

IDB$C_LENGTH     00000030            IO$V_CTRLYAST  = 00000007            IO$_REWINDOFF  = 00000022            

IDB$K_LENGTH     00000030            IO$V_CVTLOW    = 00000008            IO$_SEARCH     = 00000009            

IDB$L_ADP        0000000C            IO$V_DATACHECK = 0000000E            IO$_SEEK       = 00000002            

IDB$L_CSR        00000000            IO$V_DELETE    = 00000008            IO$_SENSECHAR  = 0000001B            

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  62

SYMBOL TABLE                                                                                                                     (1)



IO$_SENSEMODE  = 00000027            IRP$M_MBXIO    = 00000400            MBA$M_SR_CRD   = 20000000            

IO$_SETCHAR    = 0000001A            IRP$M_PAGIO    = 00000004            MBA$M_SR_DLT   = 00000800            

IO$_SETMODE    = 00000023            IRP$M_PHYSIO   = 00000100            MBA$M_SR_DTABT = 00001000            

IO$_SKIPFILE   = 00000025            IRP$M_PRIVIO   = 00000200            MBA$M_SR_DTBUSY= 80000000            

IO$_SKIPRECORD = 00000026            IRP$M_SWAPIO   = 00000040            MBA$M_SR_DTCOMP= 00002000            

IO$_SPACEFILE  = 00000002            IRP$M_VIRTUAL  = 00000010            MBA$M_SR_ERCONF= 00000008            

IO$_SPACERECORD= 00000009            IRP$Q_NT_PRVMSK  0000003C            MBA$M_SR_INVMAP= 00000010            

IO$_STARTSPNDL = 00000019            IRP$S_FCODE    = 00000006            MBA$M_SR_ISTO  = 00000002            

IO$_UNLOAD     = 00000001            IRP$S_FMOD     = 0000000A            MBA$M_SR_MAPPE = 00000020            

IO$_VIRTUAL    = 0000003F            IRP$S_MODE     = 00000002            MBA$M_SR_MBEXC = 00000080            

IO$_WRITECHECK = 0000000A            IRP$V_BUFIO    = 00000000            MBA$M_SR_MCPE  = 00020000            

IO$_WRITECHECKH= 00000018            IRP$V_CHAINED  = 00000005            MBA$M_SR_MDPE  = 00000040            

IO$_WRITEHEAD  = 0000000D            IRP$V_COMPLX   = 00000003            MBA$M_SR_MXF   = 00000100            

IO$_WRITELBLK  = 00000020            IRP$V_DIAGBUF  = 00000007            MBA$M_SR_NED   = 00040000            

IO$_WRITEMARK  = 0000001C            IRP$V_FCODE    = 00000000            MBA$M_SR_NRCONF= 40000000            

IO$_WRITEOF    = 00000028            IRP$V_FMOD     = 00000006            MBA$M_SR_PGE   = 00080000            

IO$_WRITEPBLK  = 0000000B            IRP$V_FUNC     = 00000001            MBA$M_SR_RDS   = 00000004            

IO$_WRITETRACKD= 0000000F            IRP$V_MBXIO    = 0000000A            MBA$M_SR_RDTO  = 00000001            

IO$_WRITEVBLK  = 00000030            IRP$V_MODE     = 00000000            MBA$M_SR_WCKLWR= 00000200            

IOC$CANCELIO     ********   X   04   IRP$V_PAGIO    = 00000002            MBA$M_SR_WCKUPR= 00000400            

IOC$DIAGBUFILL   ********   X   04   IRP$V_PHYSIO   = 00000008            MBA$S_CSR_ADCOD= 00000008            

IOC$LOADMBAMAP   ********   X   04   IRP$V_PRIVIO   = 00000009            MBA$S_ERB_UNIT = 00000003            

IOC$RELCHAN      ********   X   04   IRP$V_SWAPIO   = 00000006            MBA$V_CR_ABORT = 00000001            

IOC$RELSCHAN     ********   X   04   IRP$V_VIRTUAL  = 00000004            MBA$V_CR_IE    = 00000002            

IOC$REQCOM       ********   X   04   IRP$W_ABCNT      0000003C            MBA$V_CR_INIT  = 00000000            

IOC$REQPCHANL    ********   X   04   IRP$W_BCNT       00000032            MBA$V_CSR_ADCOD= 00000000            

IOC$REQSCHANL    ********   X   04   IRP$W_BOFF       00000030            MBA$V_CSR_MT   = 0000001B            

IOC$WFIKPCH      ********   X   04   IRP$W_CHAN       00000028            MBA$V_CSR_OT   = 00000015            

IOC$WFIRLCH      ********   X   04   IRP$W_FUNC       00000020            MBA$V_CSR_PD   = 00000017            

IRP$B_CARCON     00000038            IRP$W_OBCNT      0000003E            MBA$V_CSR_PE   = 0000001F            

IRP$B_EFN        00000022            IRP$W_SIZE       00000008            MBA$V_CSR_PU   = 00000016            

IRP$B_PRI        00000023            IRP$W_STS        0000002A            MBA$V_CSR_URD  = 0000001D            

IRP$B_RMOD       0000000B            IRP$W_TT_PRMPT   0000003C            MBA$V_CSR_WS   = 0000001E            

IRP$B_TYPE       0000000A            LOSTPOS          000007EC R     04   MBA$V_CSR_XMFLT= 0000001A            

IRP$C_LENGTH     0000004C            MASKH          = 00000008            MBA$V_ERB_UNIT = 00000007            

IRP$K_LENGTH     0000004C            MASKL          = 04000000            MBA$V_SR_ATTN  = 00000010            

IRP$L_AST        00000010            MBA$L_AS         00000410            MBA$V_SR_CRD   = 0000001D            

IRP$L_ASTPRM     00000014            MBA$L_BCR        00000010            MBA$V_SR_DLT   = 0000000B            

IRP$L_DIAGBUF    00000044            MBA$L_CR         00000004            MBA$V_SR_DTABT = 0000000C            

IRP$L_IOQBL      00000004            MBA$L_CSR        00000000            MBA$V_SR_DTBUSY= 0000001F            

IRP$L_IOQFL      00000000            MBA$L_ERB        00000400            MBA$V_SR_DTCOMP= 0000000D            

IRP$L_IOSB       00000024            MBA$L_MAP        00000800            MBA$V_SR_ERCONF= 00000003            

IRP$L_IOST1      00000034            MBA$L_SR         00000008            MBA$V_SR_INVMAP= 00000004            

IRP$L_IOST2      00000038            MBA$L_VAR        0000000C            MBA$V_SR_ISTO  = 00000001            

IRP$L_MEDIA      00000034            MBA$M_CR_ABORT = 00000002            MBA$V_SR_MAPPE = 00000005            

IRP$L_PID        0000000C            MBA$M_CR_IE    = 00000004            MBA$V_SR_MBEXC = 00000007            

IRP$L_SEGVBN     00000040            MBA$M_CR_INIT  = 00000001            MBA$V_SR_MCPE  = 00000011            

IRP$L_SEQNUM     00000048            MBA$M_CSR_MT   = 08000000            MBA$V_SR_MDPE  = 00000006            

IRP$L_SVAPTE     0000002C            MBA$M_CSR_OT   = 00200000            MBA$V_SR_MXF   = 00000008            

IRP$L_TT_TERM    00000038            MBA$M_CSR_PD   = 00800000            MBA$V_SR_NED   = 00000012            

IRP$L_UCB        0000001C            MBA$M_CSR_PE   = 80000000            MBA$V_SR_NRCONF= 0000001E            

IRP$L_WIND       00000018            MBA$M_CSR_PU   = 00400000            MBA$V_SR_PGE   = 00000013            

IRP$M_BUFIO    = 00000001            MBA$M_CSR_URD  = 20000000            MBA$V_SR_RDS   = 00000002            

IRP$M_CHAINED  = 00000020            MBA$M_CSR_WS   = 40000000            MBA$V_SR_RDTO  = 00000000            

IRP$M_COMPLX   = 00000008            MBA$M_CSR_XMFLT= 04000000            MBA$V_SR_WCKLWR= 00000009            

IRP$M_DIAGBUF  = 00000080            MBA$M_ERROR    = 000E1FFF            MBA$V_SR_WCKUPR= 0000000A            

IRP$M_FUNC     = 00000002            MBA$M_SR_ATTN  = 00010000            MIN_RECORD     = 0000000E            

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  63

SYMBOL TABLE                                                                                                                     (1)



MMG$GL_SPTBASE   ********   X   04   MT_DS_V_MOL    = 0000000C            MT_ER_V_OPI    = 0000000D            

MSG$_DEVOFFLIN   ********   X   04   MT_DS_V_PES    = 00000005            MT_ER_V_PEF    = 00000007            

MT$CHECK_ACCESS  ********   X   04   MT_DS_V_PIP    = 0000000D            MT_ER_V_RMR    = 00000002            

MT$K_CORDMP11  = 0000000D            MT_DS_V_SDWN   = 00000004            MT_ER_V_UNS    = 0000000E            

MT$K_DEFAULT   = 00000000            MT_DS_V_SLA    = 00000000            MT_ER_V_VPE    = 00000006            

MT$K_NORMAL11  = 0000000C            MT_DS_V_SSC    = 00000006            MT_FC            00000014            

MT$K_NORMAL15  = 0000000E            MT_DS_V_TM     = 00000002            MT_MR            0000000C            

MT$K_NRZI_800  = 00000003            MT_DS_V_WRL    = 0000000B            MT_SN            00000020            

MT$K_PE_1600   = 00000004            MT_DT            00000018            MT_TC            00000024            

MT$M_BOT       = 00010000            MT_DT_M_7CH    = 00001000            MT_TC_M_ACCL   = 00008000            

MT$M_DENSITY   = 00001F00            MT_DT_M_DRQ    = 00000800            MT_TC_M_DEN    = 00000700            

MT$M_EOF       = 00020000            MT_DT_M_MOH    = 00002000            MT_TC_M_EABO   = 00001000            

MT$M_EOT       = 00040000            MT_DT_M_SPR    = 00000400            MT_TC_M_EPAR   = 00000008            

MT$M_FORMAT    = 000000F0            MT_DT_M_TAP    = 00004000            MT_TC_M_FCS    = 00004000            

MT$M_HWL       = 00080000            MT_DT_S_DTN    = 00000009            MT_TC_M_FSEL   = 000000F0            

MT$M_LOST      = 00100000            MT_DT_V_7CH    = 0000000C            MT_TC_M_TCW    = 00002000            

MT$M_PARITY    = 00000008            MT_DT_V_DRQ    = 0000000B            MT_TC_S_DEN    = 00000003            

MT$S_DENSITY   = 00000005            MT_DT_V_DTN    = 00000000            MT_TC_S_EPAR   = 00000001            

MT$S_FORMAT    = 00000004            MT_DT_V_MOH    = 0000000D            MT_TC_S_FSEL   = 00000004            

MT$V_BOT       = 00000010            MT_DT_V_SPR    = 0000000A            MT_TC_S_SSEL   = 00000003            

MT$V_DENSITY   = 00000008            MT_DT_V_TAP    = 0000000E            MT_TC_V_ACCL   = 0000000F            

MT$V_EOF       = 00000011            MT_ER            00000008            MT_TC_V_DEN    = 00000008            

MT$V_EOT       = 00000012            MT_ER_M_COR    = 00008000            MT_TC_V_EABO   = 0000000C            

MT$V_FORMAT    = 00000004            MT_ER_M_CPAR   = 00000008            MT_TC_V_EPAR   = 00000003            

MT$V_HWL       = 00000013            MT_ER_M_CRC    = 00008000            MT_TC_V_FCS    = 0000000E            

MT$V_LOST      = 00000014            MT_ER_M_CS     = 00000400            MT_TC_V_FSEL   = 00000004            

MT$V_PARITY    = 00000003            MT_ER_M_DPAR   = 00000020            MT_TC_V_SSEL   = 00000000            

MT_AS            00000010            MT_ER_M_DTE    = 00001000            MT_TC_V_TCW    = 0000000D            

MT_CC            0000001C            MT_ER_M_FCE    = 00000200            NOP              00000366 R     04   

MT_CS1           00000000            MT_ER_M_FMT    = 00000010            NORXIT           000004B1 R     04   

MT_CS1_M_GO    = 00000001            MT_ER_M_ILF    = 00000001            NRZI           = 00000003            

MT_CS1_S_FCODE = 00000005            MT_ER_M_ILR    = 00000002            PACKACK          00000359 R     04   

MT_CS1_V_FCODE = 00000001            MT_ER_M_INC    = 00000040            PE             = 00000004            

MT_CS1_V_GO    = 00000000            MT_ER_M_ITM    = 00000400            POSIT            000009E1 R     04   

MT_DS            00000004            MT_ER_M_LRC    = 00000080            PR$_IPL          ********   X   04   

MT_DS_M_ATA    = 00008000            MT_ER_M_NEF    = 00000800            READDATA         000004CC R     04   

MT_DS_M_BOT    = 00000002            MT_ER_M_NSG    = 00000100            READDATAR        000005D5 R     04   

MT_DS_M_DPR    = 00000100            MT_ER_M_OPI    = 00002000            READPRESET       000003E4 R     04   

MT_DS_M_DRY    = 00000080            MT_ER_M_PEF    = 00000080            RECAL            00000A1C R     04   

MT_DS_M_EOT    = 00000400            MT_ER_M_RMR    = 00000004            RESETXFR         00000BF3 R     04   

MT_DS_M_ERR    = 00004000            MT_ER_M_UNS    = 00004000            RESTART          00000939 R     04   

MT_DS_M_IDB    = 00000008            MT_ER_M_VPE    = 00000040            RETREG           00000B1D R     04   

MT_DS_M_MOL    = 00001000            MT_ER_V_COR    = 0000000F            RETRY            000007F0 R     04   

MT_DS_M_PES    = 00000020            MT_ER_V_CPAR   = 00000003            REWIND           000003EC R     04   

MT_DS_M_PIP    = 00002000            MT_ER_V_CRC    = 0000000F            SENSECHAR        00000366 R     04   

MT_DS_M_SDWN   = 00000010            MT_ER_V_CS     = 0000000A            SETCHAR          0000036D R     04   

MT_DS_M_SLA    = 00000001            MT_ER_V_DPAR   = 00000005            SETEOF           000004B6 R     04   

MT_DS_M_SSC    = 00000040            MT_ER_V_DTE    = 0000000C            SPCFILFOR        00000405 R     04   

MT_DS_M_TM     = 00000004            MT_ER_V_FCE    = 00000009            SPCFILREV        0000042C R     04   

MT_DS_M_WRL    = 00000800            MT_ER_V_FMT    = 00000004            SPCRECFOR        00000457 R     04   

MT_DS_V_ATA    = 0000000F            MT_ER_V_ILF    = 00000000            SPCRECREV        0000047B R     04   

MT_DS_V_BOT    = 00000001            MT_ER_V_ILR    = 00000001            SS$_ABORT        ********   X   04   

MT_DS_V_DPR    = 00000008            MT_ER_V_INC    = 00000006            SS$_CTRLERR      ********   X   04   

MT_DS_V_DRY    = 00000007            MT_ER_V_ITM    = 0000000A            SS$_DATACHECK    ********   X   04   

MT_DS_V_EOT    = 0000000A            MT_ER_V_LRC    = 00000007            SS$_DATAOVERUN   ********   X   04   

MT_DS_V_ERR    = 0000000E            MT_ER_V_NEF    = 0000000B            SS$_DRVERR       ********   X   04   

MT_DS_V_IDB    = 00000003            MT_ER_V_NSG    = 00000008            SS$_ENDOFFILE    ********   X   04   

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  64

SYMBOL TABLE                                                                                                                     (1)



SS$_ENDOFTAPE    ********   X   04   UCB$K_LENGTH     00000074            UCB$M_NT_BFROVF= 00000004            

SS$_FORMAT       ********   X   04   UCB$L_AMB        00000054            UCB$M_NT_BREAK = 00000020            

SS$_MEDOFL       ********   X   04   UCB$L_ASTQBL     00000010            UCB$M_NT_NAME  = 00000010            

SS$_NONEXDRV     ********   X   04   UCB$L_ASTQFL     0000000C            UCB$M_ONLINE   = 00000010            

SS$_NORMAL       ********   X   04   UCB$L_CPID       0000005C            UCB$M_POWER    = 00000020            

SS$_OPINCOMPL    ********   X   04   UCB$L_CRB        00000020            UCB$M_PRMMBX   = 00000001            

SS$_PARITY       ********   X   04   UCB$L_DDB        00000024            UCB$M_TIM      = 00000001            

SS$_TIMEOUT      ********   X   04   UCB$L_DEVCHAR    00000034            UCB$M_TIMOUT   = 00000040            

SS$_UNSAFE       ********   X   04   UCB$L_DEVDEPEND  0000003C            UCB$M_TT_NOTIF = 00000004            

SS$_VOLINV       ********   X   04   UCB$L_DPC        00000080            UCB$M_TT_TIMO  = 00000002            

SS$_WRITLCK      ********   X   04   UCB$L_DUETIM     0000005C            UCB$M_UNLOAD   = 00001000            

STSXIT           00000926 R     04   UCB$L_DX_BFPNT   0000009C            UCB$M_VALID    = 00000800            

SYS$GL_OPRMBX    ********   X   04   UCB$L_DX_BUF     00000098            UCB$S_LNKPRI   = 00000002            

TESTR            000007A2 R     04   UCB$L_DX_RXDB    000000A0            UCB$S_LTYPE    = 00000002            

THRESHOLD      = 00000008            UCB$L_EMB        00000078            UCB$T_PARTNER    0000000C            

TIMEOUT          00000BEE R     04   UCB$L_FIRST      00000014            UCB$V_BACKP    = 00000005            

TIME_OUT         00000054 R     04   UCB$L_FPC        0000000C            UCB$V_BSY      = 00000008            

TM$DDT           00000000 RG    04   UCB$L_FQBL       00000004            UCB$V_CANCEL   = 00000003            

TM$INT           00000EB2 RG    04   UCB$L_FQFL       00000000            UCB$V_DEADMO   = 0000000A            

TM_CANCELIO      00000160 R     04   UCB$L_FR3        00000010            UCB$V_DELMBX   = 00000001            

TM_DTDESC        00000028 R     04   UCB$L_FR4        00000014            UCB$V_DIAGBUF  = 00000001            

TM_DTDESCLEN   = 00000003            UCB$L_IOQBL      00000044            UCB$V_DX_WRITE = 00000003            

TM_DTYPE         00000D38 R     04   UCB$L_IOQFL      00000040            UCB$V_ECC      = 00000000            

TM_END           00000F44 R     04   UCB$L_IRP        0000004C            UCB$V_ERLOGIP  = 00000002            

TM_FUNCTABLE     000000D8 R     04   UCB$L_LINK       0000002C            UCB$V_INT      = 00000001            

TM_REGDUMP       00000D5F R     04   UCB$L_LOGADR     00000064            UCB$V_INTTYPE  = 00000007            

TM_SAVDRVSTS     00000E5F R     04   UCB$L_MAXBLOCK   00000084            UCB$V_JOB      = 00000000            

TM_SETINTSPC     00000E80 R     04   UCB$L_MEDIA      0000008C            UCB$V_LNKPRI   = 00000006            

TM_STARTIO       000001A0 R     04   UCB$L_MT_RECORD  00000094  G         UCB$V_LTYPE    = 00000000            

TM_TXXX_INIT     00000DB6 R     04   UCB$L_MT_SR      00000084  G         UCB$V_MOUNTING = 00000009            

TM_UNSOLNT       00000E2D R     04   UCB$L_NT_DATSSB  00000074            UCB$V_MSGACK   = 00000004            

UCB$B_AMOD       00000053            UCB$L_NT_INTSSB  00000078            UCB$V_MSGFLO   = 00000003            

UCB$B_CEX        00000077            UCB$L_OPCNT      00000060            UCB$V_MT_PRVMOL= 00000001  G         

UCB$B_CM1        0000004A            UCB$L_OWNUIC     0000001C            UCB$V_MT_REWIND= 00000000  G         

UCB$B_CM2        0000004B            UCB$L_PID        00000028            UCB$V_NOCNVRT  = 00000002            

UCB$B_DEVCLASS   00000038            UCB$L_RQBL       00000004            UCB$V_NT_BFROVF= 00000002            

UCB$B_DEVTYPE    00000039            UCB$L_RQFL       00000000            UCB$V_NT_BREAK = 00000005            

UCB$B_DIPL       00000052            UCB$L_SVAPTE     00000068            UCB$V_NT_NAME  = 00000004            

UCB$B_DX_SCTCNT  000000A6            UCB$L_SVPN       00000064            UCB$V_ONLINE   = 00000004            

UCB$B_ERTCNT     00000070            UCB$L_TTCHAR     0000003C            UCB$V_POWER    = 00000005            

UCB$B_ERTMAX     00000071            UCB$L_VCB        00000030            UCB$V_PRMMBX   = 00000000            

UCB$B_ESCAPE     0000004B            UCB$M_BACKP    = 00000020            UCB$V_SEGFLO   = 00000002            

UCB$B_FEX        00000076            UCB$M_BSY      = 00000100            UCB$V_TIM      = 00000000            

UCB$B_FIPL       0000000B            UCB$M_CANCEL   = 00000008            UCB$V_TIMOUT   = 00000006            

UCB$B_LOCSRV     0000003C            UCB$M_DEADMO   = 00000400            UCB$V_TT_NOTIF = 00000002            

UCB$B_OFFNDX     00000094            UCB$M_DELMBX   = 00000002            UCB$V_TT_TIMO  = 00000001            

UCB$B_OFFRTC     00000095            UCB$M_DIAGBUF  = 00000002            UCB$V_UNLOAD   = 0000000C            

UCB$B_REMSRV     0000003D            UCB$M_DX_WRITE = 00000008            UCB$V_VALID    = 0000000B            

UCB$B_SECTORS    0000003C            UCB$M_ECC      = 00000001            UCB$W_BCNT       0000006E            

UCB$B_SLAVE      00000074            UCB$M_ERLOGIP  = 00000004            UCB$W_BCR        00000096            

UCB$B_SPR        00000075            UCB$M_INT      = 00000002            UCB$W_BOFF       0000006C            

UCB$B_STATE      00000052            UCB$M_INTTYPE  = 00000080            UCB$W_BUFQUO     00000018            

UCB$B_TRACKS     0000003D            UCB$M_JOB      = 00000001            UCB$W_BYTESTOGO  0000003E            

UCB$B_TYPE       0000000A            UCB$M_MOUNTING = 00000200            UCB$W_CHARGE     0000004A            

UCB$B_VERTSZ     0000003F            UCB$M_MT_PRVMOL= 00000002  G         UCB$W_CYLINDERS  0000003E            

UCB$C_LENGTH     00000074            UCB$M_MT_REWIND= 00000001  G         UCB$W_DA         0000008C            

UCB$C_LOGLNK   = 00000001            UCB$M_NOCNVRT  = 00000004            UCB$W_DC         0000008E            

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  65

SYMBOL TABLE                                                                                                                     (1)



UCB$W_DEVBUFSIZ  0000003A            WCB$L_FCB        00000018            

UCB$W_DEVSTS     0000005A            WCB$L_LBN        00000002            

UCB$W_DIRSEQ     00000088            WCB$L_ORGUCB     00000010            

UCB$W_DSTADDR    00000018            WCB$L_P1_LBN     00000026            

UCB$W_DX_BCR     000000A4            WCB$L_P2_LBN     0000002C            

UCB$W_EC1        00000090            WCB$L_PID        0000000C            

UCB$W_EC2        00000092            WCB$L_PREVLBN    FFFFFFFC            

UCB$W_ERRCNT     00000072            WCB$L_RVT        0000001C            

UCB$W_FUNC       0000007E            WCB$L_STVBN      00000020            

UCB$W_MB_SEED    FFFFFFFC            WCB$L_WLBL       00000004            

UCB$W_MSGCNT     00000016            WCB$L_WLFL       00000000            

UCB$W_MSGMAX     00000014            WCB$M_NOTFCP   = 00000004            

UCB$W_MT_CS1     00000090  G         WCB$M_READ     = 00000001            

UCB$W_MT_DS      00000088  G         WCB$M_SHRWCB   = 00000008            

UCB$W_MT_ER      0000008A  G         WCB$M_WRITE    = 00000002            

UCB$W_MT_FC      0000008C  G         WCB$V_DLOCK    = 00000001            

UCB$W_MT_FORCNT  00000098  G         WCB$V_NOREAD   = 0000000A            

UCB$W_MT_SPACNT  0000008E  G         WCB$V_NOTFCP   = 00000002            

UCB$W_MT_TC      0000009A  G         WCB$V_NOTRUNC  = 0000000B            

UCB$W_MT_TC_SAV  00000092  G         WCB$V_NOWRITE  = 00000000            

UCB$W_NT_CHAN    0000007C            WCB$V_READ     = 00000000            

UCB$W_OFFSET     0000008A            WCB$V_READCK   = 00000009            

UCB$W_REFC       00000050            WCB$V_SEQONLY  = 00000006            

UCB$W_SIZE       00000008            WCB$V_SHRWCB   = 00000003            

UCB$W_SRCADDR    0000001A            WCB$V_SPOOL    = 00000004            

UCB$W_STS        00000058            WCB$V_WRITE    = 00000001            

UCB$W_UNIT       00000048            WCB$V_WRITEAC  = 00000008            

UCB$W_VPROT      0000001A            WCB$V_WRITECK  = 00000005            

UNLOAD           000003EC R     04   WCB$W_ACON       00000014            

VA$S_VPN         ********   X   04   WCB$W_COUNT      00000000            

VA$V_VPN         ********   X   04   WCB$W_NMAP       00000016            

VEC$B_DATAPATH   00000013            WCB$W_P1_COUNT   00000024            

VEC$B_NUMREG     00000012            WCB$W_P2_COUNT   0000002A            

VEC$C_LENGTH     00000024            WCB$W_PREVCOUNT  FFFFFFFA            

VEC$K_LENGTH     00000024            WCB$W_REFCNT     0000000E            

VEC$L_ADP        00000014            WCB$W_SIZE       00000008            

VEC$L_IDB        00000008            WRITECHECK       000004C6 R     04   

VEC$L_INITIAL    0000000C            WRITECHECKR      000005CF R     04   

VEC$L_START      0000001C            WRITEDATA        000006E9 R     04   

VEC$L_UNITDISC   00000020            WRITEMARK        000002E1 R     04   

VEC$L_UNITINIT   00000018            XFER             00000A84 R     04   

VEC$M_MAPLOCK  = 00008000            XTAB             000000AC R     04   

VEC$M_PATHLOCK = 00000080            

VEC$Q_DISPATCH   00000000            

VEC$S_DATAPATH = 00000007            

VEC$S_MAPREG   = 0000000F            

VEC$V_DATAPATH = 00000000            

VEC$V_MAPLOCK  = 0000000F            

VEC$V_MAPREG   = 00000000            

VEC$V_PATHLOCK = 00000007            

VEC$W_MAPREG     00000010            

WCB$B_ACCESS     0000000B            

WCB$B_TYPE       0000000A            

WCB$C_LENGTH     00000024            

WCB$C_MAP        00000024            

WCB$K_LENGTH     00000024            

WCB$K_MAP        00000024            

TMDRIVER        - TM03-TE16/TU77 MAGTAPE DRIVER                  21-AUG-1978 20:58:26   VAX-11 MACRO X0.3-11               Page  66

PROGRAM SECTION SYNOPSIS                                                                                                         (1)







PROGRAM SECTION SYNOPSIS



.  ABS  .        00000000      00     NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT BYTE  

. BLANK .        00000000      01     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$ABS$            FFFFFFFE      02     NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT BYTE  

$$$105_PROLOGUE  00000060      03     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT BYTE  

$$$115_DRIVER    00000F44      04     NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT LONG  





THERE WERE NO ERRORS OR WARNINGS.

522. BYTES LEFT IN FREE MEMORY POOL.

52. BYTES OF RECLAIMED MEMORY.

OBJ$:TMDRIVER,LIS$:TMDRIVER/-SP=EXECML$/ML,SRC$:TMDRIVER

29 MLB DIR RDS - 1227 GETS TO DEFINE 45 MACROS. 138 INTER. FILE WRITES. 

