CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page   0
Table of contents

    (1)        2        Block-Set Associative Mapping Disk Cache Driver
    (2)       73        Conditional assembly definitions
    (3)       98        External and Local Symbol Definitions
    (3)      166        Standard Tables
    (3)      265        Local Data Structures
    (3)      302        Controller Initialization Routine
    (3)      353        Unit Initialization Routine
    (3)      464        Driver Unload Routine
    (3)      516        READxBLK FDT Routine
    (3)      595        SENSEMODE/SENSECHAR FDT Routine
    (3)      672        SETMODE/SETCHAR FDT Routine
    (3)      873        Startup Disk Data Caching
    (3)      978        Shutdown Disk Data Caching
    (3)     1031        Extend Cache Memory
    (3)     1175        Delete Cache Tag and Data Structures
    (3)     1247        Purge Cache Contents
    (3)     1291        Cache Driver Start I/O Entry Point
    (3)     1348        Cancel I/O Entry Point
    (3)     1382        Timeout Entry Point
    (3)     1416        READxBLK Completion Handler
    (3)     1456        Record Direct I/O Operations in User Buffer
    (3)     1549        Cache Driver Alternate Start I/O Entry Point
    (3)     1950        Cache Driver I/O Post Processing
    (3)     2135        Invalidate Cache Data
    (3)     2182        Determine if Disk Blocks are Cached
    (3)     2239        Locate Cache Tag Block by LBN
    (3)     2279        Load Data into Cache Buffers
    (3)     2408        Read Data from Cache
    (3)     2510        Map Cache and I/O (User) Buffers
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page   1
082092                                                                   26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (1)

                                     0000     1 	.title	CDDRIVER
                                     0000     2 	.sbttl	Block-Set Associative Mapping Disk Cache Driver
                                     0000     3 	.ident	/082092/
                                     0000     4 ;
                                     0000     5 ;+
                                     0000     6 ;*****
                                     0000     7 ;
                                     0000     8 ;	CDDRIVER - Caches data read from a disk device to improve I/O
                                     0000     9 ;	 performance, albeit at the expense of CPU cylces required to
                                     0000    10 ;	 move data.  This particular version of CDDRIVER implements a
                                     0000    11 ;	 block-set associative cache; "block" size is fixed at one disk
                                     0000    12 ;	 block, blocks/set and number of sets are established
                                     0000    13 ;	 by the user.  Comments preceeding each major subsection describe
                                     0000    14 ;	 the driver's operation in more detail.
                                     0000    15 ;
                                     0000    16 ;	 Basically, CDDRIVER hooks the start I/O entry point of the device
                                     0000    17 ;	 driver controlling the disk to be cached so that all I/O requests
                                     0000    18 ;	 are first evaluated by CDDRIVER to determine if it is a read
                                     0000    19 ;	 operation that can be satisfied from the cache.  If the read
                                     0000    20 ;	 cannot be satisfied from the cache, the request is returned to
                                     0000    21 ;	 the disk driver.  On I/O completion, CDDRIVER is recalled by the
                                     0000    22 ;	 VMS I/O post-processing routine and the data read from disk is
                                     0000    23 ;	 placed in the cache.  Write requests are always passed on to the
                                     0000    24 ;	 disk driver, and depending on the initialization options selected
                                     0000    25 ;	 (see IO$_SETMODE) the data written to disk may be updated in
                                     0000    26 ;	 cache as well.
                                     0000    27 ;
                                     0000    28 ;-
                                     0000    29 ;*****
                                     0000    30 ;
                                     0000    31 ;	Paul Sorenson
                                     0000    32 ;	AEP/Engineering Computer Support Center
                                     0000    33 ;	Columbus, OH  43215
                                     0000    34 ;
                                     0000    35 ;*****
                                     0000    36 ;	Modification History
                                     0000    37 ;
                                     0000    38 ;	JLPxxx  Jonathan L Pinkley
                                     0000    39 ;		Westinghouse
                                     0000    40 ;		18901 Euclid Avenue
                                     0000    41 ;		Cleveland, OH 44117
                                     0000    42 ;		(216)486-8300 x1335
                                     0000    43 ;
                                     0000    44 ;	JLP001	20-Aug-1992	Handle requests from the MSCP server
                                     0000    45 ;		
                                     0000    46 ;	  Note Well:  Only use this driver to cache disks that are local
                                     0000    47 ;	  to your system.  If the host that is serving the device is not
                                     0000    48 ;	  the only path to the device, do not use this driver, unless
                                     0000    49 ;	  the device is a read only device like a CD-ROM drive.
                                     0000    50 ;
                                     0000    51 ;	  There is NO provision for cache coherency.  It is not safe to
                                     0000    52 ;	  to have even one writer, if there are other readers with local
                                     0000    53 ;	  caching.  Think about it.  If system A and system B have both
                                     0000    54 ;	  done a cache load on LBN 10, and then system A writes to LBN 10,
                                     0000    55 ;	  LBN 10 will be changed on the disk, but when system B reads
                                     0000    56 ;	  LBN 10, it finds that it is in its cache and just returns the
                                     0000    57 ;	  value it had stored locally.
                                     0000    58 ;
                                     0000    59 ;	  It is safe however to server a read/write drive to a Cluster,
                                     0000    60 ;	  assuming there is only a single path from the caching host 
                                     0000    61 ;	  to the disk.  This is true for VAXStation SCSI disks.  The
                                     0000    62 ;	  cache will will be served to the cluster.  If you read logical 
                                     0000    63 ;	  blocks 1-100 into the cache, and then read them again from 
                                     0000    64 ;	  any node in the cluster, before they are flushed, the read 
                                     0000    65 ;	  will be handled from the cache.
                                     0000    66 ;
                                     0000    67 ;	  This is phase 1 of some modifications I hope to make to prevent
                                     0000    68 ;	  disk thrashing on a DRM-600 6 disk CD-ROM minichanger.
                                     0000    69 ;
                                     0000    70 ;--
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page   2
082092                          Conditional assembly definitions         26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (2)

                                     0000    73 	.SBTTL	Conditional assembly definitions
                                     0000    74 
                                     0000    75 ;XDELTA = 1		; define "XDELTA" symbol to enable XDELTA breakpoints
                                     0000    76 
                           00000001  0000    77 CD_RECORD_ALL = 1	; define if you want all I/O operations to the
                                     0000    78 			; device to be recored, whether they are acted
                                     0000    79 			; on by CDDRIVER or just passed back to the
                                     0000    80 			; client driver.  Useful mostly for debugging
                                     0000    81 			; purposes.
                                     0000    82 
                                     0000    83 ;DBG_HLT = 1		; define this if you want some additional sanity
                                     0000    84 			; checks to be performed.  These will not prevent
                                     0000    85 			; crashes, but will cause them to happen sooner
                                     0000    86 			; than they would otherwise.  Also, more information
                                     0000    87 			; about the driver state will be available if we
                                     0000    88 			; crash sooner than later.  This shouldn't need to
                                     0000    89 			; be defined after the driver is debugged.
                                     0000    90 
                                     0000    91 ;DBG_CNT = 1		; define this if you want the drive to keep some
                                     0000    92 			; additional counters.  Again, mostly for debugging.
                                     0000    93 ;
                                     0000    94 
                                     0000    95 
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page   3
082092                          External and Local Symbol Definitions    26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0000    98 	.SBTTL	External and Local Symbol Definitions
                                     0000    99 
                                     0000   100 ;
                                     0000   101 ; External symbols
                                     0000   102 ;
                                     0000   103 
                                     0000   104 	$ACBDEF				; AST control block
                                     0000   105 	$CANDEF				; Cancel reason codes
                                     0000   106 	$CCBDEF				; Channel control block
                                     0000   107 	$CPUDEF				; per-CPU data base
                                     0000   108 	$CRBDEF				; Channel request block
                                     0000   109 	$DCDEF				; Device classes and types
                                     0000   110 	$DDBDEF				; Device data block
                                     0000   111 	$DDTDEF				; Driver dispatch table
                                     0000   112 	$DEVDEF				; Device characteristics
                                     0000   113 	$DPTDEF				; Driver prologue table
                                     0000   114 	$DYNDEF				; Dynamic data structures
                                     0000   115 	$FCBDEF				; File control block
                                     0000   116 	$FKBDEF				; Fork block
                                     0000   117 	$IDBDEF				; Interrupt data block
                                     0000   118 	$IODEF				; I/O function codes
                                     0000   119 	$IPLDEF				; Hardware IPL definitions
                                     0000   120 	$IRPDEF				; I/O request packet
                                     0000   121 	$JIBDEF				; Job information block
                                     0000   122 	$PFNDEF				; PFN data base symbols
                                     0000   123 	$PCBDEF				; Process control block
                                     0000   124 	$PRDEF				; Processor registers
                                     0000   125 	$PRTDEF				; Page protection
                                     0000   126 	$PSLDEF				; Processor status longword
                                     0000   127 	$PTEDEF				; Page table entry
                                     0000   128 	$SPLCODDEF			; Fork spin lock indices
                                     0000   129 	$SSDEF				; System status codes
                                     0000   130 	$TQEDEF				; Timer queue element
                                     0000   131 	$UCBDEF				; Unit control block
                                     0000   132 	$VADEF				; Virtual address fields
                                     0000   133 	$VECDEF				; Interrupt vector block
                                     0000   134 	$WCBDEF				; Window control block
                                     0000   135 
                                     0000   136 
                                     0000   137 	CD$IODEF		; cache driver specific definitions
                                     0000   138 	CD$PIBDEF
                                     0000   139 	CD$TAGDEF
                                     0000   140 	CD$UCBDEF
                                     0000   141 
                                     0000   142 ;
                                     0000   143 ; Local symbols
                                     0000   144 ;
                                     0000   145 
                                     0000   146 ;
                                     0000   147 ; Argument list (AP) offsets for device-dependent QIO parameters
                                     0000   148 ;
                                     0000   149 
                           00000000  0000   150 P1	= 0				; First QIO parameter
                           00000004  0000   151 P2	= 4				; Second QIO parameter
                           00000008  0000   152 P3	= 8				; Third QIO parameter
                           0000000C  0000   153 P4	= 12				; Fourth QIO parameter
                           00000010  0000   154 P5	= 16				; Fifth QIO parameter
                           00000014  0000   155 P6	= 20				; Sixth QIO parameter
                                     0000   156 
                                     0000   157 ;
                                     0000   158 ; Other constants
                                     0000   159 ;
                           00000200  0000   160 CD_BLKSIZ	= 512			; Default buffer size
                           0000001C  0000   161 CD_MAXRECL	= 28			; largest byte count record moved to
                                     0000   162 					;  IO$_READxBLK buffer
                                     0000   163 ;
                                     0000   164 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page   4
082092                          Standard Tables                          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0000   166 	.sbttl	Standard Tables
                                     0000   167 
                                     0000   168 ;
                                     0000   169 ; Driver prologue table...contents established along the lines of a
                                     0000   170 ;  standard VMS disk driver though many of the definitions are unused
                                     0000   171 ;  or may even be altered at runtime depending on the disk being cached.
                                     0000   172 ;
                                     0000   173 
                                     0000   174 	DPTAB	-				; DPT-creation macro
                                     0000   175 		END=CD_END,-			; End of driver label
                                     0000   176 		ADAPTER=NULL,-			; Adapter type
                                     0000   177 		FLAGS=DPT$M_SVP,-		; System page table entry reqd
                                     0000   178 		UCBSIZE=<UCB$K_CD_LENGTH>,-	; Length of UCB
                                     0000   179 		NAME=CDDRIVER,-			; Driver name
                                     0000   180 		UNLOAD=CD_UNLOAD,-		; Routine to unload driver
                                     0000   181 		MAXUNITS=8			; Max # units
                                     0082   182 
                                     0082   183 	DPT_STORE INIT				; Start of load
                                     0082   184 						; initialization table
                                     0082   185 	DPT_STORE UCB,UCB$B_FLCK,B,SPL$C_IOLOCK8 ; Device fork IPL
                                     0086   186 	DPT_STORE UCB,UCB$B_DIPL,B,IPL$_SYNCH	; Device interrupt IPL (dummy)
                                     008A   187 	DPT_STORE UCB,UCB$L_DEVCHAR,L,-		; Device characteristics
                                     008A   188 		<DEV$M_AVL-			;   available
                                     008A   189 		!DEV$M_SHR-			;   shareable
                                     008A   190 		!DEV$M_IDV-			;   input device
                                     008A   191 		!DEV$M_ODV>			;   output device
                                     0091   192 	DPT_STORE UCB,UCB$L_DEVCHAR2,L,-	; Device characteristics
                                     0091   193 		<DEV$M_NNM>			;   prefix name with "node$"
                                     0098   194 	DPT_STORE UCB,UCB$B_DEVCLASS,B,DC$_MISC	; Device class (??)
                                     009C   195 	DPT_STORE UCB,UCB$W_DEVBUFSIZ,W,-	; Default buffer size
                                     009C   196 		CD_BLKSIZ
                                     00A1   197 
                                     00A1   198 	DPT_STORE REINIT			; Start of reload
                                     00A1   199 						; initialization table
                                     00A1   200 	DPT_STORE DDB,DDB$L_DDT,D,CD$DDT	; Address of DDT
                                     00A6   201 	DPT_STORE CRB,-				; Address of controller
                                     00A6   202 		CRB$L_INTD+VEC$L_INITIAL,-	; initialization routine
                                     00A6   203 		D,CD_CTRL_INIT
                                     00AB   204 	DPT_STORE CRB,-				; Address of device
                                     00AB   205 		CRB$L_INTD+VEC$L_UNITINIT,-	; unit initialization
                                     00AB   206 		D,CD_UNIT_INIT			; routine
                                     00B0   207 
                                     00B0   208 	DPT_STORE END				; End of initialization
                                     0000   209 						; tables
                                     0000   210 
                                     0000   211 ;
                                     0000   212 ; Driver dispatch table
                                     0000   213 ;
                                     0000   214 
                                     0000   215 	DDTAB	-				; DDT-creation macro
                                     0000   216 		DEVNAM=CD,-			; Name of device
                                     0000   217 		START=CD_STARTIO,-		; Start I/O routine
                                     0000   218 		ALTSTART=CD_ALTSTARTIO,-	; Alternate entry point
                                     0000   219 		CANCEL=CD_CANCELIO,-		; Cancel I/O routine
                                     0000   220 		FUNCTB=CD_FUNCTABLE		; FDT address
                                     0040   221 ;
                                     0040   222 ; Function decision table...
                                     0040   223 ;
                                     0040   224 
                                     0040   225 CD_FUNCTABLE:		
                                     0040   226 
                                     0040   227 	FUNCTAB	,-			; Valid I/O functions
                                     0040   228 		<SETMODE,-		;  set mode
                                     0040   229 		 SETCHAR,-		;  set characteristics
                                     0040   230 		 SENSEMODE,-		;  sense mode
                                     0040   231 		 SENSECHAR,-		;  sense characteristics
                                     0040   232 		 READVBLK,-		;  read virtual block
                                     0040   233 		 READPBLK,-		;  read physical block
                                     0040   234 		 READLBLK>		;  read logical block
                                     0048   235 
                                     0048   236 	FUNCTAB	,-			; Buffered I/O functions
                                     0048   237 		<SETMODE,-		;  set mode
                                     0048   238 		 SETCHAR,-		;  set characteristics
                                     0048   239 		 SENSEMODE,-		;  sense mode
                                     0048   240 		 SENSECHAR,-		;  sense characteristics
                                     0048   241 		 READVBLK,-		;  read virtual block
                                     0048   242 		 READPBLK,-		;  read physical block
                                     0048   243 		 READLBLK>		;  read logical block
                                     0050   244 
                                     0050   245 	FUNCTAB CD_SETMODE,-		; FDT routine for CDDRIVER specific
                                     0050   246 		<SETMODE,-		;  control functions
                                     0050   247 		 SETCHAR>
                                     005C   248 
                                     005C   249 	FUNCTAB	CD_SENSEMODE,-		; FDT routine for CDDRIVER specific
                                     005C   250 		<SENSEMODE,-		;  control functions
                                     005C   251 		 SENSECHAR>
                                     0068   252 
                                     0068   253 	FUNCTAB	+EXE$SENSEMODE,-	; standard VMS FDT routine for
                                     0068   254 		<SENSEMODE,-		;  sense mode
                                     0068   255 		 SENSECHAR>		;  sense characteristics
                                     0074   256 
                                     0074   257 	FUNCTAB	CD_READBLK,-		; FDT routine for CDDRIVER specific
                                     0074   258 		<READVBLK,-		;  read virtual block
                                     0074   259 		 READPBLK,-		;  read physical block
                                     0074   260 		 READLBLK>		;  read logical block
                                     0080   261 
                                     0080   262 ;
                                     0080   263 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page   5
082092                          Local Data Structures                    26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0080   265 	.sbttl	Local Data Structures
                                     0080   266 ;
                                     0080   267 ; *** The following local data structures are defined by the CD_UNIT_INIT
                                     0080   268 ;	and/or CD_CTRL_INIT routine to allow the driver to restore its own
                                     0080   269 ;	context when called by the driver of the disk being cached.
                                     0080   270 ;
                                     0080   271 UCB:				; filled in with address of first UCB
                           00000084  0080   272 	.BLKL	1
                                     0084   273 PENDQFL:			; queue list head for pending I/O requests
                           00000088  0084   274 	.BLKL	1
                                     0088   275 PENDQBL:
                           0000008C  0088   276 	.BLKL	1
                                     008C   277 FREEQFL:			; queue list head for free PIBs
                           00000090  008C   278 	.BLKL	1
                                     0090   279 FREEQBL:
                           00000094  0090   280 	.BLKL	1
                                     0094   281 
                                     0094   282 ;
                                     0094   283 ; The following are debug counter locations.
                                     0094   284 ;
                                     0094   285 
                                     0094   286 .if df, DBG_CNT
                                     0094   287 
                                     0094   288 SIO_OPS:			; count of times through the CDA0 altstartio
                                     0094   289 	.BLKL	1
                                     0094   290 SIO_SRV:			; count of server i/os
                                     0094   291 	.BLKL	1
                                     0094   292 SIO_IGN:			; count of times cd was skipped
                                     0094   293 	.BLKL	1
                                     0094   294 SIO_R:				; count of times cd read was entered
                                     0094   295 	.BLKL	1
                                     0094   296 SIO_W:				; count of times cd write was entered
                                     0094   297 	.BLKL	1
                                     0094   298 .endc
                                     0094   299 
                                     0094   300 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page   6
082092                          Controller Initialization Routine        26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0094   302 	.sbttl	Controller Initialization Routine
                                     0094   303 ;
                                     0094   304 ;+
                                     0094   305 ;
                                     0094   306 ; *** CD_CTRL_INIT -- Readies controller for I/O operations
                                     0094   307 ;
                                     0094   308 ; Functional description:
                                     0094   309 ;
                                     0094   310 ;	The operating system calls this routine in 3 places:
                                     0094   311 ;
                                     0094   312 ;		at system startup
                                     0094   313 ;		during driver loading and reloading
                                     0094   314 ;		during recovery from a power failure
                                     0094   315 ;
                                     0094   316 ;	Since there is no physical controller for the cache driver,
                                     0094   317 ;	this routine is simply used to setup the contents of the
                                     0094   318 ;	local data structures (UCB, PENDQxL, and FREEQxL) required
                                     0094   319 ;	by the driver.  The UCB field is used to save the address
                                     0094   320 ;	of the first UCB attached to the "controller" and is
                                     0094   321 ;	referenced whenever the cache driver is called by the disk
                                     0094   322 ;	driver "start I/O" routine.  The PENDQxL and FREEQxL fields
                                     0094   323 ;	define two queue list heads for maintaing the "pending I/O
                                     0094   324 ;	identificiation block" (PIB) structures required to save/restore
                                     0094   325 ;	information regarding each active I/O request.
                                     0094   326 ;
                                     0094   327 ; ***
                                     0094   328 ;
                                     0094   329 ;	On Entry:
                                     0094   330 ;
                                     0094   331 ;		R4  = address of the CSR (controller status register)
                                     0094   332 ;		R5  = address of the IDB (interrupt data block)
                                     0094   333 ;		R6  = address of the DDB (device data block)
                                     0094   334 ;		R8  = address of the CRB (channel request block)
                                     0094   335 ;		IPL = IPL$_POWER
                                     0094   336 ;
                                     0094   337 ;	returns:
                                     0094   338 ;
                                     0094   339 ;		(this routine must preserve all registers except R0-R3)
                                     0094   340 ;
                                     0094   341 ;-
                                     0094   342 
                                     0094   343 CD_CTRL_INIT:			; Initialize controller
                                     0094   344 .IIF DEFINED XDELTA,	JSB	G^INI$BRK
                 E7 AF   04 A6   D0  0094   345 	MOVL	DDB$L_UCB(R6),UCB	; save address of 1st UCB locally
                 E6 AF   E8 AF   DE  0099   346 	MOVAL	PENDQFL,PENDQFL		; zero pending queue list head
                 E5 AF   E3 AF   DE  009E   347 	MOVAL	PENDQFL,PENDQBL
                 E4 AF   E6 AF   DE  00A3   348 	MOVAL	FREEQFL,FREEQFL		; zero free queue list head
                 E3 AF   E1 AF   DE  00A8   349 	MOVAL	FREEQFL,FREEQBL
                                 05  00AD   350 	RSB				; Return
                                     00AE   351 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page   7
082092                          Unit Initialization Routine              26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     00AE   353 	.sbttl	Unit Initialization Routine
                                     00AE   354 ;
                                     00AE   355 ;+
                                     00AE   356 ;
                                     00AE   357 ; *** CD_UNIT_INIT -- Readies unit for I/O operations
                                     00AE   358 ;
                                     00AE   359 ; Functional description:
                                     00AE   360 ;
                                     00AE   361 ;	The operating system calls this routine after calling the
                                     00AE   362 ;	controller initialization routine:
                                     00AE   363 ;
                                     00AE   364 ;		at system startup
                                     00AE   365 ;		during driver loading (NOT RELOADING !!)
                                     00AE   366 ;		during recovery from a power failure
                                     00AE   367 ;
                                     00AE   368 ;	The contents of special UCB fields that must be initialized are 
                                     00AE   369 ;	established by this routine.  In particular:
                                     00AE   370 ;
                                     00AE   371 ;		Set device status flags
                                     00AE   372 ;		Reserve two system page table entries for use in mapping
                                     00AE   373 ;		 users' data buffers (in addition to the SPTE reserved by
                                     00AE   374 ;		 DPT$V_SVP for mapping the cache)
                                     00AE   375 ;		Save the address of the first UCB associated with the device
                                     00AE   376 ;		 locally to allow a "context switch" from that of the
                                     00AE   377 ;		 cached disk's driver at CD_STARTIO
                                     00AE   378 ;		Initialize constant fields within TQE reserved for
                                     00AE   379 ;		 IO$_READxBLK!IO$M_TIMED functions
                                     00AE   380 ;		Initialize constant fields within fork block reserved for
                                     00AE   381 ;		 synchronizing access to the cache at IPL$_QUEUEAST
                                     00AE   382 ;
                                     00AE   383 ; ***
                                     00AE   384 ;
                                     00AE   385 ;	On Entry:
                                     00AE   386 ;
                                     00AE   387 ;		R4  = address of the CSR (controller status register)
                                     00AE   388 ;		R5  = address of the UCB (unit control block)
                                     00AE   389 ;		IPL = IPL$_POWER
                                     00AE   390 ;
                                     00AE   391 ;	returns:
                                     00AE   392 ;
                                     00AE   393 ;		(this routine must preserve all registers except R0-R3)
                                     00AE   394 ;
                                     00AE   395 ;-
                                     00AE   396 ;
                                     00AE   397 
                                     00AE   398 CD_UNIT_INIT:				; Initialize unit
                                     00AE   399 .IIF DEFINED XDELTA,	JSB	G^INI$BRK
                    50   2C A5   D0  00AE   400 	MOVL	UCB$L_DDB(R5),R0	; point to device data block
                 C9 AF   04 A0   D0  00B2   401 	MOVL	DDB$L_UCB(R0),UCB	; keep "UCB" pointing to 1st UCB
                                     00B7   402 ;
                    50 A5   00   D0  00B7   403 	MOVL	#UCB$M_CD_DEFAULT,UCB$L_DEVDEPEND(R5)	; init device status
                         54 A5   D4  00BB   404 	CLRL	UCB$L_CD_DSKUCB(R5)	; clear cached disk UCB address
                                     00BE   405 	ASSUME	UCB$L_CD_SETSIZE+4 EQ UCB$L_CD_SETCOUNT
                       0134 C5   7C  00BE   406 	CLRQ	UCB$L_CD_SETSIZE(R5)	; zero set size (blocks/set) and
                                     00C2   407 					;  number of sets in cache
                       013C C5   D4  00C2   408 	CLRL	UCB$L_CD_CACHESIZE(R5)	; zero size of cache (SETSIZE*SETCOUNT)
                                     00C6   409 	ASSUME	UCB$L_CD_TAGSIZE+4 EQ UCB$L_CD_TAGADDR
                       00F8 C5   7C  00C6   410 	CLRQ	UCB$L_CD_TAGSIZE(R5)	; zero size and address of tag block
                                     00CA   411 ;
                            38   BB  00CA   412 	PUSHR	#^M<R3,R4,R5>		; save registers
        0044 8F   00   65   00   2C  00CC   413 	MOVC5	#0,(R5),#0,#<UCB$K_CD_LENGTH-UCB$T_CD_INFO>,UCB$T_CD_INFO(R5)
                       0120 C5       00D3       
                                     00D6   414 					; zero UCB information array
                            38   BA  00D6   415 	POPR	#^M<R3,R4,R5>		; restore registers
                                     00D8   416 ;
                   36080018 8F   D0  00D8   417 	MOVL	#<SPL$C_QUEUEAST*16777216>!<DYN$C_FRK*65536>!<FKB$C_LENGTH>,-
                       00E8 C5       00DE   418 		UCB$T_CD_FKB+FKB$W_SIZE(R5)
                                     00E1   419 					; init constants in special fork block
                   010F0034 8F   D0  00E1   420 	MOVL	#<TQE$C_SSSNGL*16777216>!<DYN$C_TQE*65536>!<TQE$C_LENGTH>,-
                       00AC C5       00E7   421 		UCB$T_CD_TQE+TQE$W_SIZE(R5)
                                     00EA   422 					; init constants in timer queue element
         00B0 C5   0000069E'EF   DE  00EA   423 	MOVAL	CD_TIMEDIO,UCB$T_CD_TQE+TQE$L_FPC(R5)
                                     00F3   424 					; define timeout routine entry point
                                     00F3   425 ;
                                     00F3   426 ; *** Allocate 2 additional SPTE's to map user's QIO buffers, and compute
                                     00F3   427 ;	addresses of the system page table entries and system virtual addresses
                                     00F3   428 ;	to be used in mapping cache and user buffers.
                                     00F3   429 ;
                       52   02   D0  00F3   430 	MOVL	#2,R2			; need 2 extra SPTEs to map user buffers
                   00000000'GF   16  00F6   431 	JSB	G^LDR$ALLOC_PT		; grab SPTEs
                         54 50   E9  00FC   432 	BLBC	R0,99$			; branch on error
              53   00000000'GF   D0  00FF   433 	MOVL	G^LDR$GL_SPTBASE,R3	; get base address of system page table
                  50   51   53   C3  0106   434 	SUBL3	R3,R1,R0		; subtract out base address of SPT and
                  50   50   07   78  010A   435 	ASHL	#7,R0,R0		;  convert SPTE addr to system VA
                    00 50   1F   E2  010E   436 	BBSS	#VA$V_SYSTEM,R0,34$	; make it S0 address
                                     0112   437 34$:
                  010C C5   50   D0  0112   438 	MOVL	R0,UCB$L_CD_USVA(R5)	; save system virtual address to
                                     0117   439 					;  reference in accessing user buffers
                  0108 C5   51   D0  0117   440 	MOVL	R1,UCB$L_CD_USPTE(R5)	; save addr of system page table entry
              81   901FFFFF 8F   D0  011C   441 	MOVL	#<PTE$M_VALID!PTE$C_KW!PTE$M_PFN>,(R1)+
              61   901FFFFF 8F   D0  0123   442 	MOVL	#<PTE$M_VALID!PTE$C_KW!PTE$M_PFN>,(R1)
                                     012A   443 					; fill in SPTEs = valid, kernal r/w
                  52   0088 C5   D0  012A   444 	MOVL	UCB$L_SVPN(R5),R2	; pickup SVPN for mapping cache buffers
                  50   52   02   78  012F   445 	ASHL	#2,R2,R0		; convert SVPN into byte offset and
                       50   53   C0  0133   446 	ADDL2	R3,R0			;  add base addr of system page table
                  0100 C5   50   D0  0136   447 	MOVL	R0,UCB$L_CD_CSPTE(R5)	; save address of SPTE to map cache
              60   901FFFFF 8F   D0  013B   448 	MOVL	#<PTE$M_VALID!PTE$C_KW!PTE$M_PFN>,(R0)
                                     0142   449 					; fill in SPTE = valid, kernal r/w
                  50   52   09   78  0142   450 	ASHL	#9,R2,R0		; convert SVPN to system virt addr
                    00 50   1F   E2  0146   451 	BBSS	#VA$V_SYSTEM,R0,44$	;  make it S0 address
                                     014A   452 44$:
                  0104 C5   50   D0  014A   453 	MOVL	R0,UCB$L_CD_CSVA(R5)	; save system virtual address to
                                     014F   454 					;  reference in accessing cache buffers
                                     014F   455 ;
                                     014F   456 ; *** add additional initialization code here...
                                     014F   457 ;	
                    78 A5   10   A8  014F   458 	BISW	#UCB$M_ONLINE,UCB$W_STS(R5)
                                     0153   459 					; Set unit online on success
                                     0153   460 99$:
                                 05  0153   461 	RSB				; Return
                                     0154   462 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page   8
082092                          Driver Unload Routine                    26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0154   464 	.sbttl	Driver Unload Routine
                                     0154   465 ;
                                     0154   466 ;+
                                     0154   467 ;
                                     0154   468 ; *** CD_UNLOAD -- Called by VMS when the driver is being reloaded.
                                     0154   469 ;	Though the documentation is sketchy, it appears that the
                                     0154   470 ;	driver may block unloading/reloading by returning an error
                                     0154   471 ;	indication to the caller.  This will be done if the
                                     0154   472 ;	cache is active.
                                     0154   473 ;
                                     0154   474 ;			!!!!!NOTE!!!!!!
                                     0154   475 ;	As currently coded with the pending/free PIB queue lists in the
                                     0154   476 ;	driver's local address space, all the PIBs allocated must
                                     0154   477 ;	be consolidated and released as IRPs to non-paged pool or
                                     0154   478 ;	the cache driver must be flagged as not reloadable.  In the
                                     0154   479 ;	latter case, this routine should not be included in the driver.
                                     0154   480 ;	If the PIBs are not released, the non-paged pool associated with
                                     0154   481 ;	them is lost forever (until next system boot) with each reload.
                                     0154   482 ;
                                     0154   483 ; ***
                                     0154   484 ;
                                     0154   485 ;	On entry:
                                     0154   486 ;
                                     0154   487 ;		???
                                     0154   488 ;
                                     0154   489 ;	 returns:
                                     0154   490 ;
                                     0154   491 ;		R0  = SS$_NORMAL if cache is inactive; SS$_DEVACTIVE otherwise
                                     0154   492 ;
                                     0154   493 ;-
                                     0154   494 ;
                                     0154   495 
                                     0154   496 CD_UNLOAD:
                                     0154   497 .IIF DEFINED XDELTA,	JSB	G^INI$BRK
                  50   FF28 CF   D0  0154   498 	MOVL	UCB,R0		; get local copy of UCB address
                                     0159   499 2$:
           50 A0   00000060 8F   D3  0159   500 	BITL	#UCB$M_CD_ACTIVE!UCB$M_CD_ALLOC,UCB$L_DEVDEPEND(R0)
                                     0161   501 				; test for cache active and/or allocated
                            16   12  0161   502 	BNEQ	8$		; branch if either, block reload
                    50   34 A0   D0  0163   503 	MOVL	UCB$L_LINK(R0),R0 ; step to next UCB
                            F0   12  0167   504 	BNEQ	2$		; loop til done
                  50   FF17 CF   DE  0169   505 	MOVAL	PENDQFL,R0	; check pending queue for outstanding I/O
                    04 A0   50   D1  016E   506 	CMPL	R0,4(R0)	; queue empty ??
                            05   12  0172   507 	BNEQ	8$		; branch if not
                       50   01   3C  0174   508 	MOVZWL	#SS$_NORMAL,R0	; setup successful status
                            05   11  0177   509 	BRB	9$
                                     0179   510 8$:
                  50   02C4 8F   3C  0179   511 	MOVZWL	#SS$_DEVACTIVE,R0 ; setup error status
                                     017E   512 9$:
                                 05  017E   513 	RSB
                                     017F   514 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page   9
082092                          READxBLK FDT Routine                     26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     017F   516 	.sbttl	READxBLK FDT Routine
                                     017F   517 ;
                                     017F   518 ;+
                                     017F   519 ;
                                     017F   520 ; *** CD_READBLK -- Called to pre-process the IO$_READxBLK function which
                                     017F   521 ;	will return a record of each write QIO operation (or read
                                     017F   522 ;	and write operations with IO$M_CD_RRD modifier) issued to the
                                     017F   523 ;	cached disk in the user's buffer.  Two special subfunctions/modifiers
                                     017F   524 ;	may be specified with the IO$_READxBLK function:
                                     017F   525 ;
                                     017F   526 ;		IO$M_TIMED - Controls the timeout for I/O completion
                                     017F   527 ;			based on the value in QIO parameter 3 (P3)
                                     017F   528 ;			specified in mSecs with a resolution of +/- 10mSec.
                                     017F   529 ;
                                     017F   530 ;		IO$M_CD_RRD - Includes records for each read operation
                                     017F   531 ;			queued to the cached disk.
                                     017F   532 ;
                                     017F   533 ;	QIO parameter 1 (P1) must define the address of the buffer
                                     017F   534 ;	to be filled with records of each write (and read) operation
                                     017F   535 ;	intercepted by the cache driver.  QIO parameter 2 (P2) defines
                                     017F   536 ;	the size of the P1 buffer.  QIO parameter 3 (P3) along with
                                     017F   537 ;	the IO$M_TIMED modifier specifies a timeout value for the
                                     017F   538 ;	I/O in milliseconds.
                                     017F   539 ;
                                     017F   540 ;	The format of the data records placed in the user's buffer
                                     017F   541 ;	are described in the comments for the CD_RECORD subroutine.
                                     017F   542 ;
                                     017F   543 ; ***
                                     017F   544 ;
                                     017F   545 ;	On Entry:
                                     017F   546 ;
                                     017F   547 ;		R0-R2	- scratch registers
                                     017F   548 ;		R3	- address of the IRP (I/O request packet)
                                     017F   549 ;		R4	- address of the PCB (process control block)
                                     017F   550 ;		R5	- address of the UCB (unit control block)
                                     017F   551 ;		R6	- address of the CCB (channel control block)
                                     017F   552 ;		R7	- bit number of the I/O function code
                                     017F   553 ;		R8	- address of the FDT table entry for this routine
                                     017F   554 ;		R9-R11	- scratch registers
                                     017F   555 ;		AP	- address of the 1st function dependent QIO parameter
                                     017F   556 ;
                                     017F   557 ;	returns:
                                     017F   558 ;
                                     017F   559 ;		T.B.S.
                                     017F   560 ;
                                     017F   561 ;-
                                     017F   562 CD_READBLK:
                  50   20D4 8F   3C  017F   563 	MOVZWL	#SS$_DEVINACT,R0	; assume device is inactive
                 4D 50 A5   06   E1  0184   564 	BBC	#UCB$V_CD_ACTIVE,UCB$L_DEVDEPEND(R5),29$
                                     0189   565 					; branch if caching inactive
                       50   14   3C  0189   566 	MOVZWL	#SS$_BADPARAM,R0	; assume no buffer to fill
                    51   04 AC   D0  018C   567 	MOVL	P2(AP),R1		; pickup buffer size
                       1C   51   D1  0190   568 	CMPL	R1,#CD_MAXRECL		; must be at least 1 record long
                            41   1F  0193   569 	BLSSU	29$			; branch if not
                       50   6C   D0  0195   570 	MOVL	P1(AP),R0		; pickup buffer address
                   00000000'GF   16  0198   571 	JSB	G^EXE$READCHK		; check buffer access (sets IRP$W_BCNT)
                            53   DD  019E   572 	PUSHL	R3			; save IRP address
                       51   0C   C0  01A0   573 	ADDL2	#12,R1			; add in overhead of system buffer
                   00000000'GF   16  01A3   574 	JSB	G^EXE$DEBIT_BYTCNT_ALO	; check for quota violation, allocate
                                     01A9   575 					;  buffer, dec. JIB byte count quota
                       53   8E   D0  01A9   576 	MOVL	(SP)+,R3		; recover IRP address
                    30 A3   51   B0  01AC   577 	MOVW	R1,IRP$W_BOFF(R3)	; save buffer packet size
                    2C A3   52   D0  01B0   578 	MOVL	R2,IRP$L_SVAPTE(R3)	;  and start address
                  82   52   0C   C1  01B4   579 	ADDL3	#12,R2,(R2)+		; save start address of data
                       62   6C   D0  01B8   580 	MOVL	P1(AP),(R2)		; save address of process's buffer
                         38 A3   D4  01BB   581 	CLRL	IRP$L_MEDIA(R3)		; assume no timeout
                 0A 20 A3   07   E1  01BE   582 	BBC	#IO$V_TIMED,IRP$W_FUNC(R3),24$
                                     01C3   583 					; branch if I/O not timed
   38 A3   08 AC   00002710 8F   C5  01C3   584 	MULL3	#10*1000,P3(AP),IRP$L_MEDIA(R3)
                                     01CD   585 					; save timeout in 100nSec units
                                     01CD   586 24$:
                   00000000'GF   17  01CD   587 	JMP	G^EXE$QIODRVPKT		; queue packet to cache driver
                                     01D3   588 ;
                                     01D3   589 28$:
                       53   8E   D0  01D3   590 	MOVL	(SP)+,R3		; recover IRP address
                                     01D6   591 29$:
                          00DA   31  01D6   592 	BRW	CD_FINISHIOC		; force I/O completion
                                     01D9   593 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  10
082092                          SENSEMODE/SENSECHAR FDT Routine          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     01D9   595 	.sbttl	SENSEMODE/SENSECHAR FDT Routine
                                     01D9   596 ;
                                     01D9   597 ;+
                                     01D9   598 ;
                                     01D9   599 ; *** CD_SENSEMODE -- Called to pre-process the IO$_SENSEMODE/IO$_SENSECHAR
                                     01D9   600 ;	functions.  One special subfunction/modifier may be specified
                                     01D9   601 ;	with the IO$_SENSEMODE/IO$_SENSECHAR function:
                                     01D9   602 ;
                                     01D9   603 ;		IO$M_CD_GETINFO - Returns an information block with
                                     01D9   604 ;			pertinent preformance characteristics for the
                                     01D9   605 ;			cache driver.
                                     01D9   606 ;
                                     01D9   607 ;	QIO parameter 1 (P1) must define the address of a buffer
                                     01D9   608 ;	which will be filled with the information from the UCB fields
                                     01D9   609 ;	beginning with UCB$T_CD_INFO up to the end of the UCB.
                                     01D9   610 ;	QIO parameter 2 (P2) defines the size of the P1 buffer;
                                     01D9   611 ;	data that cannot fit within the specified buffer will be
                                     01D9   612 ;	truncated and SS$_BUFFEROVF status returned.
                                     01D9   613 ;
                                     01D9   614 ;	When the IO$M_CD_GETINFO modifier is not specified, CDDRIVER
                                     01D9   615 ;	returns control to the standard VMS EXE$SENSEMODE routine
                                     01D9   616 ;	which returns the contents of UCB$L_DEVDEPEND in the second
                                     01D9   617 ;	I/O status long word.
                                     01D9   618 ;
                                     01D9   619 ; ***
                                     01D9   620 ;
                                     01D9   621 ;	On Entry:
                                     01D9   622 ;
                                     01D9   623 ;		R0-R2	- scratch registers
                                     01D9   624 ;		R3	- address of the IRP (I/O request packet)
                                     01D9   625 ;		R4	- address of the PCB (process control block)
                                     01D9   626 ;		R5	- address of the UCB (unit control block)
                                     01D9   627 ;		R6	- address of the CCB (channel control block)
                                     01D9   628 ;		R7	- bit number of the I/O function code
                                     01D9   629 ;		R8	- address of the FDT table entry for this routine
                                     01D9   630 ;		R9-R11	- scratch registers
                                     01D9   631 ;		AP	- address of the 1st function dependent QIO parameter
                                     01D9   632 ;
                                     01D9   633 ;	returns:
                                     01D9   634 ;
                                     01D9   635 ;		T.B.S.
                                     01D9   636 ;
                                     01D9   637 ;-
                                     01D9   638 CD_SENSEMODE:
                 01 20 A3   06   E0  01D9   639 	BBS	#IO$V_CD_GETINFO,IRP$W_FUNC(R3),2$
                                     01DE   640 					; branch if special function
                                 05  01DE   641 	RSB				; else, return through EXE$SENSEMODE
                                     01DF   642 2$:
                    51   04 AC   D0  01DF   643 	MOVL	P2(AP),R1		; pickup size of user buffer
                            23   13  01E3   644 	BEQL	12$			; branch if undefined
                       50   6C   D0  01E5   645 	MOVL	P1(AP),R0		; pickup user buffer address
                   00000000'GF   16  01E8   646 	JSB	G^EXE$READCHK		; verify write access to user's buffer
                            52   D4  01EE   647 	CLRL	R2			; assume cache inactive
                 07 50 A5   06   E1  01F0   648 	BBC	#UCB$V_CD_ACTIVE,UCB$L_DEVDEPEND(R5),9$
                                     01F5   649 					; branch if inactive
              52   00000044 8F   D0  01F5   650 	MOVL	#UCB$K_CD_LENGTH-UCB$T_CD_INFO,R2
                                     01FC   651 					; pickup number of bytes of info
                                     01FC   652 9$:
                            38   BB  01FC   653 	PUSHR	#^M<R3,R4,R5>		; free registers
   60   51   00   0120 C5   52   2C  01FE   654 	MOVC5	R2,UCB$T_CD_INFO(R5),#0,R1,(R0)
                                     0206   655 					; copy information to user buffer
                            38   BA  0206   656 	POPR	#^M<R3,R4,R5>		; recover registers
                                     0208   657 12$:
                       50   01   3C  0208   658 	MOVZWL	#SS$_NORMAL,R0		; setup completion status
              51   00000044 8F   D0  020B   659 	MOVL	#UCB$K_CD_LENGTH-UCB$T_CD_INFO,R1
                                     0212   660 					; get # bytes of information
                    51   04 AC   D1  0212   661 	CMPL	P2(AP),R1		; check if data was truncated
                            09   18  0216   662 	BGEQ	18$			; branch if not
                  50   0601 8F   3C  0218   663 	MOVZWL	#SS$_BUFFEROVF,R0	; reset status
                    51   04 AC   D0  021D   664 	MOVL	P2(AP),R1		; and return user buffer size
                                     0221   665 18$:
             50   10   10   51   F0  0221   666 	INSV	R1,#16,#16,R0		; save transfer byte count in IOSB
                    51   54 A5   D0  0226   667 	MOVL	UCB$L_CD_DSKUCB(R5),R1	; setup second I/O status long word
                                     022A   668 CD_FINISHIO:
                   00000000'GF   17  022A   669 	JMP	G^EXE$FINISHIO		; and complete the I/O
                                     0230   670 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  11
082092                          SETMODE/SETCHAR FDT Routine              26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0230   672 	.sbttl	SETMODE/SETCHAR FDT Routine
                                     0230   673 ;
                                     0230   674 ;+
                                     0230   675 ;
                                     0230   676 ; *** CD_SETMODE -- Called to pre-process the IO$_SETMODE/IO$_SETCHAR
                                     0230   677 ;	functions.  There are currently four major functions controlled
                                     0230   678 ;	by I/O function modifiers:
                                     0230   679 ;
                                     0230   680 ;		IO$M_CD_STARTUP	- Starts disk data caching
                                     0230   681 ;		IO$M_CD_SHUTDOWN- Terminates disk data caching
                                     0230   682 ;		IO$M_CD_PURGE	- Invalidates all cached data
                                     0230   683 ;		IO$M_CD_EXTEND	- Adds blocks to cache
                                     0230   684 ;
                                     0230   685 ;	These modifiers are mutually exclusive; specifying more than
                                     0230   686 ;	one major modifier returns the SS$_ILLIOFUNC error.
                                     0230   687 ;
                                     0230   688 ;	A special modifier, IO$M_CD_ZERO may be specified alone or in
                                     0230   689 ;	combination with any other major modifier.  This modifier zeroes
                                     0230   690 ;	the contents of all the statistical counters maintained by
                                     0230   691 ;	the cache driver.
                                     0230   692 ;
                                     0230   693 ;	The following additional modifiers may be specified only for the
                                     0230   694 ;	IO$M_STARTUP function:
                                     0230   695 ;
                                     0230   696 ;		IO$M_CD_FLUSH	- When specified, disk write operations
                                     0230   697 ;				invalidate any cached data; otherwise,
                                     0230   698 ;				data already cached is updated both on disk
                                     0230   699 ;				and cache.
                                     0230   700 ;		IO$M_CD_LOAD	- When specified, all data written to disk
                                     0230   701 ;				is loaded into the cache (only effective
                                     0230   702 ;				when IO$M_CD_FLUSH is NOT specified);
                                     0230   703 ;				otherwise, only data already cached is updated
                                     0230   704 ;				on a write to disk.
                                     0230   705 ;		IO$M_CD_PAGSWAPIO- When specified, page and swap I/O operations
                                     0230   706 ;				are cached; otherwise, page and swap I/O
                                     0230   707 ;				operations are not cached.  Even if not
                                     0230   708 ;				being cached, page or swap write operations
                                     0230   709 ;				invalidate any cached data.
                                     0230   710 ;
                                     0230   711 ;	All SETMODE/SETCHAR function processing is performed immediately
                                     0230   712 ;	and may necessitate raising the IPL to fork level to synchronize
                                     0230   713 ;	access with common/system data structures.
                                     0230   714 ;
                                     0230   715 ;
                                     0230   716 ; ***
                                     0230   717 ;
                                     0230   718 ;	On Entry:
                                     0230   719 ;
                                     0230   720 ;		R0-R2	- scratch registers
                                     0230   721 ;		R3	- address of the IRP (I/O request packet)
                                     0230   722 ;		R4	- address of the PCB (process control block)
                                     0230   723 ;		R5	- address of the UCB (unit control block)
                                     0230   724 ;		R6	- address of the CCB (channel control block)
                                     0230   725 ;		R7	- bit number of the I/O function code
                                     0230   726 ;		R8	- address of the FDT table entry for this routine
                                     0230   727 ;		R9-R11	- scratch registers
                                     0230   728 ;		AP	- address of the 1st function dependent QIO parameter
                                     0230   729 ;
                                     0230   730 ;
                                     0230   731 ;-
                                     0230   732 	.enable LSB
                                     0230   733 CD_SETMODE:
                       50   01   3C  0230   734 	MOVZWL	#SS$_NORMAL,R0		; assume success
      51   20 A3   FFFFFC3F 8F   CB  0233   735 	BICL3	#^C<IO$M_CD_SETMODES>,IRP$W_FUNC(R3),R1
                                     023C   736 					; pickup major modifiers only
             52   51   0A   06   EA  023C   737 	FFS	#IO$V_FMODIFIERS,#IO$S_FMODIFIERS,R1,R2
                                     0241   738 					; determine major modifier bit
                            17   13  0241   739 	BEQL	12$			; branch if none specified
                    00 51   52   E5  0243   740 	BBCC	R2,R1,5$		; clear major modifier bit
                                     0247   741 5$:
                  50   00F4 8F   3C  0247   742 	MOVZWL	#SS$_ILLIOFUNC,R0	; assume error
                            51   D5  024C   743 	TSTL	R1			; more than one major modifier ??
                            63   12  024E   744 	BNEQ	CD_FINISHIOC		; branch if yes, illegal
                       06   52   D1  0250   745 	CMPL	R2,#IO$V_CD_STARTUP	; startup function ??
                            28   13  0253   746 	BEQL	14$			; branch if yes, dispatch @IPL$_ASTDEL
                  50   20D4 8F   3C  0255   747 	MOVZWL	#SS$_DEVINACT,R0	; assume cache is inactive
                                     025A   748 12$:
                 54 50 A5   06   E1  025A   749 	BBC	#UCB$V_CD_ACTIVE,UCB$L_DEVDEPEND(R5),CD_FINISHIOC
                                     025F   750 					; abort SHUTDOWN/EXTEND/PURGE if
                                     025F   751 					;  cache is inactive
                                     025F   752 	FORKLOCK lock=UCB$B_FLCK(R5),-	; else, must synchronize with driver
                                     025F   753 		 savipl=-(SP),-
                                     025F   754 		 preserve=NO
                                     027D   755 14$:
                  03   06   52   8F  027D   756 	CASEB	R2,#IO$V_FMODIFIERS,#3
                                     0281   757 15$:
                               0063' 0281   758 	.word	STARTUP-15$
                               0038' 0283   759 	.word	SHUTDOWN-15$
                               0042' 0285   760 	.word	EXTEND-15$
                               003D' 0287   761 	.word	PURGE-15$
                                     0289   762 ;
                                     0289   763 ; *** Common SETMODE completion handling...zero out statistical counters if
                                     0289   764 ;	IO$M_CD_ZERO modifier specified for any IO$_SETMODE function.
                                     0289   765 ;	Must own driver's fork lock to complete the I/O through ZERO or ZERO1.
                                     0289   766 ;
                                     0289   767 ZERO:
                 0C 20 A3   0C   E1  0289   768 	BBC	#IO$V_CD_ZERO,IRP$W_FUNC(R3),24$
                                     028E   769 					;; branch if IO$M_CD_ZERO not spec'd
                                     028E   770 ZERO1:
                            3F   BB  028E   771 	PUSHR	#^M<R0,R1,R2,R3,R4,R5>	;; free registers
   0140 C5   24   00   65   00   2C  0290   772 	MOVC5	#0,(R5),#0,#<UCB$K_CD_LENGTH-UCB$T_CD_STATS>,UCB$T_CD_STATS(R5)
                                     0298   773 					;; zero out cache statistics
                            3F   BA  0298   774 	POPR	#^M<R0,R1,R2,R3,R4,R5>	;; restore registers
                                     029A   775 24$:
                                     029A   776 	FORKUNLOCK lock=UCB$B_FLCK(R5),- ;; release driver's fork lock
                                     029A   777 		   newipl=(SP)+,-
                                     029A   778 		   preserve=YES
                                     02B3   779 ;*	BRB	CD_FINISHIOC		;  and finish I/O
                                     02B3   780 ;
                                     02B3   781 CD_FINISHIOC:
                   00000000'GF   17  02B3   782 	JMP	G^EXE$FINISHIOC		; finish off request
                                     02B9   783 ;
                                     02B9   784 SHUTDOWN:		; *** Terminate disk caching
                          016F   30  02B9   785 	BSBW	CD_SHUTDOWN		;; shutdown cache driver
                            CB   11  02BC   786 	BRB	ZERO			;;  and branch to common handler
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  12
082092                          SETMODE/SETCHAR FDT Routine              26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     02BE   787 ;
                                     02BE   788 PURGE:			; *** Purge contents of cache
                          0362   30  02BE   789 	BSBW	CD_PURGE		;; invalidate all cached data
                            C6   11  02C1   790 	BRB	ZERO			;;  and branch to common handler
                                     02C3   791 ;
                                     02C3   792 EXTEND:			; *** Add memory to cache
                       50   14   3C  02C3   793 	MOVZWL	#SS$_BADPARAM,R0	;; assume error
                       51   6C   D0  02C6   794 	MOVL	P1(AP),R1		;; get # sets to add
                            BE   15  02C9   795 	BLEQ	ZERO			;; abort I/O if undefined
                  51   0134 C5   C4  02CB   796 	MULL2	UCB$L_CD_SETSIZE(R5),R1	;; compute # pages required
             52   013C C5   51   C1  02D0   797 	ADDL3	R1,UCB$L_CD_CACHESIZE(R5),R2
                                     02D6   798 					;; compute ultimate cache size
              00007FFF 8F   52   D1  02D6   799 	CMPL	R2,#CD_CACHESIZE	;; new size > maximum allowed ??
                            AA   1A  02DD   800 	BGTRU	ZERO			;; abort I/O if yes
                          0183   30  02DF   801 	BSBW	CD_EXTEND		;; add memory to cache
                            A5   11  02E2   802 	BRB	ZERO			;;  and branch to common handler
                                     02E4   803 ;
                                     02E4   804 STARTUP:		; *** Handle the IO$M_STARTUP function
                                     02E4   805 					; running at IPL$_ASTDEL !!
                  50   02C4 8F   3C  02E4   806 	MOVZWL	#SS$_DEVACTIVE,R0	; assume error
                 C5 50 A5   06   E0  02E9   807 	BBS	#UCB$V_CD_ACTIVE,UCB$L_DEVDEPEND(R5),CD_FINISHIOC
                                     02EE   808 					; branch if caching already active
                       50   14   3C  02EE   809 	MOVZWL	#SS$_BADPARAM,R0	; assume error in cache parameters
               0134 C5   08 AC   9A  02F1   810 	MOVZBL	P3(AP),UCB$L_CD_SETSIZE(R5) ; establish assoc set size
                            04   12  02F7   811 	BNEQ	100$			; branch if defined
                       0134 C5   D6  02F9   812 	INCL	UCB$L_CD_SETSIZE(R5)	; default set size to 1 (direct-mapped)
                                     02FD   813 100$:
                    51   04 AC   D0  02FD   814 	MOVL	P2(AP),R1		; get # sets desired
                            0E   15  0301   815 	BLEQ	106$			; branch if 0, okay
                  51   0134 C5   C4  0303   816 	MULL2	UCB$L_CD_SETSIZE(R5),R1	; compute total cache size
              00007FFF 8F   51   D1  0308   817 	CMPL	R1,#CD_CACHESIZE	; size of cache > maximum allowed ??
                            A2   1A  030F   818 	BGTRU	CD_FINISHIOC		; branch if yes, illegal
                                     0311   819 ;
                                     0311   820 106$:
                       50   00   D0  0311   821 	MOVL	#UCB$M_CD_DEFAULT,R0	; get default device dependent status
                    51   20 A3   3C  0314   822 	MOVZWL	IRP$W_FUNC(R3),R1	; pickup I/O function word
                    03 51   0F   E1  0318   823 	BBC	#IO$V_CD_FLUSH,R1,110$	; branch to enable caching writes
                       50   01   C8  031C   824 	BISL	#UCB$M_CD_FLUSH,R0	; else, invalidate cache on write
                                     031F   825 110$:
                    03 51   0E   E1  031F   826 	BBC	#IO$V_CD_LOAD,R1,112$	; branch to update cached data on write
                       50   02   C8  0323   827 	BISL	#UCB$M_CD_LOAD,R0	; else, load all data written
                                     0326   828 112$:
                    03 51   0D   E1  0326   829 	BBC	#IO$V_CD_PAGSWAPIO,R1,114$ ; branch to ignore page/swap I/O
                       50   04   C8  032A   830 	BISL	#UCB$M_CD_PAGSWAPIO,R0	; else, cache page/swap I/O
                                     032D   831 114$:
                    50 A5   50   D0  032D   832 	MOVL	R0,UCB$L_DEVDEPEND(R5)	; save new settings
                                     0331   833 ;
                                     0331   834 ; *** Following code extracted from EXE$QIOREQ to validate an I/O channel
                                     0331   835 ;	and determine the UCB address of the disk to be cached.  This was
                                     0331   836 ;	chosen to allow the SYS$ASSIGN system service to do all the work
                                     0331   837 ;	involved with logical name translation and scanning of the device
                                     0331   838 ;	tables.
                                     0331   839 ;
                  50   013C 8F   3C  0331   840 	MOVZWL	#SS$_IVCHAN,R0		; assume error
         51   6C   FFFF000F 8F   CB  0336   841 	BICL3	#<^XFFFF0000!<CCB$C_LENGTH-1>>,P1(AP),R1
                                     033E   842 					; get channel assigned to disk
                            23   13  033E   843 	BEQL	129$			; branch if illegal
              00000000'GF   51   B1  0340   844 	CMPW	R1,G^CTL$GW_CHINDX	; legal number ??
                            1A   1A  0347   845 	BGTRU	129$			; branch if not
                       51   51   CE  0349   846 	MNEGL	R1,R1			; convert to channel index
              51   00000000'GF   C0  034C   847 	ADDL2	G^CTL$GL_CCBBASE,R1	; get address of CCB
                       50   24   3C  0353   848 	MOVZWL	#SS$_NOPRIV,R0		; assume error
                            52   DC  0356   849 	MOVPSL	R2			; read current PSL
             52   52   02   16   EF  0358   850 	EXTZV	#PSL$V_PRVMOD,#PSL$S_PRVMOD,R2,R2
                                     035D   851 					; extract previous mode field
                    09 A1   52   91  035D   852 	CMPB	R2,CCB$B_AMOD(R1)	; caller have priv to access channel ??
                            03   15  0361   853 	BLEQ	130$			; branch if yes, continue
                                     0363   854 129$:
                          FF4D   31  0363   855 	BRW	CD_FINISHIOC		; long branch to terminate I/O
                                     0366   856 130$:	
                       52   61   D0  0366   857 	MOVL	CCB$L_UCB(R1),R2	; pickup disk's UCB address
          51   0134 C5   04 AC   C5  0369   858 	MULL3	P2(AP),UCB$L_CD_SETSIZE(R5),R1
                                     0370   859 					; recover # pages (blocks) for cache
                                     0370   860 	FORKLOCK lock=UCB$B_FLCK(R2),-	; raise IPL to disk driver's fork level
                                     0370   861 		 savipl=-(SP),-
                                     0370   862 		 preserve=NO
                 0B A5   0B A2   90  038E   863 	MOVB	UCB$B_FLCK(R2),UCB$B_FLCK(R5)
                                     0393   864 					;; reset cache driver's fork lock index
                                     0393   865 					;;  to match disk driver's !!
                            03   10  0393   866 	BSBB	CD_STARTUP		;; attempt to start cache
                          FEF6   31  0395   867 	BRW	ZERO1			;; branch to common exit point
                                     0398   868 
                                     0398   869 	.disable LSB
                                     0398   870 ;
                                     0398   871 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  13
082092                          Startup Disk Data Caching                26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0398   873 	.sbttl	Startup Disk Data Caching
                                     0398   874 ;
                                     0398   875 ;+
                                     0398   876 ;
                                     0398   877 ; *** CD_STARTUP -- Initiates caching of disk unit. In associating a disk
                                     0398   878 ;	device to the cache driver, the disk driver's DDT table entry for
                                     0398   879 ;	the start I/O routine is altered to point to the cache driver's
                                     0398   880 ;	start I/O routine.  If multiple UCBs were allowed for the cache
                                     0398   881 ;	driver, each of which may be directed to different units of the
                                     0398   882 ;	same generic disk device/controller, some mechanism must be provided
                                     0398   883 ;	for the cache driver to determine the true disk driver start I/O
                                     0398   884 ;	routine even after the disk is redirected to the cache driver.
                                     0398   885 ;	This disk start I/O routine address is saved in the cache driver's
                                     0398   886 ;	UCB along with the address of the DDT which has been redirected
                                     0398   887 ;	to the cache driver's start I/O entry point.
                                     0398   888 ;
                                     0398   889 ;	If the disk's DDT start I/O entry point has already been
                                     0398   890 ;	redirected to the cache driver, each cache driver UCB is scanned
                                     0398   891 ;	to find one associated with the same disk device and the saved
                                     0398   892 ;	start I/O routine address is copied from that UCB.
                                     0398   893 ;	This is required to allow any random sequence of starting and
                                     0398   894 ;	stopping disk caching of units on a single generic disk such
                                     0398   895 ;	that the disk driver's start I/O point can be restored once caching
                                     0398   896 ;	of all the disk's units is terminated.
                                     0398   897 ;
                                     0398   898 ; ***
                                     0398   899 ;
                                     0398   900 ;	On Entry:
                                     0398   901 ;
                                     0398   902 ;		R1  = Number of pages/blocks to allocate to cache
                                     0398   903 ;		R2  = UCB address of disk driver to be cached
                                     0398   904 ;		R5  = Address of cache driver UCB
                                     0398   905 ;		IPL = Cached disk driver's fork IPL
                                     0398   906 ;
                                     0398   907 ;	 returns:
                                     0398   908 ;
                                     0398   909 ;		R0  = status:
                                     0398   910 ;			SS$_NORMAL = successful completion
                                     0398   911 ;			SS$_DUPUNIT = caching already active for the specified
                                     0398   912 ;				device
                                     0398   913 ;			SS$_NOTFILEDEV = attempt to cache non-disk device
                                     0398   914 ;
                                     0398   915 ;		R9-R11 destroyed by CD_EXTEND !!
                                     0398   916 ;
                                     0398   917 ;-
                                     0398   918 ;
                                     0398   919 
                                     0398   920 CD_STARTUP:
                            51   DD  0398   921 	PUSHL	R1			;; save R1
                  50   01CC 8F   3C  039A   922 	MOVZWL	#SS$_NOTFILEDEV,R0	;; assume error
                    4C A2   01   91  039F   923 	CMPB	#DC$_DISK,UCB$B_DEVCLASS(R2)
                                     03A3   924 					;; caching disk device ??
                            15   12  03A3   925 	BNEQ	9$			;; branch if not, exit
                  50   FCD7 CF   D0  03A5   926 	MOVL	UCB,R0			;; setup to scan all other active caches
                                     03AA   927 5$:
                    51   54 A0   D0  03AA   928 	MOVL	UCB$L_CD_DSKUCB(R0),R1	;; get cached disk's UCB address
                            1D   13  03AE   929 	BEQL	14$			;; branch if undefined, cache inactive
                       52   51   D1  03B0   930 	CMPL	R1,R2			;; caching same unit ??
                            08   12  03B3   931 	BNEQ	10$			;; branch if not, okay
                  50   21C4 8F   3C  03B5   932 	MOVZWL	#SS$_DUPUNIT,R0		;; setup error status
                                     03BA   933 9$:
                          006A   31  03BA   934 	BRW	38$			;;  and exit	
                                     03BD   935 10$:
             009C C2   009C C1   D1  03BD   936 	CMPL	UCB$L_DDT(R1),UCB$L_DDT(R2)
                                     03C4   937 					;; caching same generic device driver ??
                            07   12  03C4   938 	BNEQ	14$			;; branch if not
             0110 C5   0110 C0   D0  03C6   939 	MOVL	UCB$L_CD_DSKSTARTIO(R0),UCB$L_CD_DSKSTARTIO(R5)
                                     03CD   940 					;; save disk driver's start_io entry pt
                                     03CD   941 14$:
                    50   34 A0   D0  03CD   942 	MOVL	UCB$L_LINK(R0),R0	;; step to next UCB
                            D7   12  03D1   943 	BNEQ	5$			;; branch if defined, check it
                                     03D3   944 ;
                       51   6E   D0  03D3   945 	MOVL	(SP),R1			;; recover # pages for cache
                            06   13  03D6   946 	BEQL	20$			;; branch if 0, allowed
                          008A   30  03D8   947 	BSBW	CD_EXTEND		;; grab memory for cache
                         49 50   E9  03DB   948 	BLBC	R0,38$			;; branch if fails
                                     03DE   949 20$:
                    54 A5   52   D0  03DE   950 	MOVL	R2,UCB$L_CD_DSKUCB(R5)	;; save disk driver's UCB address
           50 A5   00000040 8F   C8  03E2   951 	BISL	#UCB$M_CD_ACTIVE,UCB$L_DEVDEPEND(R5)
                                     03EA   952 					;;  and mark cache active
               50   14   2C A2   C1  03EA   953 	ADDL3	UCB$L_DDB(R2),#DDB$T_NAME,R0
                                     03EF   954 					;; point to disk device name in DDB
                  0120 C5   80   7D  03EF   955 	MOVQ	(R0)+,UCB$T_CD_NAME(R5)	;; save name of disk device
                  0128 C5   60   7D  03F4   956 	MOVQ	(R0),UCB$T_CD_NAME+8(R5)
               0130 C5   68 A2   B0  03F9   957 	MOVW	UCB$W_UNIT(R2),UCB$W_CD_UNIT(R5)
                                     03FF   958 					;; save unit number of cached disk
                  50   009C C2   D0  03FF   959 	MOVL	UCB$L_DDT(R2),R0	;; pickup disk driver's DDT address
                  0114 C5   50   D0  0404   960 	MOVL	R0,UCB$L_CD_DSKDDT(R5)	;; save it in cache UCB for CD_STARTIO
                  51   009C C5   D0  0409   961 	MOVL	UCB$L_DDT(R5),R1	;; pickup cache driver's DDT address
                    1C A1   60   D1  040E   962 	CMPL	DDT$L_START(R0),DDT$L_ALTSTART(R1)
                                     0412   963 					;; disk start_io already revectored ??
                            09   13  0412   964 	BEQL	36$			;; branch if yes
                  0110 C5   60   D0  0414   965 	MOVL	DDT$L_START(R0),UCB$L_CD_DSKSTARTIO(R5)
                                     0419   966 					;; save disk's start_io entry point
                    60   1C A1   D0  0419   967 	MOVL	DDT$L_ALTSTART(R1),DDT$L_START(R0)
                                     041D   968 					;; redirect disk IRPs to cache driver
                                     041D   969 36$:
                       50   01   3C  041D   970 	MOVZWL	#SS$_NORMAL,R0		;; show success
        50   10   10   013C C5   F0  0420   971 	INSV	UCB$L_CD_CACHESIZE(R5),#16,#16,R0
                                     0427   972 					;; return cache block size in status
                                     0427   973 38$:
                       51   8E   D0  0427   974 	MOVL	(SP)+,R1		;; recover R1
                                 05  042A   975 	RSB
                                     042B   976 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  14
082092                          Shutdown Disk Data Caching               26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     042B   978 	.sbttl	Shutdown Disk Data Caching
                                     042B   979 ;
                                     042B   980 ;+
                                     042B   981 ;
                                     042B   982 ; *** CD_SHUTDOWN -- Terminates disk data caching for specific unit.  If there
                                     042B   983 ;	are no other units being cached for the same driver, the disk driver's
                                     042B   984 ;	start I/O entry point is restored.  All pages allocated to the cache
                                     042B   985 ;	are released to the free page list.
                                     042B   986 ;
                                     042B   987 ; ***
                                     042B   988 ;
                                     042B   989 ;	On Entry:
                                     042B   990 ;
                                     042B   991 ;		R5  = Address of cache driver UCB
                                     042B   992 ;		IPL = Cached disk driver's fork IPL
                                     042B   993 ;
                                     042B   994 ;	 returns:
                                     042B   995 ;
                                     042B   996 ;		R0 = Status:
                                     042B   997 ;			SS$_NORMAL = success
                                     042B   998 ;			SS$_DEVINACT = caching is already disabled
                                     042B   999 ;
                                     042B  1000 ;		R1-R2, R9-R10 destroyed !!
                                     042B  1001 ;
                                     042B  1002 ;-
                                     042B  1003 ;
                                     042B  1004 
                                     042B  1005 CD_SHUTDOWN:
           50 A5   00000040 8F   CA  042B  1006 	BICL	#UCB$M_CD_ACTIVE,UCB$L_DEVDEPEND(R5)
                                     0433  1007 					;; flag cache inactive immediately
                    52   54 A5   D0  0433  1008 	MOVL	UCB$L_CD_DSKUCB(R5),R2	;; get disk driver's UCB address
                            2B   13  0437  1009 	BEQL	16$			;; branch if undefined (never ?)
                         54 A5   D4  0439  1010 	CLRL	UCB$L_CD_DSKUCB(R5)	;; wipe out cached disk UCB address
                  52   009C C2   D0  043C  1011 	MOVL	UCB$L_DDT(R2),R2	;; point to disk driver's DDT
                  50   FC3B CF   D0  0441  1012 	MOVL	UCB,R0			;; setup to scan all UCB's
                                     0446  1013 6$:
                    51   54 A0   D0  0446  1014 	MOVL	UCB$L_CD_DSKUCB(R0),R1	;; get cached disk's UCB address
                            07   13  044A  1015 	BEQL	10$			;; branch if caching inactive
                  52   009C C1   D1  044C  1016 	CMPL	UCB$L_DDT(R1),R2	;; caching active for another unit ??
                            0B   13  0451  1017 	BEQL	14$			;; branch if yes, leave start_io addr
                                     0453  1018 10$:
                    50   34 A0   D0  0453  1019 	MOVL	UCB$L_LINK(R0),R0	;; step to next UCB
                            ED   12  0457  1020 	BNEQ	6$			;; branch if defined, check it
                  62   0110 C5   D0  0459  1021 	MOVL	UCB$L_CD_DSKSTARTIO(R5),DDT$L_START(R2)
                                     045E  1022 					;; restore proper disk start_io routine
                                     045E  1023 14$:
                          013D   30  045E  1024 	BSBW	CD_DELETE		;; delete cache(R0-R2, R9-R11 destroyed)
                       50   01   3C  0461  1025 	MOVZWL	#SS$_NORMAL,R0		;;  and set I/O completion status
                                     0464  1026 16$:
                                 05  0464  1027 	RSB
                                     0465  1028 ;
                                     0465  1029 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  15
082092                          Extend Cache Memory                      26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0465  1031 	.sbttl	Extend Cache Memory
                                     0465  1032 ;
                                     0465  1033 ;+
                                     0465  1034 ;
                                     0465  1035 ; *** CD_EXTEND -- Called to allocate memory from the free page list for use
                                     0465  1036 ;	as Cache Data Buffers (CDBs), and allocate a block of memory for Cache
                                     0465  1037 ;	Tags from non-paged pool inserting appropriate mapping
                                     0465  1038 ;	information for each Cache Data Buffer into the Tag entries.
                                     0465  1039 ;
                                     0465  1040 ;	When called to extend the size of the cache (UCB$L_CACHESIZE > 0)
                                     0465  1041 ;	a new block is allocated from non-paged pool (if required) and
                                     0465  1042 ;	the contents of the current tag block is moved to the new tag
                                     0465  1043 ;	block prior to adding the additional tags/buffers to the cache.
                                     0465  1044 ;
                                     0465  1045 ; ***
                                     0465  1046 ;
                                     0465  1047 ;	On Entry:
                                     0465  1048 ;
                                     0465  1049 ;		R1  = number of pages/blocks to add to cache
                                     0465  1050 ;		R5  = Cache driver UCB address
                                     0465  1051 ;		IPL = Cached disk driver's fork IPL
                                     0465  1052 ;
                                     0465  1053 ;	 returns:
                                     0465  1054 ;
                                     0465  1055 ;		R0  = Status:
                                     0465  1056 ;			SS$_NORMAL = success
                                     0465  1057 ;			SS$_INSFMEM = insufficient free memory or non-paged
                                     0465  1058 ;					pool for cache
                                     0465  1059 ;		R1 = number of pages actually added to cache
                                     0465  1060 ;
                                     0465  1061 ;		R9-R11 destroyed !!
                                     0465  1062 ;
                                     0465  1063 ;-
                                     0465  1064 ;	
                                     0465  1065 
                                     0465  1066 	ASSUME	UCB$L_CD_TAGSIZE+4 EQ UCB$L_CD_TAGADDR
                                     0465  1067 	ASSUME	TAG$L_LBN+4 EQ TAG$L_PFN
                                     0465  1068 	ASSUME	TAG$K_LENGTH EQ 8
                                     0465  1069 CD_EXTEND:
                       01DC 8F   BB  0465  1070 	PUSHR	#^M<R2,R3,R4,R6,R7,R8>	;; free registers
                            56   D4  0469  1071 	CLRL	R6			;; zero # pages added to cache
                       54   51   D0  046B  1072 	MOVL	R1,R4			;; copy number of pages to add to cache
                  51   013C C5   C0  046E  1073 	ADDL2	UCB$L_CD_CACHESIZE(R5),R1 ;; add current cache size to extent
                            51   D6  0473  1074 	INCL	R1			;; add one more tag for bookkeeping
                                     0475  1075 					;;  (depends on TAG$K_LENGTH >/= 4)
                       51   08   C4  0475  1076 	MULL2	#TAG$K_LENGTH,R1	;; determine # bytes req'd for tags
                  00F8 C5   51   D1  0478  1077 	CMPL	R1,UCB$L_CD_TAGSIZE(R5)	;; current tag block big enough ??
                            38   1B  047D  1078 	BLEQU	20$			;; branch if yes
                   00000000'GF   16  047F  1079 	JSB	G^EXE$ALONPAGVAR	;; else, allocate new/1st block for tags
                         77 50   E9  0485  1080 	BLBC	R0,29$			;; branch on error
             50   013C C5   08   C5  0488  1081 	MULL3	#TAG$K_LENGTH,UCB$L_CD_CACHESIZE(R5),R0
                                     048E  1082 					;; compute # bytes of tags to copy
                            22   13  048E  1083 	BEQL	19$			;; branch if none (1st time)
                       7E   51   7D  0490  1084 	MOVQ	R1,-(SP)		;; save R1/R2
                       7E   54   7D  0493  1085 	MOVQ	R4,-(SP)		;;  and R4/R5
             62   00FC D5   50   28  0496  1086 	MOVC3	R0,@UCB$L_CD_TAGADDR(R5),(R2) ;; copy tags to new block
                       54   8E   7D  049C  1087 	MOVQ	(SP)+,R4		;; recover R4/R5
                  50   00FC C5   D0  049F  1088 	MOVL	UCB$L_CD_TAGADDR(R5),R0	;; get address...
                  51   00F8 C5   D0  04A4  1089 	MOVL	UCB$L_CD_TAGSIZE(R5),R1	;;  and size of old tag block
                   00000000'GF   16  04A9  1090 	JSB	G^EXE$DEANONPGDSIZ	;; release block to free pool
                       51   8E   7D  04AF  1091 	MOVQ	(SP)+,R1		;; recover R1/R2
                                     04B2  1092 19$:
                  00F8 C5   51   7D  04B2  1093 	MOVQ	R1,UCB$L_CD_TAGSIZE(R5)	;; save size and start address of
                                     04B7  1094 					;;  new tag block
                                     04B7  1095 20$:	
                                     04B7  1096 	LOCK	lockname=MMG,-		;; assume we need this lock !?
                                     04B7  1097 		preserve=NO
         50   00000000'GF   54   C3  04CC  1098 	SUBL3	R4,G^SCH$GL_FREECNT,R0	;; compute # free pages after extend
              00000000'GF   50   D1  04D4  1099 	CMPL	R0,G^SGN$GL_FREELIM	;; will it drop too low ??
                            22   15  04DB  1100 	BLEQ	29$			;; branch if yes, abort operation
                                     04DD  1101 ;
                                     04DD  1102 ; *** Next check is adopted from code in VMS MEMORYALC module to check for
                                     04DD  1103 ;	depleting "fluid" pages
                                     04DD  1104 ;
              50   00000000'GF   3C  04DD  1105 	MOVZWL	G^MPW$GW_LOLIM,R0	;; get low limit on modified page list
              50   00000000'GF   C0  04E4  1106 	ADDL2	G^SGN$GL_FREELIM,R0	;; add in low limit on free page list
                       50   54   C0  04EB  1107 	ADDL2	R4,R0			;; add in pages to remove from free list
         50   00000000'GF   50   C3  04EE  1108 	SUBL3	R0,G^PFN$GL_PHYPGCNT,R0	;; compute fluid pages left over
              00000000'GF   50   D1  04F6  1109 	CMPL	R0,G^SGN$GL_MAXWSCNT	;; enough fluid pages for largest WS ??
                            02   14  04FD  1110 	BGTR	30$			;; branch if yes
                                     04FF  1111 29$:
                            61   11  04FF  1112 	BRB	50$			;; abort extend
                                     0501  1113 ;
                                     0501  1114 30$:
                  57   0134 C5   D0  0501  1115 	MOVL	UCB$L_CD_SETSIZE(R5),R7	;; pickup # blocks/set
             58   013C C5   08   C5  0506  1116 	MULL3	#TAG$K_LENGTH,UCB$L_CD_CACHESIZE(R5),R8
                                     050C  1117 					;; compute current # bytes of tags
                  58   00FC C5   C0  050C  1118 	ADDL2	UCB$L_CD_TAGADDR(R5),R8	;; point to end of tags
              59   00000000'GF   D0  0511  1119 	MOVL	G^PFN$AW_REFCNT,R9	;; get pointers into PFN data base
              5A   00000000'GF   D0  0518  1120 	MOVL	G^PFN$AB_STATE,R10
              5B   00000000'GF   D0  051F  1121 	MOVL	G^PFN$AB_TYPE,R11
                                     0526  1122 ;
                                     0526  1123 40$:
              88   FFFFFFFF 8F   D0  0526  1124 	MOVL	#-1,(R8)+		;; set dummy non-zero LBN
                   00000000'GF   16  052D  1125 	JSB	G^MMG$ALLOCPFN		;; get page from free page list
                                     0533  1126 					;;  (R2-R3 destroyed)
                       88   50   D0  0533  1127 	MOVL	R0,(R8)+		;; save PFN (flags byte clear)
                            2A   19  0536  1128 	BLSS	50$			;; branch on allocation failure
                                     0538  1129 ;
                                     0538  1130 ; *** Fill in the PFN data base.  PTE entry intentionally left 0 since
                                     0538  1131 ;	page is not mapped by PTE yet
                                     0538  1132 ;
                          6940   B6  0538  1133 	INCW	(R9)[R0]		;; increment page reference count
                     6A40   17   90  053B  1134 	MOVB	#<PFN$M_DELCON!PFN$C_ACTIVE>,(R10)[R0]
                                     053F  1135 					;; flag page "active & delete contents"
                     6B40   01   90  053F  1136 	MOVB	#1,(R11)[R0]		;; flag page as "system"
                   00000000'GF   D7  0543  1137 	DECL	G^PFN$GL_PHYPGCNT	;; show one less free page
                                     0549  1138 ;
                         DA 57   F5  0549  1139 	SOBGTR	R7,40$			;; loop to allocate 1 set of blocks
                       0138 C5   D6  054C  1140 	INCL	UCB$L_CD_SETCOUNT(R5)	;; show one more set allocated
                  57   0134 C5   D0  0550  1141 	MOVL	UCB$L_CD_SETSIZE(R5),R7	;; recover # blocks/set
                  013C C5   57   C0  0555  1142 	ADDL	R7,UCB$L_CD_CACHESIZE(R5) ;; add blocks allocated to cache size
                       56   57   C0  055A  1143 	ADDL	R7,R6			;; update blocks allocated
                       54   56   D1  055D  1144 	CMPL	R6,R4			;; satisfied request ??
                            C4   1F  0560  1145 	BLSSU	40$			;; branch if not
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  16
082092                          Extend Cache Memory                      26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0562  1146 ;
                                     0562  1147 50$:
             50   013C C5   08   C5  0562  1148 	MULL3	#TAG$K_LENGTH,UCB$L_CD_CACHESIZE(R5),R0
                                     0568  1149 					;; compute # bytes of tags
                            07   13  0568  1150 	BEQL	54$			;; branch if nothing allocated
                  50   00FC C5   C0  056A  1151 	ADDL	UCB$L_CD_TAGADDR(R5),R0	;; point to end of current tags
                            60   D4  056F  1152 	CLRL	(R0)			;; set guard word at end of tags
                                     0571  1153 54$:
                  50   0124 8F   3C  0571  1154 	MOVZWL	#SS$_INSFMEM,R0		;; assume failure
                       51   56   D0  0576  1155 	MOVL	R6,R1			;; recover # pages added to cache
                            07   13  0579  1156 	BEQL	59$			;; branch if nothing added
                                     057B  1157 ;
                                     057B  1158 ; *** Determine status of request...may want to add a "partial success" status
                                     057B  1159 ;	code for times when can't get all pages requested (i.e. R4 .NE. R1 --
                                     057B  1160 ;	should be rare)
                                     057B  1161 ;
                       50   01   3C  057B  1162 	MOVZWL	#SS$_NORMAL,R0		;; show success
                    50 A5   20   C8  057E  1163 	BISL	#UCB$M_CD_ALLOC,UCB$L_DEVDEPEND(R5)
                                     0582  1164 					;; set "cache allocated" flag
                                     0582  1165 59$:
                                     0582  1166 	UNLOCK	lockname=MMG,-		;; release lock !?
                                     0582  1167 		condition=RESTORE,-
                                     0582  1168 		preserve=NO
        50   10   10   013C C5   F0  0592  1169 	INSV	UCB$L_CD_CACHESIZE(R5),#16,#16,R0
                                     0599  1170 					;; return cache block size in status
                       01DC 8F   BA  0599  1171 	POPR	#^M<R2,R3,R4,R6,R7,R8>	;; recover rest of registers
                                 05  059D  1172 	RSB
                                     059E  1173 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  17
082092                          Delete Cache Tag and Data Structures     26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     059E  1175 	.sbttl	Delete Cache Tag and Data Structures
                                     059E  1176 ;
                                     059E  1177 ;+
                                     059E  1178 ;
                                     059E  1179 ; *** CD_DELETE -- Called to release all cache data blocks and tag
                                     059E  1180 ;	block.  The caller is responsible for insuring that all pending
                                     059E  1181 ;	references to the cache have been completed and that all future
                                     059E  1182 ;	modifications to the UCB are blocked until an IO$_SETMODE!IO$M_STARTUP
                                     059E  1183 ;	request is processed.
                                     059E  1184 ;
                                     059E  1185 ;
                                     059E  1186 ; ***
                                     059E  1187 ;
                                     059E  1188 ;	On Entry:
                                     059E  1189 ;
                                     059E  1190 ;		R5  = Address of cache driver UCB
                                     059E  1191 ;		IPL = Cached disk driver's fork IPL
                                     059E  1192 ;
                                     059E  1193 ;	 returns:
                                     059E  1194 ;
                                     059E  1195 ;		All cache data structures deleted
                                     059E  1196 ;
                                     059E  1197 ;		R0-R2, R9-R11 destroyed
                                     059E  1198 ;
                                     059E  1199 ;-
                                     059E  1200 
                                     059E  1201 CD_DELETE:
                 7F 50 A5   05   E5  059E  1202 	BBCC	#UCB$V_CD_ALLOC,UCB$L_DEVDEPEND(R5),29$
                                     05A3  1203 					;; drop "allocated" flag, abort call if
                                     05A3  1204 					;;  already deallocated
                            18   BB  05A3  1205 	PUSHR	#^M<R3,R4>		;; free registers
             54   00FC C5   04   C1  05A5  1206 	ADDL3	#TAG$L_PFN,UCB$L_CD_TAGADDR(R5),R4
                                     05AB  1207 					;; pickup addr of PFN field in 1st tag
                                     05AB  1208 	LOCK	lockname=MMG,-		;; assume we need this lock !?
                                     05AB  1209 		preserve=NO
              59   00000000'GF   D0  05C0  1210 	MOVL	G^PFN$AW_REFCNT,R9	;; get pointers into PFN data base
              5A   00000000'GF   D0  05C7  1211 	MOVL	G^PFN$AB_STATE,R10
              5B   00000000'GF   D0  05CE  1212 	MOVL	G^PFN$AL_PTE,R11
                                     05D5  1213 ;
                                     05D5  1214 ; *** Release each page from cache to front of free page list by virtue of
                                     05D5  1215 ;	"delete contents" flag being set in PFN STATE array
                                     05D5  1216 ;
                                     05D5  1217 10$:
             50   64   15   00   EF  05D5  1218 	EXTZV	#PTE$V_PFN,#PTE$S_PFN,(R4),R0
                                     05DA  1219 					;; pull PFN from tag block
                          6940   B4  05DA  1220 	CLRW	(R9)[R0]		;; clear reference count
                     6A40   17   90  05DD  1221 	MOVB	#<PFN$M_DELCON!PFN$C_ACTIVE>,(R10)[R0]
                                     05E1  1222 					;; flag page "active & delete contents"
                                     05E1  1223 					;;  (insures modify bit cleared)
                          6B40   D4  05E1  1224 	CLRL	(R11)[R0]		;; make sure PTE is 0
                   00000000'GF   16  05E4  1225 	JSB	G^MMG$RELPFN		;; release page to free page list
                                     05EA  1226 					;;  (R1-R3 destroyed !!)
                   00000000'GF   D6  05EA  1227 	INCL	G^PFN$GL_PHYPGCNT	;; show one more page available
                       54   08   C0  05F0  1228 	ADDL2	#TAG$K_LENGTH,R4	;; step to PFN in next tag block
                    DD 013C C5   F5  05F3  1229 	SOBGTR	UCB$L_CD_CACHESIZE(R5),10$ ;; loop til done
                                     05F8  1230 ;
                                     05F8  1231 	UNLOCK	lockname=MMG,-		;; release lock !?
                                     05F8  1232 		condition=RESTORE,-
                                     05F8  1233 		preserve=NO
                  50   00FC C5   D0  0608  1234 	MOVL	UCB$L_CD_TAGADDR(R5),R0	;; pickup address...
                  51   00F8 C5   D0  060D  1235 	MOVL	UCB$L_CD_TAGSIZE(R5),R1	;;  and size of tag block
                   00000000'GF   16  0612  1236 	JSB	G^EXE$DEANONPGDSIZ	;; release space to non-paged pool
                                     0618  1237 	ASSUME	UCB$L_CD_TAGSIZE+4 EQ UCB$L_CD_TAGADDR
                       00F8 C5   7C  0618  1238 	CLRQ	UCB$L_CD_TAGSIZE(R5)	;; clear misc UCB structures
                                     061C  1239 	ASSUME	UCB$L_CD_SETCOUNT+4 EQ UCB$L_CD_CACHESIZE
                       0138 C5   7C  061C  1240 	CLRQ	UCB$L_CD_SETCOUNT(R5)
                            18   BA  0620  1241 	POPR	#^M<R3,R4>		;; recover registers
                                     0622  1242 ;
                                     0622  1243 29$:
                                 05  0622  1244 	RSB
                                     0623  1245 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  18
082092                          Purge Cache Contents                     26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0623  1247 	.sbttl	Purge Cache Contents
                                     0623  1248 ;
                                     0623  1249 ;+
                                     0623  1250 ;
                                     0623  1251 ; *** CD_PURGE -- Called to purge/invalidate entire contents of disk
                                     0623  1252 ;	cache; processes IO$_SETMODE!IO$M_PURGE QIO funtion.
                                     0623  1253 ;	Invalidation of cache data simply involves clearing
                                     0623  1254 ;	the "valid" flag bit associated with the cache data buffer
                                     0623  1255 ;	PFN field and setting the cached logical block number to -1.
                                     0623  1256 ;
                                     0623  1257 ;	IPL must be raised to IPL$_QUEUEAST to reference/manipulate
                                     0623  1258 ;	the cache data structures.
                                     0623  1259 ;
                                     0623  1260 ; ***
                                     0623  1261 ;
                                     0623  1262 ;	On entry:
                                     0623  1263 ;
                                     0623  1264 ;		R5  = Address of cache driver's UCB
                                     0623  1265 ;		IPL >/= IPL$_QUEUAST
                                     0623  1266 ;
                                     0623  1267 ;	 returns:
                                     0623  1268 ;
                                     0623  1269 ;		R0 = status (always SS$_NORMAL)
                                     0623  1270 ;		R1 = destroyed, contents of cache invalidated
                                     0623  1271 ;
                                     0623  1272 ;-
                                     0623  1273 
                                     0623  1274 	ASSUME	TAG$L_LBN+4 EQ TAG$L_PFN
                                     0623  1275 	ASSUME	TAG$K_LENGTH EQ 8
                                     0623  1276 CD_PURGE:
                  50   00FC C5   D0  0623  1277 	MOVL	UCB$L_CD_TAGADDR(R5),R0	;; get address of tag block
                            14   13  0628  1278 	BEQL	8$			;; branch if undefined
                  51   013C C5   D0  062A  1279 	MOVL	UCB$L_CD_CACHESIZE(R5),R1 ;; get number of tags in cache
                                     062F  1280 4$:
              80   FFFFFFFF 8F   D0  062F  1281 	MOVL	#-1,(R0)+		;; set bogus non-zero LBN
                          03AB   30  0636  1282 	BSBW	CD_STATS		;; accum stats on cache block
                            80   D5  0639  1283 	TSTL	(R0)+			;; step over PFN
                         F1 51   F5  063B  1284 	SOBGTR	R1,4$			;;  and loop til done
                                     063E  1285 8$:
                       50   01   3C  063E  1286 	MOVZWL	#SS$_NORMAL,R0		;; setup return status
                                 05  0641  1287 	RSB
                                     0642  1288 ;
                                     0642  1289 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  19
082092                          Cache Driver Start I/O Entry Point       26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0642  1291 	.sbttl	Cache Driver Start I/O Entry Point
                                     0642  1292 ;
                                     0642  1293 ;+
                                     0642  1294 ;
                                     0642  1295 ; *** CD_STARTIO -- Called in handling IO$_READxBLK QIO requests for the
                                     0642  1296 ;	cache driver.  These requests allow a process to monitor all
                                     0642  1297 ;	direct I/O write operations (and read operations when IO$M_CD_RRD
                                     0642  1298 ;	specified) directed to the cached disk.  The user's buffer is
                                     0642  1299 ;	filled with records by CD_RECORD as each I/O is intercepted
                                     0642  1300 ;	by the cache driver.  As long as UCB$V_BSY remains set, it is
                                     0642  1301 ;	assumed there is a valid user buffer defined by UCB$L_SVAPTE/
                                     0642  1302 ;	UCB$W_BCNT.  I/O completes when the user's buffer is filled,
                                     0642  1303 ;	the I/O is cancelled (CD_CANCELIO), or the timeout interval
                                     0642  1304 ;	expires (CD_TIMEDIO).
                                     0642  1305 ;
                                     0642  1306 ;	I/O timeout is handled directly through a timer queue element
                                     0642  1307 ;	which is part of the cache driver UCB.  This facility allows
                                     0642  1308 ;	timed I/O with a resolution of +/- 10mSec rather than the
                                     0642  1309 ;	standard +/- 1Sec available through the normal driver services
                                     0642  1310 ;	(WFIKPCH/WFIRCH).
                                     0642  1311 ;
                                     0642  1312 ; ***
                                     0642  1313 ;
                                     0642  1314 ;	On entry:
                                     0642  1315 ;
                                     0642  1316 ;		R3  = IRP address
                                     0642  1317 ;		R5  = Cache driver UCB address
                                     0642  1318 ;		IPL = Cached disk driver's fork IPL
                                     0642  1319 ;
                                     0642  1320 ;-
                                     0642  1321 CD_STARTIO:
                                     0642  1322 	ASSUME	IPL$_TIMER EQ IPL$_SYNCH
                    50 A5   18   CA  0642  1323 	BICL	#UCB$M_CD_TIMED!UCB$M_CD_RRD,UCB$L_DEVDEPEND(R5)
                                     0646  1324 					;; clear all I/O request flags
                    52   38 A3   D0  0646  1325   	MOVL	IRP$L_MEDIA(R3),R2	;; pickup timeout interval
                            29   13  064A  1326 	BEQL	10$			;; branch if no timeout specified
              55   000000A4 8F   C0  064C  1327 	ADDL2	#UCB$T_CD_TQE,R5	;; point to TQE for timeout
                    10 A5   53   D0  0653  1328 	MOVL	R3,TQE$L_FR3(R5)	;; save IRP address in TQE
              50   00000000'GF   7D  0657  1329 	MOVQ	G^EXE$GQ_SYSTIME,R0	;; pickup current system time
                       50   52   C0  065E  1330 	ADDL2	R2,R0			;; compute quad-word expiration time
                       51   00   D8  0661  1331 	ADWC	#0,R1
                   00000000'GF   16  0664  1332 	JSB	G^EXE$INSTIMQ		;; insert TQE in timer queue
              55   000000A4 8F   C2  066A  1333 	SUBL2	#UCB$T_CD_TQE,R5	;; recover UCB address
                    50 A5   10   C8  0671  1334 	BISL	#UCB$M_CD_TIMED,UCB$L_DEVDEPEND(R5)
                                     0675  1335 					;; show timer active
                                     0675  1336 10$:
                 04 20 A3   06   E1  0675  1337 	BBC	#IO$V_CD_RRD,IRP$W_FUNC(R3),12$
                                     067A  1338 					;; branch if not recording read QIOs
                    50 A5   08   C8  067A  1339 	BISL	#UCB$M_CD_RRD,UCB$L_DEVDEPEND(R5)
                                     067E  1340 					;; enable recording of read QIOs
                                     067E  1341 12$:
                  008C C5   0C   C0  067E  1342 	ADDL2	#12,UCB$L_SVAPTE(R5)	;; point to start of system buffer
                                 05  0683  1343 	RSB				;; wait for I/O completion
                                     0684  1344 
                                     0684  1345 
                                     0684  1346 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  20
082092                          Cancel I/O Entry Point                   26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0684  1348 	.sbttl	Cancel I/O Entry Point
                                     0684  1349 ;
                                     0684  1350 ;+
                                     0684  1351 ;
                                     0684  1352 ; *** CD_CANCELIO -- Called to handle the device specific actions required
                                     0684  1353 ;	to terminate an active IO$_READxBLK request for the cache driver.
                                     0684  1354 ;
                                     0684  1355 ; ***
                                     0684  1356 ;
                                     0684  1357 ;	On Entry:
                                     0684  1358 ;
                                     0684  1359 ;		R2  = Channel index number
                                     0684  1360 ;		R3  = Address of current IRP
                                     0684  1361 ;		R4  = Address of PCB for current process
                                     0684  1362 ;		R5  = Cache driver's UCB address
                                     0684  1363 ;		R8  = Reason for cancel:
                                     0684  1364 ;			CAN$C_CANCEL = Call from $CANCEL or $DALLOC
                                     0684  1365 ;			CAN$C_DASSGN = Call from $DASSGN
                                     0684  1366 ;		IPL = Cached disk driver's fork IPL
                                     0684  1367 ;
                                     0684  1368 ;-
                                     0684  1369 CD_CANCELIO:
                 14 78 A5   08   E1  0684  1370 	BBC	#UCB$V_BSY,UCB$W_STS(R5),9$	;; branch if device is idle
                 60 A4   0C A3   D1  0689  1371 	CMPL	IRP$L_PID(R3),PCB$L_PID(R4)	;; PIDs match ??
                            0D   12  068E  1372 	BNEQ	9$				;; branch if not
                    28 A3   52   B1  0690  1373 	CMPW	R2,IRP$W_CHAN(R3)		;; same channel ??
                            07   12  0694  1374 	BNEQ	9$				;; branch if not
                  50   0830 8F   3C  0696  1375 	MOVZWL	#SS$_CANCEL,R0			;; setup completion status
                            4D   11  069B  1376 	BRB	CD_REQCOM			;; complete the request
                                     069D  1377 9$:
                                 05  069D  1378 	RSB
                                     069E  1379 
                                     069E  1380 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  21
082092                          Timeout Entry Point                      26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     069E  1382 	.sbttl	Timeout Entry Point
                                     069E  1383 ;
                                     069E  1384 ;+
                                     069E  1385 ;
                                     069E  1386 ; *** CD_TIMEDIO -- Called to terminate an active IO$_READxBLK request
                                     069E  1387 ;	after the time interval specified with the IO$M_TIMED subfunction
                                     069E  1388 ;	bit has elapsed.
                                     069E  1389 ;
                                     069E  1390 ; ***
                                     069E  1391 ;
                                     069E  1392 ;	On entry:
                                     069E  1393 ;
                                     069E  1394 ;		R3  = IRP address
                                     069E  1395 ;		R5  = Address of TQE in cache driver's UCB
                                     069E  1396 ;		IPL = IPL$_TIMER (must be = IPL$_SYNCH)
                                     069E  1397 ;
                                     069E  1398 ;-
                                     069E  1399 CD_TIMEDIO:
              55   000000A4 8F   C2  069E  1400 	SUBL2	#UCB$T_CD_TQE,R5	; point R5 to start of UCB
                                     06A5  1401 	FORKLOCK lock=UCB$B_FLCK(R5),-	; grab cache driver's fork spin lock
                                     06A5  1402 		 savipl=-(SP),-
                                     06A5  1403 		 preserve=NO
                    50 A5   10   CA  06C3  1404 	BICL	#UCB$M_CD_TIMED,UCB$L_DEVDEPEND(R5)
                                     06C7  1405 					;; show timer expired
                  50   022C 8F   3C  06C7  1406 	MOVZWL	#SS$_TIMEOUT,R0		;; setup completion status
                            1C   10  06CC  1407 	BSBB	CD_REQCOM		;; complete the I/O
                                     06CE  1408 	FORKUNLOCK lock=UCB$B_FLCK(R5),- ;; release driver's fork spin lock
                                     06CE  1409 		   newipl=(SP)+,-
                                     06CE  1410 		   preserve=NO
              55   000000A4 8F   C0  06E2  1411 	ADDL2	#UCB$T_CD_TQE,R5	; point to TQE again
                                 05  06E9  1412 	RSB				; return to EXE$SWTIMINT
                                     06EA  1413 
                                     06EA  1414 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  22
082092                          READxBLK Completion Handler              26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     06EA  1416 	.sbttl	READxBLK Completion Handler
                                     06EA  1417 ;
                                     06EA  1418 ;+
                                     06EA  1419 ;
                                     06EA  1420 ; *** CD_REQCOM -- Called to force completion of the current active
                                     06EA  1421 ;	IO$_READxBLK request.  Any active timer queue element must be
                                     06EA  1422 ;	removed from the timer's queue, the number of bytes to be
                                     06EA  1423 ;	transferred from the system buffer to user's read buffer must
                                     06EA  1424 ;	be computed, and the I/O packet is queued for standard VAX/VMS
                                     06EA  1425 ;	I/O post-processing.
                                     06EA  1426 ;
                                     06EA  1427 ; ***
                                     06EA  1428 ;
                                     06EA  1429 ;	On Entry:
                                     06EA  1430 ;
                                     06EA  1431 ;		R3  = IRP Address
                                     06EA  1432 ;		R5  = Cache driver UCB address
                                     06EA  1433 ;		IPL = Cached disk driver's fork IPL
                                     06EA  1434 ;
                                     06EA  1435 ;
                                     06EA  1436 CD_REQCOM:
                 34 50 A5   04   E5  06EA  1437 	BBCC	#UCB$V_CD_TIMED,UCB$L_DEVDEPEND(R5),2$
                                     06EF  1438 					;; branch if timer inactive
                                     06EF  1439 	LOCK	lockname=TIMER,-	;; grab timer spin lock
                                     06EF  1440 		preserve=YES
                  51   00A4 C5   0F  0709  1441 	REMQUE	UCB$T_CD_TQE+TQE$L_TQFL(R5),R1
                                     070E  1442 					;; pull entry from timer queue
                                     070E  1443 	UNLOCK	lockname=TIMER,-	;; release timer spin lock
                                     070E  1444 		condition=RESTORE,-
                                     070E  1445 		preserve=YES
                                     0723  1446 2$:
          51   008C C5   2C B3   C3  0723  1447 	SUBL3	@IRP$L_SVAPTE(R3),UCB$L_SVAPTE(R5),R1
                                     072A  1448 					;; compute number of bytes in buffer	
                    32 A3   51   B0  072A  1449 	MOVW	R1,IRP$W_BCNT(R3)	;; set number of bytes to copy
             50   10   10   51   F0  072E  1450 	INSV	R1,#16,#16,R0		;; OR byte count with status
                            51   D4  0733  1451 	CLRL	R1			;; zero 2nd status long-word
                                     0735  1452 	REQCOM				;; finish I/O
                                     073B  1453 
                                     073B  1454 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  23
082092                          Record Direct I/O Operations in User Buf 26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     073B  1456 	.sbttl	Record Direct I/O Operations in User Buffer
                                     073B  1457 ;
                                     073B  1458 ;+
                                     073B  1459 ;
                                     073B  1460 ; *** CD_RECORD -- Inserts pertinent information regarding direct I/O
                                     073B  1461 ;	operations directed to the cached disk driver.  Two forms
                                     073B  1462 ;	of records are written sequentially to the user's buffer until
                                     073B  1463 ;	the buffer is filled, a user specified time period has elapsed,
                                     073B  1464 ;	or the I/O is cancelled:
                                     073B  1465 ;
                                     073B  1466 ;	 Logical or Physical I/O:
                                     073B  1467 ;
                                     073B  1468 ;		+-------+-------+-------+-------+  0
                                     073B  1469 ;		|   IRP$W_STS   |   IRP$W_FUNC  |
                                     073B  1470 ;		+-------+-------+-------+-------+  4
                                     073B  1471 ;		|    Starting Logical Block     | 
                                     073B  1472 ;		+-------+-------+-------+-------+  8
                                     073B  1473 ;		|     Transfer Block Count      |
                                     073B  1474 ;		+-------+-------+-------+-------+ 12
                                     073B  1475 ;		|        Requestor's PID        |
                                     073B  1476 ;		+-------+-------+-------+-------+ 16
                                     073B  1477 ;
                                     073B  1478 ;	 Virtual I/O:
                                     073B  1479 ;
                                     073B  1480 ;		+-------+-------+-------+-------+  0
                                     073B  1481 ;		|   IRP$W_STS   |   IRP$W_FUNC  |
                                     073B  1482 ;		+-------+-------+-------+-------+  4
                                     073B  1483 ;		|    Starting Logical Block     | 
                                     073B  1484 ;		+-------+-------+-------+-------+  8
                                     073B  1485 ;		|     Transfer Block Count      |
                                     073B  1486 ;		+-------+-------+-------+-------+ 12
                                     073B  1487 ;		|        Requestor's PID        |
                                     073B  1488 ;		+-------+-------+-------+-------+ 16
                                     073B  1489 ;		|    Starting Virtual Block     |
                                     073B  1490 ;		+-------+-------+-------+-------+ 20
                                     073B  1491 ;		|Sequence number|  File number  |
                                     073B  1492 ;		+-------+-------+-------+-------+ 24
                                     073B  1493 ;		| Segmented I/O | Rel Vol number|
                                     073B  1494 ;		+-------+-------+-------+-------+ 28
                                     073B  1495 ;
                                     073B  1496 ; ***
                                     073B  1497 ;
                                     073B  1498 ;	On entry:
                                     073B  1499 ;
                                     073B  1500 ;		 R1 = starting LBN
                                     073B  1501 ;		 R2 = # blocks to transfer (rounded up)
                                     073B  1502 ;		 R3 = IRP address
                                     073B  1503 ;		 R4 = I/O function code
                                     073B  1504 ;		 R5 = cache driver UCB address
                                     073B  1505 ;		 IPL = Cached disk driver's fork IPL
                                     073B  1506 ;
                                     073B  1507 ;-
                                     073B  1508 CD_RECORD:
                 65 78 A5   08   E1  073B  1509 	BBC	#UCB$V_BSY,UCB$W_STS(R5),29$
                                     0740  1510 					;; branch if no active IO$_READxBLK
                            51   DD  0740  1511 	PUSHL	R1			;; free R1
                  50   008C C5   D0  0742  1512 	MOVL	UCB$L_SVAPTE(R5),R0	;; pickup system buffer address
                  0092 C5   10   A2  0747  1513 	SUBW	#16,UCB$W_BCNT(R5)	;; adjust bytes count for next fields
                    80   20 A3   B0  074C  1514 	MOVW	IRP$W_FUNC(R3),(R0)+	;; save I/O function
                    80   2A A3   B0  0750  1515 	MOVW	IRP$W_STS(R3),(R0)+	;;  and status flags
                       80   51   7D  0754  1516 	MOVQ	R1,(R0)+		;; save starting LBN/block_count
                    80   0C A3   D0  0757  1517 	MOVL	IRP$L_PID(R3),(R0)+	;; save PID
                 28 2A A3   04   E1  075B  1518 	BBC	#IRP$V_VIRTUAL,IRP$W_STS(R3),20$
                                     0760  1519 					;; branch if not virtual I/O
                  0092 C5   0C   A2  0760  1520 	SUBW	#12,UCB$W_BCNT(R5)	;; adjust bytes count for next fields
                    80   48 A3   D0  0765  1521 	MOVL	IRP$L_SEGVBN(R3),(R0)+	;; save starting VBN
                            60   7C  0769  1522 	CLRQ	(R0)			;; clear file-id
                    51   18 A3   D0  076B  1523 	MOVL	IRP$L_WIND(R3),R1	;; pickup WCB address
                            17   13  076F  1524 	BEQL	20$			;; branch if undefined
                    51   18 A1   D0  0771  1525 	MOVL	WCB$L_FCB(R1),R1	;; pickup FCB address
                            11   13  0775  1526 	BEQL	20$			;; branch if undefined
                    80   24 A1   7D  0777  1527 	MOVQ	FCB$W_FID_NUM(R1),(R0)+	;; save 3-word file-id
                         FE A0   B4  077B  1528 	CLRW	-2(R0)			;; zero segmented I/O flag
                 44 A3   32 A3   D1  077E  1529 	CMPL	IRP$L_BCNT(R3),IRP$L_OBCNT(R3)
                                     0783  1530 					;; segmented I/O ??
                            03   13  0783  1531 	BEQL	20$			;; branch if not
                         FE A0   B7  0785  1532 	DECW	-2(R0)			;; set segmented I/O flag true
                                     0788  1533 20$:						
                  008C C5   50   D0  0788  1534 	MOVL	R0,UCB$L_SVAPTE(R5)	;; update buffer address
                  1C   0092 C5   B1  078D  1535 	CMPW	UCB$W_BCNT(R5),#CD_MAXRECL ;; enough left for biggest record ??
                            0E   1E  0792  1536 	BGEQU	28$			;; branch if yes
                            3C   BB  0794  1537 	PUSHR	#^M<R2,R3,R4,R5>	;; save registers
                       50   01   3C  0796  1538 	MOVZWL	#SS$_NORMAL,R0		;; setup completion status
                    53   6C A5   D0  0799  1539 	MOVL	UCB$L_IRP(R5),R3	;; reload R3 with READxBLK IRP addr
                          FF4A   30  079D  1540 	BSBW	CD_REQCOM		;; finish out request
                            3C   BA  07A0  1541 	POPR	#^M<R2,R3,R4,R5>	;; recover registers
                                     07A2  1542 28$:
                       51   8E   D0  07A2  1543 	MOVL	(SP)+,R1		;; recover R1
                                     07A5  1544 ;
                                     07A5  1545 29$:
                                 05  07A5  1546 	RSB
                                     07A6  1547 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  24
082092                          Cache Driver Alternate Start I/O Entry P 26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     07A6  1549 	.sbttl	Cache Driver Alternate Start I/O Entry Point
                                     07A6  1550 ;
                                     07A6  1551 ;+
                                     07A6  1552 ;
                                     07A6  1553 ; *** CD_ALTSTARTIO -- Called to initiate an I/O request for the cached
                                     07A6  1554 ;	disk's driver.  The driver dispatch table of the driver for the
                                     07A6  1555 ;	disk being cached is altered to point to this routine while
                                     07A6  1556 ;	the cache driver is active (UCB$V_CD_ACTIVE bit set).  All
                                     07A6  1557 ;	I/O requests for all (!!) units attached to that controller
                                     07A6  1558 ;	will enter here.  So, appropriate checks must be made to only
                                     07A6  1559 ;	allow those requests for the unit being cached to be acted
                                     07A6  1560 ;	on by the cache driver and redirect all other requests back
                                     07A6  1561 ;	to the disk driver's start I/O routine.
                                     07A6  1562 ;
                                     07A6  1563 ;	The cache driver only operates on direct I/O's; all
                                     07A6  1564 ;	buffered I/O functions are immediately dispatched back to the
                                     07A6  1565 ;	disk driver.  Direct I/O functions are evaluated to determine
                                     07A6  1566 ;	if the cache driver should get involved in the transfer.
                                     07A6  1567 ;	The action to be taken for the request depends if the request
                                     07A6  1568 ;	is a read or write data function.
                                     07A6  1569 ;
                                     07A6  1570 ;	The logical blocks specified in a read transfer are checked against
                                     07A6  1571 ;	the cache contents, and, if the entire range of blocks to be
                                     07A6  1572 ;	transferred is cached, the request can be satisfied without invoking
                                     07A6  1573 ;	the disk driver.  If any data is required from disk, the I/O request
                                     07A6  1574 ;	is dispatched to the disk driver after saving pertinent information
                                     07A6  1575 ;	from the IRP in a "pending I/O identification block" (PIB) and altering
                                     07A6  1576 ;	the IRP$L_PID field to force the VMS I/O post-processing routine
                                     07A6  1577 ;	to reenter the cache driver at CD_IOPOST.  CD_IOPOST is responsible
                                     07A6  1578 ;	for loading the data read from disk into the cache to complete the
                                     07A6  1579 ;	operation.
                                     07A6  1580 ;
                                     07A6  1581 ;	One of three actions are possible when handling write requests.
                                     07A6  1582 ;	First, if any data within the range of the write request is cached,
                                     07A6  1583 ;	it may be invalidated to force a read from disk whenever it is
                                     07A6  1584 ;	needed again.  Second, the data written to any blocks currently
                                     07A6  1585 ;	cached may be updated with the new information.  Finally, the cache
                                     07A6  1586 ;	can be loaded with the data being written to disk.  The decision
                                     07A6  1587 ;	as to which method should be used is controlled by the IO$M_FLUSH
                                     07A6  1588 ;	and IO$M_LOAD modifiers specified when the cache is initialized via
                                     07A6  1589 ;	the IO$_SETMODE function.  If IO$M_FLUSH was specified, all writes
                                     07A6  1590 ;	to disk force invalidation of any cached data.  If IO$M_LOAD was
                                     07A6  1591 ;	specified, the entire write operation is loaded into cache.
                                     07A6  1592 ;	By default, only those blocks currently cached will be reloaded
                                     07A6  1593 ;	with the data being written to disk.  Whenever data is loaded into
                                     07A6  1594 ;	cache, the I/O completion status must be checked to insure that the data
                                     07A6  1595 ;	was written successfully.  This is accomplished in the same manner
                                     07A6  1596 ;	employed for read operations: a PIB is allocated for the request and
                                     07A6  1597 ;	the IRP$L_PID field is altered to reenter the cache driver
                                     07A6  1598 ;	at CD_IOPOST on completion of the I/O which will load the cache.
                                     07A6  1599 ;
                                     07A6  1600 ; ***
                                     07A6  1601 ;
                                     07A6  1602 ;	On Entry:
                                     07A6  1603 ;
                                     07A6  1604 ;		R3  = Address of I/O request packet
                                     07A6  1605 ;		R5  = Disk driver's UCB address
                                     07A6  1606 ;		IPL = Cached disk driver's fork IPL
                                     07A6  1607 ;
                                     07A6  1608 ;
                                     07A6  1609 ;-
                                     07A6  1610 ;
                                     07A6  1611 	.enable LSB
                                     07A6  1612 ;
                                     07A6  1613 99$:
                                     07A6  1614 ;
                                     07A6  1615 ;  The intent is to never get here, but if we do we want to find out.
                                     07A6  1616 ;  If we don't crash here, we will crash within a short time anyway
                                     07A6  1617 ;  so lets crash is a way that is easy to find.  This originally
                                     07A6  1618 ;  was just the HALT.  On the VAXStation 3100, this resulted in a 
                                     07A6  1619 ;  reboot without producing a crash dump.  I want a dump when the
                                     07A6  1620 ;  system crashes.  Accessing a non-existant S1 page works fine on
                                     07A6  1621 ;  a VAXStation 3100.
                                     07A6  1622 ;
                                     07A6  1623 ;*	BUG_CHECK
                                     07A6  1624 
                   FFFFFFFF 9F   D5  07A6  1625 	TSTL	@#-1			;; Access non-existant S1 page
                                 00  07AC  1626 	HALT
                                     07AD  1627 ;
                                     07AD  1628 CD_ALTSTARTIO:
                    50   F6 AF   DE  07AD  1629 	MOVAL	99$,R0			;; setup fatal return address
                  54   F8CB CF   D0  07B1  1630 	MOVL	UCB,R4			;; get 1st cache driver UCB address
                                     07B6  1631 
                                     07B6  1632 .iif df dbg_cnt, INCL SIO_OPS		;; increment times visited
                                     07B6  1633 
                                     07B6  1634 2$:
             0114 C4   009C C5   D1  07B6  1635 	CMPL	UCB$L_DDT(R5),UCB$L_CD_DSKDDT(R4)
                                     07BD  1636 					;; caching some unit for disk driver ??
                            0B   12  07BD  1637 	BNEQ	7$			;; branch if not
                  50   0110 C4   D0  07BF  1638 	MOVL	UCB$L_CD_DSKSTARTIO(R4),R0
                                     07C4  1639 					;; save disk's start_io entry point
                    54 A4   55   D1  07C4  1640 	CMPL	R5,UCB$L_CD_DSKUCB(R4)	;; is this specific unit being cached ??
                            08   13  07C8  1641 	BEQL	10$			;; branch if yes
                                     07CA  1642 7$:
                    54   34 A4   D0  07CA  1643 	MOVL	UCB$L_LINK(R4),R4	;; step to next UCB
                            E6   12  07CE  1644 	BNEQ	2$			;; branch if defined, check it
                                     07D0  1645 9$:
                                     07D0  1646 
                                     07D0  1647 .iif df dbg_cnt, INCL SIO_IGN		;; increment times the driver skipped
                                     07D0  1648 .iif df dbg_hlt, TSTL R0		;;   sanity check, should be S0 address
                                     07D0  1649 .iif df dbg_hlt, BGEQ 99$		;;   if P0 or P1 stop NOW!
                                     07D0  1650 
                            60   17  07D0  1651 	JMP	(R0)			;; return control to disk driver
                                     07D2  1652 
                                     07D2  1653 10$:
                                     07D2  1654 
                                     07D2  1655 .if ndf CD_RECORD_ALL
                                     07D2  1656 
                                     07D2  1657 ;  Note that we will still pass any buffered I/O functions directly to the
                                     07D2  1658 ;  real driver, however, if we are recording everything, we need to do 
                                     07D2  1659 ;  some more stuff before we can dismiss this IRP.  
                                     07D2  1660 
                                     07D2  1661 	BBS	#IRP$V_BUFIO,IRP$W_STS(R3),9$
                                     07D2  1662 					;; ignore all buffered I/Os
                                     07D2  1663 .endc
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  25
082092                          Cache Driver Alternate Start I/O Entry P 26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     07D2  1664 
                 09 2A A3   08   E0  07D2  1665 	BBS	#IRP$V_PHYSIO,IRP$W_STS(R3),14$
                                     07D7  1666 					;; branch if physical I/O, recover LBN
                    51   38 A3   D0  07D7  1667 	MOVL	IRP$L_MEDIA(R3),R1	;; pickup LBN from IRP
                 20 7C A5   02   E0  07DB  1668 	BBS	#UCB$V_NOCNVRT,UCB$W_DEVSTS(R5),24$
                                     07E0  1669 					;; branch if FDT did not convert LBN
                                     07E0  1670 ;
                                     07E0  1671 ; *** Regenerate disk LBN from cylinder/track/sector
                                     07E0  1672 ;
                                     07E0  1673 14$:
                    50   51 A5   9A  07E0  1674 	MOVZBL	UCB$B_TRACKS(R5),R0	;; get tracks/cylinder
                    51   3A A3   3C  07E4  1675 	MOVZWL	IRP$L_MEDIA+2(R3),R1	;; get cylinder number
                       51   50   C4  07E8  1676 	MULL2	R0,R1			;; multiply by tracks/cylinder
                    50   39 A3   9A  07EB  1677 	MOVZBL	IRP$L_MEDIA+1(R3),R0	;; get track number
                       51   50   C0  07EF  1678 	ADDL2	R0,R1			;; accumulate tracks
                    50   50 A5   9A  07F2  1679 	MOVZBL	UCB$B_SECTORS(R5),R0	;; get sectors/track
                       51   50   C4  07F6  1680 	MULL2	R0,R1			;; multiply by sectors/track
                    50   38 A3   9A  07F9  1681 	MOVZBL	IRP$L_MEDIA(R3),R0	;; get sector number
                       51   50   C0  07FD  1682 	ADDL2	R0,R1			;; accumulate sectors
                                     0800  1683 ;
                                     0800  1684 ; *** Compute number of blocks being transferred, and diverge for
                                     0800  1685 ;	read or write function processing.
                                     0800  1686 ;
                                     0800  1687 24$:
      52   32 A3   000001FF 8F   C1  0800  1688 	ADDL3	#^X1FF,IRP$L_BCNT(R3),R2 ;; compute # blocks to read/write
               52   52   F7 8F   78  0809  1689 	ASHL	#-9,R2,R2		;;   (rounded up)
                       55   54   D0  080E  1690 	MOVL	R4,R5			;; point R5 to cache driver UCB
          54   20 A3   06   00   EF  0811  1691 	EXTZV	#IRP$V_FCODE,#IRP$S_FCODE,IRP$W_FUNC(R3),R4
                                     0817  1692 					;; extract I/O function code
                                     0817  1693 
                                     0817  1694 .if df CD_RECORD_ALL
                                     0817  1695 
                                     0817  1696 ;  Now if we were recording everything, and this was a buffered I/O, 
                                     0817  1697 ;  we have to restore driver context and return to the real driver.
                                     0817  1698 
                          FF21   30  0817  1699 	BSBW CD_RECORD	;; record operation in user buffer
                 03 2A A3   00   E1  081A  1700 	BBC	#IRP$V_BUFIO,IRP$W_STS(R3),25$
                                     081F  1701 					;; ignore all buffered I/Os
                          00C7   31  081F  1702 	BRW	CD_RETURN		;; restore disk context and 
                                     0822  1703 					;;  let the original driver
                                     0822  1704 					;;  handle it.
                                     0822  1705 25$:
                                     0822  1706 .endc
                                     0822  1707 
                 12 2A A3   01   E0  0822  1708 	BBS	#IRP$V_FUNC,IRP$W_STS(R3),READ
                                     0827  1709 					;; branch if read function
                 50 2A A3   0E   E1  0827  1710 	BBC	#IRP$V_SRVIO,IRP$W_STS(R3),WRITE ;; if not from MSCP server 
                                     082C  1711 					;; assume it is a write
                                     082C  1712 ; JLP001   Jon Pinkley
                                     082C  1713 ; if we get here, it is an I/O that was generated by the MSCP server.
                                     082C  1714 ; In the cases I have seen, the IRP$W_STS field never had the IRP$V_FUNC
                                     082C  1715 ; bit set, so it could not be counted on to differentiate read and write
                                     082C  1716 ; I/O.  Also, it appears that all the I/O from the server appears as 
                                     082C  1717 ; Physical I/O function codes, without the IRP$V_PHYSIO bit set, and the 
                                     082C  1718 ; MEDIA field has LBN's in it.  This allowed the old CDDRIVER to work 
                                     082C  1719 ; with served devices, although the counters were counting all server 
                                     082C  1720 ; I/O's as writes.  Since the caching driver thought the I/O's were
                                     082C  1721 ; writes, no attempt was made to get data from the cache, and therefore
                                     082C  1722 ; all I/O from a client resulted in real disk I/O operations.
                                     082C  1723 ; Also note that the virtual I/O functions have already been handled by
                                     082C  1724 ; the client FDT routines, so srvio operations will never be for Virtual 
                                     082C  1725 ; I/O.  I am not sure about paging and swapping I/O from a client.
                                     082C  1726 
                                     082C  1727 .iif df DBG_CNT, INCL SIO_SRV		;; increment server io ops
                                     082C  1728 
                       0C   54   D1  082C  1729 	CMPL	R4, #IO$_READPBLK	;; check for a served read
                            08   13  082F  1730 	BEQL	READ			;;  and do the right thing
                       0B   54   D1  0831  1731 	CMPL	R4, #IO$_WRITEPBLK	;; check for a served write
                            46   13  0834  1732 	BEQL	WRITE			;;  and treat it as a write
                          00B0   31  0836  1733 	BRW	CD_RETURN		;; otherwise let the original
                                     0839  1734 					;;  driver handle it
                                     0839  1735 	
                                     0839  1736 	.disable LSB
                                     0839  1737 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  26
082092                          Cache Driver Alternate Start I/O Entry P 26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0839  1739 ;
                                     0839  1740 ; *** Handle read functions.  Two classes of direct read I/O operations are
                                     0839  1741 ;	recognized:
                                     0839  1742 ;
                                     0839  1743 ;		1) IO$_READxBLK functions
                                     0839  1744 ;		2) All others
                                     0839  1745 ;
                                     0839  1746 ;	The second case (IO$_READHEAD, etc.) is handled by simply returning
                                     0839  1747 ;	control to the disk driver.  The first case may be subdivided into
                                     0839  1748 ;	"normal" reads and paging or swapping reads.  Dependent on the
                                     0839  1749 ;	option selected when the cache was initialized, paging and swapping
                                     0839  1750 ;	I/O may be ignored (default action) since reading the same block(s)
                                     0839  1751 ;	more than once with this type of operation should be relatively
                                     0839  1752 ;	infrequent and not benefit from caching.
                                     0839  1753 ;
                                     0839  1754 ;	For normal read transfer requests, the cache driver attempts to
                                     0839  1755 ;	either read all data from the cache, or pass control to the disk
                                     0839  1756 ;	driver to read the data which can then be loaded into the cache
                                     0839  1757 ;	on I/O completion.  If the entire request can be resolved from
                                     0839  1758 ;	the contents of the cache, the user's buffer is filled from the
                                     0839  1759 ;	cache and the I/O is completed without intervention from the disk
                                     0839  1760 ;	driver.
                                     0839  1761 ;
                                     0839  1762 ;	When any portion of a read transfer is not cached, the entire
                                     0839  1763 ;	transfer operation is passed back to the disk driver.  The
                                     0839  1764 ;	reasoning behind this action was,
                                     0839  1765 ;
                                     0839  1766 ;		o A disk read must be performed for at least that
                                     0839  1767 ;		  portion of data not cached anyway
                                     0839  1768 ;		o Most transfers are small (<10 blocks) such that
                                     0839  1769 ;		  disk seek time >> data transfer time
                                     0839  1770 ;		o Data transfers from disk are DMA requiring no
                                     0839  1771 ;		  CPU cycles whereas copying data from cache does
                                     0839  1772 ;
                                     0839  1773 ;	Prior to returning control to the disk driver, the IRP$L_PID field and
                                     0839  1774 ;	starting LBN are saved in a "pending I/O identification block" (PIB),
                                     0839  1775 ;	and the IRP$L_PID field is reset to force IOC$IOPOST to call the cache
                                     0839  1776 ;	driver back at CD_IOPOST on completion of the operation.
                                     0839  1777 ;
                                     0839  1778 ; ***
                                     0839  1779 ;
                                     0839  1780 ;	On entry:
                                     0839  1781 ;
                                     0839  1782 ;		 R1 = starting LBN
                                     0839  1783 ;		 R2 = # blocks to transfer (rounded up)
                                     0839  1784 ;		 R3 = IRP address
                                     0839  1785 ;		 R4 = I/O function code
                                     0839  1786 ;		 R5 = cache driver UCB address
                                     0839  1787 ;		 IPL = Cached disk driver's fork IPL
                                     0839  1788 ;
                                     0839  1789 READ:
                                     0839  1790 
                                     0839  1791 .iif df DBG_CNT, INCL SIO_R	;; increment read ops in cdriver
                                     0839  1792 .iif ndf CD_RECORD_ALL, BSBW CD_RECORD	;; record operation in user buffer
                                     0839  1793 
                       0C   54   D1  0839  1794 	CMPL	R4,#IO$_READPBLK	;; read data request ??
                            3B   12  083C  1795 	BNEQ	19$			;; branch if not, ignore it
               2A A3   0044 8F   B3  083E  1796 	BITW	#IRP$M_SWAPIO!IRP$M_PAGIO,IRP$W_STS(R3)
                                     0844  1797 					;; swapping or paging I/O ??
                            05   13  0844  1798 	BEQL	6$			;; branch if not, cache it
                 2E 50 A5   02   E1  0846  1799 	BBC	#UCB$V_CD_PAGSWAPIO,UCB$L_DEVDEPEND(R5),19$
                                     084B  1800 					;; branch if not caching page/swap I/O
                                     084B  1801 6$:
                       0140 C5   D6  084B  1802 	INCL	UCB$L_CD_RDCNT(R5)	;; increment # reads processed
                  0144 C5   52   C0  084F  1803 	ADDL2	R2,UCB$L_CD_RDBLK(R5)	;; accumulate # blocks read
                 20 50 A5   05   E1  0854  1804 	BBC	#UCB$V_CD_ALLOC,UCB$L_DEVDEPEND(R5),19$
                                     0859  1805 					;; branch if no cache allocated
                       54   52   D0  0859  1806 	MOVL	R2,R4			;; save read block count
                          01D2   30  085C  1807 	BSBW	CD_CHECK		;; check for blocks in cache
                       54   52   D1  085F  1808 	CMPL	R2,R4			;; # blks in cache = # blks to read ??
                            3A   12  0862  1809 	BNEQ	CD_RECALL		;; branch if not, back to disk driver
                  0150 C5   52   C0  0864  1810 	ADDL2	R2,UCB$L_CD_RDHIT(R5)	;; count # cache hits
                          02D1   30  0869  1811 	BSBW	CD_READ			;; load user's buffer from cache
                         2F 50   E9  086C  1812 	BLBC	R0,CD_RECALL		;; branch on error, back to disk driver
                    55   54 A5   D0  086F  1813 	MOVL	UCB$L_CD_DSKUCB(R5),R5	;; switch back to disk driver's UCB
                                     0873  1814 	REQCOM				;;  and complete the request
                                     0879  1815 ;
                                     0879  1816 19$:
                          006D   31  0879  1817 	BRW	CD_RETURN		;; pass control back to disk driver
                                     087C  1818 
                                     087C  1819 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  27
082092                          Cache Driver Alternate Start I/O Entry P 26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     087C  1821 ;
                                     087C  1822 ; *** Handle write functions.  Three classes of disk write operations
                                     087C  1823 ;	are recognized:
                                     087C  1824 ;
                                     087C  1825 ;		1) IO$_WRITExBLK functions
                                     087C  1826 ;		2) IO$_WRITECHECK
                                     087C  1827 ;		3) All others
                                     087C  1828 ;
                                     087C  1829 ;	Handling of the third case is simple: any cached data is invalidated.
                                     087C  1830 ;	The relative frequency and type of these requests is unknown, but
                                     087C  1831 ;	it is most likely a small fraction of the total write requests.  The
                                     087C  1832 ;	function seen most often is IO$_DSE (data storage erase) presumably
                                     087C  1833 ;	issued by the XQP/ACP as a file is extended.
                                     087C  1834 ;
                                     087C  1835 ;	The write-check function is also assumed to be relatively infrequent
                                     087C  1836 ;	and closely associated with a IO$_WRITExBLK request.  The cache
                                     087C  1837 ;	driver is only concerned with the completion status of these
                                     087C  1838 ;	requests since an I/O error would indicate a serious discrepency
                                     087C  1839 ;	in the contents of the disk.
                                     087C  1840 ;
                                     087C  1841 ;	Handling of IO$_WRITExBLK requests is modified by the UCB$V_CD_FLUSH
                                     087C  1842 ;	and UCB$V_CD_LOAD flags defined when the cache was initialized
                                     087C  1843 ;	(IO$M_CD_FLUSH or IO$M_CD_LOAD IO$_SETMODE modifiers).  If
                                     087C  1844 ;	UCB$V_CD_FLUSH has been set, all writes to the disk invalidate any
                                     087C  1845 ;	cached data and the data written is NOT loaded into the cache,
                                     087C  1846 ;	ie. handled identically to the third condition.  Invalidating
                                     087C  1847 ;	any cached data is also done when performing pageing or swapping
                                     087C  1848 ;	I/O and the UCB$V_CD_PAGSWAPIO flag is cleared (disables caching
                                     087C  1849 ;	of page/swap operations).
                                     087C  1850 ;
                                     087C  1851 ;	With UCB$V_CD_FLUSH cleared, data from the user's buffer will be
                                     087C  1852 ;	loaded into cache.  The UCB$V_CD_LOAD flag controls what is loaded
                                     087C  1853 ;	into the cache.  When this bit is clear	only those blocks currently
                                     087C  1854 ;	cached will be reloaded with the new data being written.  When this
                                     087C  1855 ;	bit is set (via the IO$_SETMODE IO$M_CD_LOAD modifier) the entire
                                     087C  1856 ;	transfer operation will be loaded into cache on I/O completion.
                                     087C  1857 ;
                                     087C  1858 ;	However, at this point in the I/O request nothing is done to the
                                     087C  1859 ;	cache.  The main reason for this is the remote possibility that
                                     087C  1860 ;	a read may be pending completion for the same blocks.  If the cache
                                     087C  1861 ;	is invalidated or loaded here, I/O post-processing of the read may
                                     087C  1862 ;	reload the cache with stale data.  To prevent this, some mechanism would
                                     087C  1863 ;	have to be implemented to block loading of these "stale" blocks.
                                     087C  1864 ;	Also, due to seek optimization algorithms, the order requests are
                                     087C  1865 ;	performed is not necessarily the order in which they are processed
                                     087C  1866 ;	by the driver start I/O routine.
                                     087C  1867 ;
                                     087C  1868 ;	The cache driver defers all handling of write requests to I/O
                                     087C  1869 ;	completion processing.  In the same manner discussed previously
                                     087C  1870 ;	for handling read I/O completion, the IRP$L_PID field and starting
                                     087C  1871 ;	LBN are saved in a "pending I/O identification block" (PIB), and the
                                     087C  1872 ;	IRP$L_PID field is reset to force IOC$IOPOST to call the cache
                                     087C  1873 ;	driver back at CD_IOPOST on completion of the operation.
                                     087C  1874 ;	CD_IOPOST is responsible for invalidating any cached data when
                                     087C  1875 ;	an I/O error is detected.
                                     087C  1876 ;	
                                     087C  1877 ; ***
                                     087C  1878 ;
                                     087C  1879 ;	On entry:
                                     087C  1880 ;
                                     087C  1881 ;		 R1 = starting LBN
                                     087C  1882 ;		 R2 = # blocks to transfer (rounded up)
                                     087C  1883 ;		 R3 = IRP address
                                     087C  1884 ;		 R4 = I/O function code
                                     087C  1885 ;		 R5 = cache driver UCB address
                                     087C  1886 ;		 IPL = Cached disk driver's fork IPL
                                     087C  1887 ;
                                     087C  1888 WRITE:
                                     087C  1889 
                                     087C  1890 .iif df DBG_CNT, INCL SIO_W		;; increment write ops in cd
                                     087C  1891 .iif ndf CD_RECORD_ALL, BSBW CD_RECORD	;; record operation in user buffer
                                     087C  1892 
                       0B   54   D1  087C  1893 	CMPL	R4,#IO$_WRITEPBLK	;; write data request ??
                            16   12  087F  1894 	BNEQ	8$			;; branch if not
               2A A3   0044 8F   B3  0881  1895 	BITW	#IRP$M_SWAPIO!IRP$M_PAGIO,IRP$W_STS(R3)
                                     0887  1896 					;; paging or swapping I/O ??
                            05   13  0887  1897 	BEQL	6$			;; branch if not, cache it
                 09 50 A5   02   E1  0889  1898 	BBC	#UCB$V_CD_PAGSWAPIO,UCB$L_DEVDEPEND(R5),8$
                                     088E  1899 					;; branch if not caching page/swap I/O
                                     088E  1900 6$:
                       0154 C5   D6  088E  1901 	INCL	UCB$L_CD_WRCNT(R5)	;; increment # writes processed
                  0158 C5   52   C0  0892  1902 	ADDL2	R2,UCB$L_CD_WRBLK(R5)	;; accumulate # blocks written
                                     0897  1903 8$:
                 4D 50 A5   05   E1  0897  1904 	BBC	#UCB$V_CD_ALLOC,UCB$L_DEVDEPEND(R5),CD_RETURN
                                     089C  1905 					;; branch if no cache allocated
                            00   11  089C  1906 	BRB	CD_RECALL		;; branch to recall cache driver on
                                     089E  1907 					;;  I/O completion
                                     089E  1908 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  28
082092                          Cache Driver Alternate Start I/O Entry P 26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     089E  1910 ;
                                     089E  1911 ; *** Setup for recall of cache driver on I/O completion
                                     089E  1912 ;
                                     089E  1913 CD_RECALL:
                  52   F7EA DF   0F  089E  1914 	REMQUE	@FREEQFL,R2 		;; pull PIB from free list
                            26   1C  08A3  1915 	BVC	20$			;; branch if successful
                            0B   BB  08A5  1916 	PUSHR	#^M<R0,R1,R3>		;; free registers
              51   000000A8 8F   D0  08A7  1917 	MOVL	#IRP$K_LENGTH,R1	;; get size of block desired
                   00000000'GF   16  08AE  1918 	JSB	G^EXE$ALONONPAGED	;; allocate IRP from non-paged pool
                         01 50   E8  08B4  1919 	BLBS	R0,10$			;; branch on success
                                     08B7  1920 ;*	BUG_CHECK			;; take system down
                                 00  08B7  1921 	HALT
                                     08B8  1922 10$:
                       51   18   C2  08B8  1923 	SUBL2	#PIB$K_LENGTH,R1	;; full PIB left in packet ??
                            0A   15  08BB  1924 	BLEQ	15$			;; branch if not
                  F7CA CF   62   0E  08BD  1925 	INSQUE	(R2),FREEQFL		;; link PIB to free list
                       52   18   C0  08C2  1926 	ADDL2	#PIB$K_LENGTH,R2	;; step to start of next PIB
                            F1   11  08C5  1927 	BRB	10$			;;  and continue
                                     08C7  1928 15$:
                            0B   BA  08C7  1929 	POPR	#^M<R0,R1,R3>		;; restore registers
                            D3   11  08C9  1930 	BRB	CD_RECALL		;;  and try again
                                     08CB  1931 ;
                                     08CB  1932 20$:
                    08 A2   53   D0  08CB  1933 	MOVL	R3,PIB$L_IRP(R2)	;; save IRP address
                 0C A2   0C A3   D0  08CF  1934 	MOVL	IRP$L_PID(R3),PIB$L_PID(R2)
                                     08D4  1935 					;; save PID
                    10 A2   55   D0  08D4  1936 	MOVL	R5,PIB$L_UCB(R2)	;; save cache driver's UCB address
                    14 A2   51   D0  08D8  1937 	MOVL	R1,PIB$L_LBN(R2)	;; save starting LBN
           0C A3   000008F2'EF   DE  08DC  1938 	MOVAL	CD_IOPOST,IRP$L_PID(R3)	;; reset PID to call CD_IOPOST
                  F79F DF   62   0E  08E4  1939 	INSQUE	(R2),@PENDQBL		;; insert PIB at end of pending list
                                     08E9  1940 ;
                                     08E9  1941 ; *** Return control to disk driver's start I/O routine
                                     08E9  1942 ;
                                     08E9  1943 CD_RETURN:
                       0110 C5   DD  08E9  1944 	PUSHL	UCB$L_CD_DSKSTARTIO(R5)	;; establish disk driver's entry point
                    55   54 A5   D0  08ED  1945 	MOVL	UCB$L_CD_DSKUCB(R5),R5	;; switch back to disk driver's UCB
                                 05  08F1  1946 	RSB				;;  and chain through disk's start_io
                                     08F2  1947 ;
                                     08F2  1948 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  29
082092                          Cache Driver I/O Post Processing         26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     08F2  1950 	.sbttl	Cache Driver I/O Post Processing
                                     08F2  1951 ;
                                     08F2  1952 ;+
                                     08F2  1953 ; *** CD_IOPOST -- Called directly by "jump subroutine" from IOC$IOPOST
                                     08F2  1954 ;	to re-enter the cache driver.  At this point, data read/written from
                                     08F2  1955 ;	disk will be updated in the cache.  To restore the proper
                                     08F2  1956 ;	context for the I/O request, a "pending I/O identification block"
                                     08F2  1957 ;	(PIB) must exist in the cache driver's pending queue that points
                                     08F2  1958 ;	to the IRP being processed so that the IRP$L_PID field may
                                     08F2  1959 ;	be restored.  The PIB also contains the cache driver UCB address
                                     08F2  1960 ;	and other transfer related information required to complete the
                                     08F2  1961 ;	operation.
                                     08F2  1962 ;
                                     08F2  1963 ;	Evaluating the completion status of the request is the next step
                                     08F2  1964 ;	in I/O post-processing.  In the event the transfer (read or write)
                                     08F2  1965 ;	completed with an error, any cached data is immediately invalidated
                                     08F2  1966 ;	and control returns to the normal VMS I/O post-processing procedure.
                                     08F2  1967 ;
                                     08F2  1968 ;	On successful completion of a read transfer, CD_LOAD is called to copy
                                     08F2  1969 ;	all full disk blocks read from the user's data buffer into the cache.
                                     08F2  1970 ;	In the event the block is already cached, no loading of data is
                                     08F2  1971 ;	performed.
                                     08F2  1972 ;
                                     08F2  1973 ;	On successful completion of a write transfer, the particular type
                                     08F2  1974 ;	of write request and control flags established when the cache was
                                     08F2  1975 ;	initialized determine if the blocks transfered are loaded or invalidated
                                     08F2  1976 ;	in the cache.  IO$_WRITExBLK and IO$_WRITECHECK transfers will be
                                     08F2  1977 ;	handled in the following fashion:
                                     08F2  1978 ;
                                     08F2  1979 ;		1) IO$_WRITExBLK and IO$_WRITECHECK with IO$M_FLUSH option
                                     08F2  1980 ;		    forces all cached blocks to be invalidated.
                                     08F2  1981 ;		2) IO$_WRITExBLK and IO$_WRITECHECK with IO$M_LOAD option
                                     08F2  1982 ;		    forces all cached blocks to be loaded into cache.
                                     08F2  1983 ;		3) IO$_WRITExBLK and IO$_WRITECHECK with neither LOAD or FLUSH
                                     08F2  1984 ;		    options loads only those blocks already cached.
                                     08F2  1985 ;		4) Page/Swap IO$_WRITExBLK requests with IO$M_PAGSWAPIO option
                                     08F2  1986 ;		    forces all cached blocks to be invalidated.
                                     08F2  1987 ;		5) Any other direct I/O write function forces invalidation
                                     08F2  1988 ;		    of any cached data.
                                     08F2  1989 ;
                                     08F2  1990 ; ***
                                     08F2  1991 ;
                                     08F2  1992 ;	On Entry:
                                     08F2  1993 ;
                                     08F2  1994 ;		R5  = IRP address
                                     08F2  1995 ;		IPL = IPL$_IOPOST
                                     08F2  1996 ;
                                     08F2  1997 ;		(R0-R5 free for use)
                                     08F2  1998 ;
                                     08F2  1999 	.enable LSB
                                     08F2  2000 CD_IOPOST:
                       53   55   D0  08F2  2001 	MOVL	R5,R3			; copy IRP address
                    55   1C A3   D0  08F5  2002 	MOVL	IRP$L_UCB(R3),R5	; get disk driver's UCB address
                  52   F787 CF   DE  08F9  2003 	MOVAL	PENDQFL,R2		; point to pending queue list head
                       51   52   D0  08FE  2004 	MOVL	R2,R1			; copy list head address
                                     0901  2005 	FORKLOCK lock=UCB$B_FLCK(R5),-	; sync to disk/cache driver fork IPL
                                     0901  2006 		savipl=-(SP),-
                                     0901  2007 		preserve=NO
                                     091F  2008 5$:
                       52   62   D0  091F  2009 	MOVL	(R2),R2			;; step to next PIB
                       51   52   D1  0922  2010 	CMPL	R2,R1			;; at end-of-list ??
                            01   12  0925  2011 	BNEQ	8$			;; branch if not, check PIB
                                     0927  2012 ;*	BUG_CHECK			;; else, fatal error...crash system
                                 00  0927  2013 	HALT
                                     0928  2014 8$:
                    53   08 A2   D1  0928  2015 	CMPL	PIB$L_IRP(R2),R3	;; PIB linked to IRP ??
                            F1   12  092C  2016 	BNEQ	5$			;; branch if not, check again
                                     092E  2017 ;
                                     092E  2018 10$:
                       52   62   0F  092E  2019 	REMQUE	(R2),R2			;; remove PIB from pending queue
                 0C A3   0C A2   D0  0931  2020 	MOVL	PIB$L_PID(R2),IRP$L_PID(R3)
                                     0936  2021 					;; restore PID in IRP
                                     0936  2022 ;
                                     0936  2023 ; *** Re-inserting IRP to post-processing queue appears to be more involved
                                     0936  2024 ;	with SMP.  Based on SDA examination of IOC$IOPOST routine, "primary"
                                     0936  2025 ;	processor may empty two queues but all others empty only their
                                     0936  2026 ;	per-CPU queue.  IOC$REQCOM inserts things on the global self-relative
                                     0936  2027 ;	queue @IOC$GQ_POSTIQ, so how do things ever get to the per-CPU
                                     0936  2028 ;	post processing queue ??
                                     0936  2029 ;
                                     0936  2030 	FIND_CPU_DATA	R0		;; get to per-CPU database
         00000000'GF   0268 C0   D1  0940  2031 	CMPL	CPU$L_PHY_CPUID(R0),G^SMP$GL_PRIMID
                                     0949  2032 					;; primary CPU ??
                            14   12  0949  2033 	BNEQ	19$			;; branch if not
                            50   D4  094B  2034 	CLRL	R0			;; init interlock timeout
                                     094D  2035 15$:
              00000000'GF   63   5C  094D  2036 	INSQHI	(R3),G^IOC$GQ_POSTIQ	;; push IRP back on post-proc queue
                            0E   1E  0954  2037 	BCC	20$			;; branch if inserted	
           EF 50   000DBBA0 8F   F2  0956  2038 	AOBLSS	#^X0DBBA0,R0,15$	;; try again, "DBBA0" constant from VMS
                                     095E  2039 ;*	BUG_CHECK	;#^X47C		;; drop system
                                 00  095E  2040 	HALT
                                     095F  2041 19$:
                  0230 C0   63   0E  095F  2042 	INSQUE	(R3),CPU$L_PSFL(R0)	;; push IRP back on post-proc queue
                                     0964  2043 20$:
                    55   10 A2   D0  0964  2044 	MOVL	PIB$L_UCB(R2),R5	;; recover cache driver's UCB address
                    51   14 A2   D0  0968  2045 	MOVL	PIB$L_LBN(R2),R1	;; restore starting LBN
                  F71B CF   62   0E  096C  2046 	INSQUE	(R2),FREEQFL		;; insert PIB on free queue
                 59 50 A5   06   E1  0971  2047 	BBC	#UCB$V_CD_ACTIVE,UCB$L_DEVDEPEND(R5),49$
                                     0976  2048 					;; branch if caching has been disabled
                                     0976  2049 ;
                                     0976  2050 ; *** Caching active, evaluate completion status. If an error occurs or the
                                     0976  2051 ;	transfer byte count doesn't the match requested byte count, any cached
                                     0976  2052 ;	data is invalidated.
                                     0976  2053 ;
                                     0976  2054 ; ***
                                     0976  2055 ;
                                     0976  2056 ;	Required Registers:
                                     0976  2057 ;
                                     0976  2058 ;		R1 = starting LBN
                                     0976  2059 ;		R3 = IRP address
                                     0976  2060 ;		R5 = Cache driver UCB address
                                     0976  2061 ;
                    52   32 A3   D0  0976  2062 	MOVL	IRP$L_BCNT(R3),R2	;; get # bytes that should've transfered
                      42 38 A3   E9  097A  2063 	BLBC	IRP$L_IOST1(R3),45$	;; branch on I/O error, invalidate cache
                         46 A3   B5  097E  2064 	TSTW	IRP$L_OBCNT+2(R3)	;; original byte count > 64K ??
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  30
082092                          Cache Driver I/O Post Processing         26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                            06   13  0981  2065 	BEQL	29$			;; branch if not (usually)
                    3A A3   52   D1  0983  2066 	CMPL	R2,IRP$L_IOST1+2(R3)	;; check extended transfer count
                            04   11  0987  2067 	BRB	30$			;; branch to check condition codes
                                     0989  2068 29$:
                    3A A3   52   B1  0989  2069 	CMPW	R2,IRP$L_IOST1+2(R3)	;; check transfer count
                                     098D  2070 30$:
                            31   12  098D  2071 	BNEQ	45$			;; branch on error, invalidate cache
          54   20 A3   06   00   EF  098F  2072 	EXTZV	#IRP$V_FCODE,#IRP$S_FCODE,IRP$W_FUNC(R3),R4
                                     0995  2073 					;; extract I/O function code
                       0C   54   D1  0995  2074 	CMPL	R4,#IO$_READPBLK	;; was this a read request?
                            1C   13  0998  2075 	BEQL	40$			;; if so, load cache
                                     099A  2076 ;
                                     099A  2077 ; *** Determine action to take on completion of write based on function
                                     099A  2078 ;
                 21 50 A5   00   E0  099A  2079 	BBS	#UCB$V_CD_FLUSH,UCB$L_DEVDEPEND(R5),45$
                                     099F  2080 					;; branch if flushing cache on any write
               2A A3   0044 8F   B3  099F  2081 	BITW	#IRP$M_SWAPIO!IRP$M_PAGIO,IRP$W_STS(R3)
                                     09A5  2082 					;; paging or swapping I/O ??
                            05   13  09A5  2083 	BEQL	36$			;; branch if not
                 14 50 A5   02   E1  09A7  2084 	BBC	#UCB$V_CD_PAGSWAPIO,UCB$L_DEVDEPEND(R5),45$
                                     09AC  2085 					;; branch if not caching page/swap I/O
                                     09AC  2086 36$:
                       0A   54   D1  09AC  2087 	CMPL	R4,#IO$_WRITECHECK	;; write check ??
                            1E   13  09AF  2088 	BEQL	49$			;; branch if yes, no change on disk
                       0B   54   D1  09B1  2089 	CMPL	R4,#IO$_WRITEPBLK	;; "normal" write ??
                            0A   12  09B4  2090 	BNEQ	45$			;; branch if not, invalidate cache
                                     09B6  2091 ;
                                     09B6  2092 ; *** Load cache from user's buffer on successful completion of I/O
                                     09B6  2093 ;
                                     09B6  2094 40$:
               52   52   F7 8F   78  09B6  2095 	ASHL	#-9,R2,R2 		;; get truncated # of blocks transferred
                          00D3   30  09BB  2096 	BSBW	CD_LOAD			;; load cache
                            0F   11  09BE  2097 	BRB	49$			;;  and exit
                                     09C0  2098 
                                     09C0  2099 ;
                                     09C0  2100 ; *** Invalidate any cached data on I/O error			
                                     09C0  2101 ;
                                     09C0  2102 45$:
              52   000001FF 8F   C0  09C0  2103 	ADDL2	#^X1FF,R2		;; round byte count to next higher blk
               52   52   F7 8F   78  09C7  2104 	ASHL	#-9,R2,R2 		;; compute # of blocks to invalidate
                          0033   30  09CC  2105 	BSBW	CD_INVALIDATE		;; invalidate cached data
                                     09CF  2106 ;
                                     09CF  2107 49$:
                                     09CF  2108 	FORKUNLOCK lock=UCB$B_FLCK(R5),- ;; drop back to IPL$_IOPOST
                                     09CF  2109 		   newipl=(SP)+,-
                                     09CF  2110 		   preserve=NO
                                 05  09E3  2111 	RSB				;  and return to IOC$IOPOST
                                     09E4  2112 	.disable LSB
                                     09E4  2113 ;
                                     09E4  2114 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  31
082092                          Cache Driver I/O Post Processing         26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     09E4  2115 
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  32
082092                          Cache Driver I/O Post Processing         26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     09E4  2117 ;
                                     09E4  2118 ; *** Local subroutine to accumulate some statistics on data pulled from cache
                                     09E4  2119 ;
                                     09E4  2120 CD_STATS:
                    12 60   1A   E1  09E4  2121 	BBC	#TAG$V_VALID,(R0),6$	; branch if data already invalid
                    0E 60   18   E0  09E8  2122 	BBS	#TAG$V_REREAD,(R0),6$	; branch if data read more than once	
                    06 60   19   E0  09EC  2123 	BBS	#TAG$V_WRLOAD,(R0),5$	; branch if loaded by write
                       014C C5   D6  09F0  2124 	INCL	UCB$L_CD_RDONCE(R5)	; increment the read-once count
                            04   11  09F4  2125 	BRB	6$
                                     09F6  2126 5$:
                       0160 C5   D6  09F6  2127 	INCL	UCB$L_CD_WRONCE(R5)	; increment the write-once count
                                     09FA  2128 ;
                                     09FA  2129 6$:
              60   FF000000 8F   CA  09FA  2130 	BICL	#^C<TAG$M_PFN>,(R0)	; clear all flags invalidating data
                                 05  0A01  2131 	RSB				;  and we're done	
                                     0A02  2132 
                                     0A02  2133 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  33
082092                          Invalidate Cache Data                    26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0A02  2135 	.sbttl	Invalidate Cache Data
                                     0A02  2136 ;
                                     0A02  2137 ;+
                                     0A02  2138 ; *** CD_INVALIDATE -- Called to invalidate a range of potentially
                                     0A02  2139 ;	cached disk blocks.  Any cache tags associated with the cached
                                     0A02  2140 ;	block are cleared.  Statistics are accumulated for each block
                                     0A02  2141 ;	invalidated by this procedure based on flags maintained in the
                                     0A02  2142 ;	high-order bits of the PFN field.
                                     0A02  2143 ;
                                     0A02  2144 ; ***
                                     0A02  2145 ;
                                     0A02  2146 ;	On entry:
                                     0A02  2147 ;		R1  = Starting LBN
                                     0A02  2148 ;		R2  = # of consecutive LBNs to invalidate
                                     0A02  2149 ;		IPL = Cached disk driver's fork IPL
                                     0A02  2150 ;
                                     0A02  2151 ;	returns:
                                     0A02  2152 ;		R0-R2 destroyed
                                     0A02  2153 ;	
                                     0A02  2154 ;
                                     0A02  2155 ;-
                                     0A02  2156 
                                     0A02  2157 CD_INVALIDATE:
                            53   DD  0A02  2158 	PUSHL	R3			; free R3
                            6E   10  0A04  2159 	BSBB	CD_LOCATE		; pickup address of tag set for
                                     0A06  2160 					;  starting LBN
                                     0A06  2161 2$:
                  53   0134 C5   D0  0A06  2162 	MOVL	UCB$L_CD_SETSIZE(R5),R3	; get number of tags/set	
                                     0A0B  2163 3$:
                       51   80   D1  0A0B  2164 	CMPL	(R0)+,R1		; tag match desired LBN ??
                            0A   12  0A0E  2165 	BNEQ	6$			; branch if not
           FC A0   FFFFFFFF 8F   D0  0A10  2166 	MOVL	#-1,-4(R0)		; reset LBN to bogus non-zero value
                            CA   10  0A18  2167 	BSBB	CD_STATS		; accumulate stats, clear flags
                                     0A1A  2168 6$:
                            80   D5  0A1A  2169 	TSTL	(R0)+			; skip over PFN field
                         EC 53   F5  0A1C  2170 	SOBGTR	R3,3$			;  loop through all tags in set
                            51   D6  0A1F  2171 	INCL	R1			; bump LBN
                            60   D5  0A21  2172 	TSTL	(R0)			; hit end of tag list ??
                            05   12  0A23  2173 	BNEQ	12$			; branch if not
                  50   00FC C5   D0  0A25  2174 	MOVL	UCB$L_CD_TAGADDR(R5),R0	; wrap to start of tag list
                                     0A2A  2175 12$:
                         D9 52   F5  0A2A  2176 	SOBGTR	R2,2$			;  loop through all LBNs
                       53   8E   D0  0A2D  2177 	MOVL	(SP)+,R3		; recover R3
                                 05  0A30  2178 	RSB				; return to caller
                                     0A31  2179 
                                     0A31  2180 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  34
082092                          Determine if Disk Blocks are Cached      26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0A31  2182 	.sbttl	Determine if Disk Blocks are Cached
                                     0A31  2183 ;
                                     0A31  2184 ;+
                                     0A31  2185 ; *** CD_CHECK -- Called to check the cache tag entries corresponding
                                     0A31  2186 ;	with a range of LBNs.  If the LBN is cached, its reference count
                                     0A31  2187 ;	is reset to the largest unsigned integer count.  Otherwise, the
                                     0A31  2188 ;	reference count for valid data is decremented to show its a candidate
                                     0A31  2189 ;	to be reused.
                                     0A31  2190 ;
                                     0A31  2191 ; ***
                                     0A31  2192 ;
                                     0A31  2193 ;	On entry:
                                     0A31  2194 ;
                                     0A31  2195 ;		R1  = Starting LBN
                                     0A31  2196 ;		R2  = # of consecutive LBNs to assign
                                     0A31  2197 ;		IPL = Cached disk driver's fork IPL
                                     0A31  2198 ;
                                     0A31  2199 ;	returns:
                                     0A31  2200 ;
                                     0A31  2201 ;		R0  = Address of first tag set assigned to cache data
                                     0A31  2202 ;		R1  = Starting LBN
                                     0A31  2203 ;		R2  = # of valid LBNs in cache
                                     0A31  2204 ;	
                                     0A31  2205 ;-
                                     0A31  2206 	ASSUME	TAG$L_LBN+4 EQ TAG$L_PFN
                                     0A31  2207 	ASSUME	TAG$K_LENGTH EQ 8
                                     0A31  2208 CD_CHECK:
                            41   10  0A31  2209 	BSBB	CD_LOCATE		; find starting tag set for LBN
                            0B   BB  0A33  2210 	PUSHR	#^M<R0,R1,R3>		; save registers
                            00   DD  0A35  2211 	PUSHL	#0			; clear number of valid LBNs in cache
                                     0A37  2212 3$:
                  53   0134 C5   D0  0A37  2213 	MOVL	UCB$L_CD_SETSIZE(R5),R3	; get number of tags/set	
                                     0A3C  2214 4$:
                       51   80   D1  0A3C  2215 	CMPL	(R0)+,R1		; tag match desired LBN ??
                            0F   12  0A3F  2216 	BNEQ	10$			; branch if not
                    16 60   1A   E1  0A41  2217 	BBC	#TAG$V_VALID,(R0),12$	; branch if data invalid (never !?)
                            6E   D6  0A45  2218 	INCL	(SP)			; count valid LBNs
              60   F8000000 8F   C8  0A47  2219 	BISL	#<TAG$M_REFCNT>,(R0)	; reset reference count to all 1's
                            0B   11  0A4E  2220 	BRB	12$
                                     0A50  2221 10$:
                    07 60   1A   E1  0A50  2222 	BBC	#TAG$V_VALID,(R0),12$	; branch if data invalid
              60   08000000 8F   C2  0A54  2223 	SUBL2	#TAG$K_REFCNT,(R0)	; adjust reference count
                                     0A5B  2224 12$:
                            80   D5  0A5B  2225 	TSTL	(R0)+			; skip over PFN field
                         DC 53   F5  0A5D  2226 	SOBGTR	R3,4$			; loop through all tags in set
                            51   D6  0A60  2227 	INCL	R1			; step to next LBN
                            60   D5  0A62  2228 	TSTL	(R0)			; hit end of tag list ??
                            05   12  0A64  2229 	BNEQ	18$			; branch if not
                  50   00FC C5   D0  0A66  2230 	MOVL	UCB$L_CD_TAGADDR(R5),R0	; wrap to start of tag list
                                     0A6B  2231 18$:
                         C9 52   F5  0A6B  2232 	SOBGTR	R2,3$			; loop through all LBNs
                       52   8E   D0  0A6E  2233 	MOVL	(SP)+,R2		; recover # cached LBNs
                            0B   BA  0A71  2234 	POPR	#^M<R0,R1,R3>
                                 05  0A73  2235 	RSB				;  and return to caller
                                     0A74  2236 ;
                                     0A74  2237 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  35
082092                          Locate Cache Tag Block by LBN            26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0A74  2239 	.sbttl	Locate Cache Tag Block by LBN
                                     0A74  2240 ;
                                     0A74  2241 ;+
                                     0A74  2242 ;
                                     0A74  2243 ; *** CD_LOCATE -- Determines address of a set of tag entries that may
                                     0A74  2244 ;	be used to cache a particular LBN.  The tag set is determined
                                     0A74  2245 ;	by the remainder of dividing the LBN by the number of sets in the
                                     0A74  2246 ;	cache.  The number and size of the cache tags associated with each
                                     0A74  2247 ;	set are then used to compute the address in the cache tag block
                                     0A74  2248 ;	for start of the set.
                                     0A74  2249 ;
                                     0A74  2250 ; ***
                                     0A74  2251 ;
                                     0A74  2252 ;	On Entry:
                                     0A74  2253 ;
                                     0A74  2254 ;		R1  = starting LBN
                                     0A74  2255 ;		R5  = Address of cache driver UCB
                                     0A74  2256 ;		IPL = Cached disk driver's fork IPL
                                     0A74  2257 ;
                                     0A74  2258 ;	 returns:
                                     0A74  2259 ;
                                     0A74  2260 ;		R0  = Address of first tag block in n-block set associated with
                                     0A74  2261 ;			LBN specified in R1
                                     0A74  2262 ;
                                     0A74  2263 ;		R1-R5 preserved
                                     0A74  2264 ;
                                     0A74  2265 ;-
                                     0A74  2266 
                                     0A74  2267 CD_LOCATE:
             50   51   0138 C5   C7  0A74  2268 	DIVL3	UCB$L_CD_SETCOUNT(R5),R1,R0
                                     0A7A  2269 					; divide LBN by number of sets in cache
                  50   0138 C5   C4  0A7A  2270 	MULL2	UCB$L_CD_SETCOUNT(R5),R0 ; and compute remainder to determine
                  50   51   50   C3  0A7F  2271 	SUBL3	R0,R1,R0		;   which tag set to start with
                  50   0134 C5   C4  0A83  2272 	MULL2	UCB$L_CD_SETSIZE(R5),R0	; multiply by number of tags/set
                       50   08   C4  0A88  2273 	MULL2	#TAG$K_LENGTH,R0	;  then number of bytes/tag
                  50   00FC C5   C0  0A8B  2274 	ADDL2	UCB$L_CD_TAGADDR(R5),R0	; add in base address of tag block
                                 05  0A90  2275 	RSB
                                     0A91  2276 
                                     0A91  2277 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  36
082092                          Load Data into Cache Buffers             26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0A91  2279 	.sbttl	Load Data into Cache Buffers
                                     0A91  2280 ;
                                     0A91  2281 ;+
                                     0A91  2282 ; *** CD_LOAD -- Transfers data from user's buffer to cache blocks.
                                     0A91  2283 ;	Pages of the user's buffer are mapped by PFN through the
                                     0A91  2284 ;	system virtual page table entries pointed to by UCB$L_CD_USPTE;
                                     0A91  2285 ;	each page of cache is mapped via the system virtual page
                                     0A91  2286 ;	table entries pointed to by UCB$L_CD_CSPTE.  Since the user's
                                     0A91  2287 ;	buffer does not have to be page aligned, two pages must be
                                     0A91  2288 ;	mapped by contiguous page table entries to allow transfer of
                                     0A91  2289 ;	a full 512 byte page with a single MOVC3 instruction.
                                     0A91  2290 ;	All mapping is performed by CD_MAP.
                                     0A91  2291 ;
                                     0A91  2292 ;	Each block (page) of data transferred from disk to the user's
                                     0A91  2293 ;	buffer will be loaded into the cache based on the contents of
                                     0A91  2294 ;	the cache tag block.  If a tag is found with the same LBN
                                     0A91  2295 ;	and the contents of the block are valid, the data is overwritten
                                     0A91  2296 ;	if the I/O was a write, or skipped if the I/O was a read.
                                     0A91  2297 ;	If a tag is found with the same LBN and the contents of the
                                     0A91  2298 ;	block is invalid (should never happen), the data is loaded on
                                     0A91  2299 ;	a read, loaded on a write if IO$M_LOAD option has been
                                     0A91  2300 ;	specified, or is skipped on a write if IO$M_LOAD has not bee
                                     0A91  2301 ;	specified.  If no tag is found for the LBN, the I/O was 
                                     0A91  2302 ;	a write, and the IO$M_LOAD option has not been specified,
                                     0A91  2303 ;	the data is skipped.  Finally, if no tag is found for the LBN
                                     0A91  2304 ;	and the I/O was a read or write with IO$M_LOAD specified,
                                     0A91  2305 ;	the oldest tag in the set is overwritten with the new LBN
                                     0A91  2306 ;	and the data is loaded into the cache.
                                     0A91  2307 ;
                                     0A91  2308 ; ***
                                     0A91  2309 ;
                                     0A91  2310 ;	On entry:
                                     0A91  2311 ;
                                     0A91  2312 ;		R1  = Starting LBN
                                     0A91  2313 ;		R2  = Number of blocks (pages) to load into cache
                                     0A91  2314 ;		R3  = IRP address
                                     0A91  2315 ;		R5  = Cache driver UCB address
                                     0A91  2316 ;		IPL = Cached disk driver's fork IPL
                                     0A91  2317 ;
                                     0A91  2318 ;	 returns:
                                     0A91  2319 ;
                                     0A91  2320 ;		R0-R2,R4 = destroyed
                                     0A91  2321 ;		R3 = IRP address
                                     0A91  2322 ;		R5 = Cache driver UCB address
                                     0A91  2323 ;
                                     0A91  2324 ;-
                                     0A91  2325 ;
                                     0A91  2326 	ASSUME	TAG$L_LBN+4 EQ TAG$L_PFN
                                     0A91  2327 	ASSUME	TAG$K_LENGTH EQ 8
                                     0A91  2328 CD_LOAD:
                            58   DD  0A91  2329 	PUSHL	R8			; free R8
                       7E   56   7D  0A93  2330 	MOVQ	R6,-(SP)		; free R6-R7
          58   20 A3   06   00   EF  0A96  2331 	EXTZV	#IRP$V_FCODE,#IRP$S_FCODE,IRP$W_FUNC(R3),R8
                                     0A9C  2332 					; extract I/O function code
               0118 C5   2C A3   7D  0A9C  2333 	MOVQ	IRP$L_SVAPTE(R3),UCB$L_CD_SVAPTE(R5)
                                     0AA2  2334 					; copy transfer parameters to UCB
             57   0134 C5   08   C5  0AA2  2335 	MULL3	#TAG$K_LENGTH,UCB$L_CD_SETSIZE(R5),R7
                                     0AA8  2336 					; determine # bytes per tag set
                            CA   10  0AA8  2337 	BSBB	CD_LOCATE		; get address of first tag set
                                     0AAA  2338 4$:
                  56   57   50   C1  0AAA  2339 	ADDL3	R0,R7,R6		; save start address of next tag set
                       54   50   D0  0AAE  2340 	MOVL	R0,R4			; seed pointer to oldest tag
                                     0AB1  2341 6$:
                       80   51   D1  0AB1  2342 	CMPL	R1,(R0)+		; LBN cached by current tag ??
                            1A   12  0AB4  2343 	BNEQ	12$			; branch if not
                    07 60   1A   E1  0AB6  2344 	BBC	#TAG$V_VALID,(R0),10$	; branch if data invalid (never ?!)
                       0C   58   D1  0ABA  2345 	CMPL	R8,#IO$_READPBLK	; was this a read request?
                            30   12  0ABD  2346 	BNEQ	20$			; branch if write QIO, reload cache
                            5B   11  0ABF  2347 	BRB	30$			; else, skip load on read
                                     0AC1  2348 10$:
           FC A0   FFFFFFFF 8F   D0  0AC1  2349 	MOVL	#-1,-4(R0)		; for internal consistency, set bogus
              60   FF000000 8F   CA  0AC9  2350 	BICL2	#^C<TAG$M_PFN>,(R0)	;  non-zero LBN with oldest tag
                                     0AD0  2351 12$:
                    04 A4   80   D1  0AD0  2352 	CMPL	(R0)+,TAG$L_PFN(R4)	; current tag older than last ??
                            04   1E  0AD4  2353 	BGEQU	15$			; branch if not
                  54   50   08   C3  0AD6  2354 	SUBL3	#TAG$K_LENGTH,R0,R4	; remember oldest tag address
                                     0ADA  2355 15$:
                       56   50   D1  0ADA  2356 	CMPL	R0,R6			; hit end of tag set ??
                            D2   1F  0ADD  2357 	BLSSU	6$			; branch if not, keep checking
                                     0ADF  2358 ;
                                     0ADF  2359 ; *** If here, no tag in set matches LBN.  If the block should be loaded
                                     0ADF  2360 ;	need to reassign the oldest tag to map the new data.
                                     0ADF  2361 ;
                       0C   58   D1  0ADF  2362 	CMPL	R8,#IO$_READPBLK	; was this a read request?
                            05   13  0AE2  2363 	BEQL	18$			; always load cache on read
                 33 50 A5   01   E1  0AE4  2364 	BBC	#UCB$V_CD_LOAD,UCB$L_DEVDEPEND(R5),30$
                                     0AE9  2365 					; branch if loading on write disabled
                                     0AE9  2366 18$:
                       50   54   D0  0AE9  2367 	MOVL	R4,R0			; recover address of oldest tag in set
                       80   51   D0  0AEC  2368 	MOVL	R1,(R0)+		; reset correct LBN
                                     0AEF  2369 ;
                                     0AEF  2370 ; *** Load Cache block from user's data buffer.
                                     0AEF  2371 ;
                                     0AEF  2372 20$:
                          FEF2   30  0AEF  2373 	BSBW	CD_STATS		; accumulate some stats on tag
                       0C   58   D1  0AF2  2374 	CMPL	R8,#IO$_READPBLK	; was this a read request?
                            06   12  0AF5  2375 	BNEQ	24$			; branch if a write QIO
                                     0AF7  2376 
                       0148 C5   D6  0AF7  2377 	INCL	UCB$L_CD_RDLOAD(R5)	; show one more block loaded by read
                            0B   11  0AFB  2378 	BRB	26$
                                     0AFD  2379 
                                     0AFD  2380 24$:
                       015C C5   D6  0AFD  2381 	INCL	UCB$L_CD_WRLOAD(R5)	; show one more block loaded by write
              60   02000000 8F   C8  0B01  2382 	BISL	#TAG$M_WRLOAD,(R0)	; show block loaded by write
                                     0B08  2383 26$:
                            2F   BB  0B08  2384 	PUSHR	#^M<R0,R1,R2,R3,R5>	; free critical registers
                          00A9   30  0B0A  2385 	BSBW	CD_MAP			; map cache and user buffer
             60   61   0200 8F   28  0B0D  2386 	MOVC3	#512,(R1),(R0)		; copy data to cache
                            2F   BA  0B13  2387 	POPR	#^M<R0,R1,R2,R3,R5>	; restore critical registers
              60   FC000000 8F   C8  0B15  2388 	BISL	#TAG$M_REFCNT!TAG$M_VALID,(R0)
                                     0B1C  2389 					; set reference count and valid flag
                                     0B1C  2390 30$:
                  0118 C5   04   C0  0B1C  2391 	ADDL2	#4,UCB$L_CD_SVAPTE(R5)	; step over page of data
                            51   D6  0B21  2392 	INCL	R1			; step to next LBN
                       50   56   D0  0B23  2393 	MOVL	R6,R0			; get address of next tag set
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  37
082092                          Load Data into Cache Buffers             26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                            60   D5  0B26  2394 	TSTL	(R0)			; hit end of tags ??
                            05   12  0B28  2395 	BNEQ	36$			; branch if not
                  50   00FC C5   D0  0B2A  2396 	MOVL	UCB$L_CD_TAGADDR(R5),R0	; wrap to start of tag sets
                                     0B2F  2397 36$:
                            52   D7  0B2F  2398 	DECL	R2			; adjust count left
                            03   15  0B31  2399 	BLEQ	39$
                          FF74   31  0B33  2400 	BRW	4$			; loop through entire transfer
                                     0B36  2401 39$:
                       56   8E   7D  0B36  2402 	MOVQ	(SP)+,R6		; recover R6/R7
                            58 8ED0  0B39  2403 	POPL	R8			; recover R8
                                 05  0B3C  2404 	RSB				;  and return
                                     0B3D  2405 ;
                                     0B3D  2406 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  38
082092                          Read Data from Cache                     26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0B3D  2408 	.sbttl	Read Data from Cache
                                     0B3D  2409 ;
                                     0B3D  2410 ;+
                                     0B3D  2411 ; *** CD_READ -- Transfers data from cache blocks to user's I/O buffer.
                                     0B3D  2412 ;	The number of bytes to be transferred from the cache is
                                     0B3D  2413 ;	defined in the IRP$L_BCNT field; the user's transfer buffer
                                     0B3D  2414 ;	is defined in the IRP$L_SVAPTE field.
                                     0B3D  2415 ;
                                     0B3D  2416 ;	THIS ROUTINE ASSUMES THE CALLER HAS ALREADY VERIFIED THAT THE
                                     0B3D  2417 ;	ENTIRE DATA TRANSFER CAN BE SATISFIED BY REFERENCING THE NEXT
                                     0B3D  2418 ;	"N" BLOCKS OF DATA FROM THE CACHE !!
                                     0B3D  2419 ;
                                     0B3D  2420 ;
                                     0B3D  2421 ; ***
                                     0B3D  2422 ;
                                     0B3D  2423 ;	On entry:
                                     0B3D  2424 ;
                                     0B3D  2425 ;		R0  = Address of tag set associated with starting LBN
                                     0B3D  2426 ;		R1  = Starting LBN
                                     0B3D  2427 ;		R2  = Number of blocks to transfer (rounded up)
                                     0B3D  2428 ;		R3  = IRP address
                                     0B3D  2429 ;		R5  = Cache driver's UCB address
                                     0B3D  2430 ;		IPL = Cached disk driver's fork IPL
                                     0B3D  2431 ;
                                     0B3D  2432 ;	 returns:
                                     0B3D  2433 ;
                                     0B3D  2434 ;		Low bit clear in R0 on error, with:
                                     0B3D  2435 ;			R1  = Starting LBN
                                     0B3D  2436 ;			R2  = (destroyed)
                                     0B3D  2437 ;			R3  = IRP address
                                     0B3D  2438 ;			R4  = (destroyed)
                                     0B3D  2439 ;			R5  = Cache driver's UCB address
                                     0B3D  2440 ;
                                     0B3D  2441 ;		Low bit set in R0 on success, with:
                                     0B3D  2442 ;			R0  = low-order long-word for I/O status block
                                     0B3D  2443 ;			R1  = high-order long-word for I/O status block
                                     0B3D  2444 ;			R2  = (destroyed)
                                     0B3D  2445 ;			R3  = IRP address
                                     0B3D  2446 ;			R4  = (destroyed)
                                     0B3D  2447 ;			R5  = Cache driver's UCB address
                                     0B3D  2448 ;
                                     0B3D  2449 ;-
                                     0B3D  2450 ;
                                     0B3D  2451 	ASSUME	TAG$L_LBN+4 EQ TAG$L_PFN
                                     0B3D  2452 	ASSUME	TAG$K_LENGTH EQ 8
                                     0B3D  2453 CD_READ:
                       7E   56   7D  0B3D  2454 	MOVQ	R6,-(SP)		; free R6/R7
                            51   DD  0B40  2455 	PUSHL	R1			; save starting LBN for error recovery
               0118 C5   2C A3   7D  0B42  2456 	MOVQ	IRP$L_SVAPTE(R3),UCB$L_CD_SVAPTE(R5)
                                     0B48  2457 					; copy transfer parameters to UCB
             57   0134 C5   08   C5  0B48  2458 	MULL3	#TAG$K_LENGTH,UCB$L_CD_SETSIZE(R5),R7
                                     0B4E  2459 
                                     0B4E  2460 					; determine # bytes per tag set
                    52   32 A3   D0  0B4E  2461 	MOVL	IRP$L_BCNT(R3),R2	; pickup transfer byte count
              54   00000200 8F   D0  0B52  2462 	MOVL	#512,R4			; setup # of bytes/block
                                     0B59  2463 5$:
                  56   57   50   C1  0B59  2464 	ADDL3	R0,R7,R6		; save start address of next tag set
                                     0B5D  2465 6$:
                       80   51   D1  0B5D  2466 	CMPL	R1,(R0)+		; LBN cached by current tag ??
                            0B   13  0B60  2467 	BEQL	12$			; branch if yes, copy data
                            80   D5  0B62  2468 	TSTL	(R0)+			; skip over PFN
                       56   50   D1  0B64  2469 	CMPL	R0,R6			; hit end of tag set ??
                            F4   1F  0B67  2470 	BLSSU	6$			; branch if not
                                     0B69  2471 10$:			; *** Valid data for LBN not in tag set, bad error
                            50   D4  0B69  2472 	CLRL	R0			; flag error
                            42   11  0B6B  2473 	BRB	39$
                                     0B6D  2474 12$:
                    F8 60   1A   E1  0B6D  2475 	BBC	#TAG$V_VALID,(R0),10$	; branch if not valid, bad error
                       52   54   D1  0B71  2476 	CMPL	R4,R2			; full block (page) left ??
                            03   1B  0B74  2477 	BLEQU	16$			; branch if yes
                       54   52   D0  0B76  2478 	MOVL	R2,R4			; else, truncate bytes to read
                                     0B79  2479 16$:
                            3F   BB  0B79  2480 	PUSHR	#^M<R0,R1,R2,R3,R4,R5>	; free critical registers
                            39   10  0B7B  2481 	BSBB	CD_MAP			; map next page in cache (R2/R3 lost)
                  61   60   54   28  0B7D  2482 	MOVC3	R4,(R0),(R1)		; copy data from cache to user's buffer
                            3F   BA  0B81  2483 	POPR	#^M<R0,R1,R2,R3,R4,R5>	; restore registers
                                     0B83  2484 ;
                                     0B83  2485 20$:
              60   01000000 8F   C8  0B83  2486 	BISL	#TAG$M_REREAD,(R0)	; show data has been read again
                       52   54   C2  0B8A  2487 	SUBL2	R4,R2			; adjust byte count left
                            15   15  0B8D  2488 	BLEQ	30$			; branch if done
                  0118 C5   04   C0  0B8F  2489 	ADDL2	#4,UCB$L_CD_SVAPTE(R5)	; update transfer SVAPTE
                            51   D6  0B94  2490 	INCL	R1			; update LBN
                       50   56   D0  0B96  2491 	MOVL	R6,R0			; point to next tag set
                            60   D5  0B99  2492 	TSTL	(R0)			; hit end of tags ??
                            BC   12  0B9B  2493 	BNEQ	5$			; branch if not, continue
                  50   00FC C5   D0  0B9D  2494 	MOVL	UCB$L_CD_TAGADDR(R5),R0	; wrap to head of tag block
                            B5   11  0BA2  2495 	BRB	5$			;  and continue
                                     0BA4  2496 ;
                                     0BA4  2497 30$:
                    50   30 A3   D0  0BA4  2498 	MOVL	IRP$L_BCNT-2(R3),R0	; set low-order byte count...
                       50   01   B0  0BA8  2499 	MOVW	#SS$_NORMAL,R0		;  ...completion status...
                    6E   34 A3   3C  0BAB  2500 	MOVZWL	IRP$L_BCNT+2(R3),(SP)	; overwrite saved starting LBN with
                                     0BAF  2501 					;  high-order byte count
                                     0BAF  2502 ;
                                     0BAF  2503 39$:
                       51   8E   D0  0BAF  2504 	MOVL	(SP)+,R1		; recover starting LBN...or byte count
                       56   8E   7D  0BB2  2505 	MOVQ	(SP)+,R6		; recover R6/R7
                                 05  0BB5  2506 	RSB				; return to caller
                                     0BB6  2507 ;
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  39
082092                          Read Data from Cache                     26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0BB6  2508 
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  40
082092                          Map Cache and I/O (User) Buffers         26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                     0BB6  2510 	.sbttl	Map Cache and I/O (User) Buffers
                                     0BB6  2511 ;
                                     0BB6  2512 ;+
                                     0BB6  2513 ;
                                     0BB6  2514 ; *** CD_MAP -- Called to map a page of cached data and two pages
                                     0BB6  2515 ;	of the current I/O buffer to system virtual addresses.  Two pages
                                     0BB6  2516 ;	are mapped for the user's I/O buffer to guarantee valid mapping
                                     0BB6  2517 ;	of a full 512 byte page regardless of the buffer's byte offset.
                                     0BB6  2518 ;
                                     0BB6  2519 ;	The page of cache memory mapped is dictated by the PFN field
                                     0BB6  2520 ;	passed through R0.  The I/O buffer address is resolved from
                                     0BB6  2521 ;	the UCB$L_CD_SVAPTE and UCB$W_CD_BOFF fields in the cache driver's UCB.
                                     0BB6  2522 ;	The value saved at UCB$L_CD_SVAPTE is not altered prior to returning
                                     0BB6  2523 ;	control to the caller !!
                                     0BB6  2524 ;
                                     0BB6  2525 ;	For VMS V5 with SMP, the INVALID macro has been replaced by the
                                     0BB6  2526 ;	INVALIDATE_TB macro.  The latter form forces invalidation of
                                     0BB6  2527 ;	translation buffers on all CPUs.  But, the cache driver is the only
                                     0BB6  2528 ;	code using the PTE's in question, and it has already synchronized
                                     0BB6  2529 ;	with all other CPU code threads by virtue of the driver's fork
                                     0BB6  2530 ;	spin lock.  Therefore, there is really no need to invalidate all
                                     0BB6  2531 ;	CPU translation buffers since they can't get at the PTE until
                                     0BB6  2532 ;	we release the SPL$C_IOLOCKx spin lock.
                                     0BB6  2533 ;
                                     0BB6  2534 ; ***
                                     0BB6  2535 ;
                                     0BB6  2536 ;	On Entry:
                                     0BB6  2537 ;
                                     0BB6  2538 ;		R0  = Address of PFN field for cached data to be mapped
                                     0BB6  2539 ;		R5  = Address of cache driver's UCB
                                     0BB6  2540 ;		IPL = Cached disk driver's fork IPL
                                     0BB6  2541 ;
                                     0BB6  2542 ;	 returns:
                                     0BB6  2543 ;
                                     0BB6  2544 ;		R0  = System virtual address of page in cache data buffer
                                     0BB6  2545 ;		R1  = System virtual address of page in I/O data buffer
                                     0BB6  2546 ;
                                     0BB6  2547 ;		R2-R3 destroyed
                                     0BB6  2548 ;		R4-R5 preserved
                                     0BB6  2549 ;
                                     0BB6  2550 ;-
                                     0BB6  2551 
                                     0BB6  2552 CD_MAP:
                                     0BB6  2553 
                  52   0104 C5   D0  0BB6  2554 	MOVL	UCB$L_CD_CSVA(R5),R2	; pickup SVA for cache buffer mapped
                                     0BBB  2555 ;*	INVALIDATE_TB	addr=R2,-	; invalidate translation buffer
                                     0BBB  2556 ;*	inst1=<INSV (R0),#PTE$V_PFN,#PTE$S_PFN,@UCB$L_CD_CSPTE(R5)>
                                     0BBB  2557 ;*					;  inserting PFN of cached data in SPTE
                       3A   52   DA  0BBB  2558 	MTPR	R2,#PR$_TBIS		; invalidate local CPU TB
        0100 D5   15   00   60   F0  0BBE  2559 	INSV	(R0),#PTE$V_PFN,#PTE$S_PFN,@UCB$L_CD_CSPTE(R5)
                                     0BC5  2560 					;  and insert PFN of cached data in SPTE
                  50   0108 C5   D0  0BC5  2561 	MOVL	UCB$L_CD_USPTE(R5),R0	; pickup SPTE address to map user buffer
                  53   0118 D5   D0  0BCA  2562 	MOVL	@UCB$L_CD_SVAPTE(R5),R3	; pickup contents of user's PTE
                            06   19  0BCF  2563 	BLSS	5$			; branch if valid
                   00000000'GF   16  0BD1  2564 	JSB	G^IOC$PTETOPFN		; get PFN for invalid PTE
                                     0BD7  2565 5$:
                  51   010C C5   D0  0BD7  2566 	MOVL	UCB$L_CD_USVA(R5),R1	; get SVA for user buffer being mapped
                                     0BDC  2567 ;*	INVALIDATE_TB	addr=R1,-	; invalidate translation buffer
                                     0BDC  2568 ;*			inst1=<INSV R3,#PTE$V_PFN,#PTE$S_PFN,(R0)>
                                     0BDC  2569 ;*					;  inserting PFN of user buffer in SPTE
                       3A   51   DA  0BDC  2570 	MTPR	R1,#PR$_TBIS		; invalidate local CPU TB
             60   15   00   53   F0  0BDF  2571 	INSV	R3,#PTE$V_PFN,#PTE$S_PFN,(R0)
                                     0BE4  2572 					;  and insert PFN of cached data in SPTE
                       011C C5   B5  0BE4  2573 	TSTW	UCB$W_CD_BOFF(R5)	; page aligned buffer ??
                            27   13  0BE8  2574 	BEQL	18$			; branch if yes
                  53   0118 C5   D0  0BEA  2575 	MOVL	UCB$L_CD_SVAPTE(R5),R3	; get address of user PTE again
                    53   04 A3   D0  0BEF  2576 	MOVL	4(R3),R3		;  and pickup contents of next PTE
                            06   19  0BF3  2577 	BLSS	15$			; branch if valid
                   00000000'GF   16  0BF5  2578 	JSB	G^IOC$PTETOPFN		; get PFN for invalid PTE
                                     0BFB  2579 15$:
         52   51   00000200 8F   C1  0BFB  2580 	ADDL3	#512,R1,R2		; get SVA of 2nd page
                                     0C03  2581 ;*	INVALIDATE_TB	addr=R2,-		; invalidate translation buffer
                                     0C03  2582 ;*			inst1=<INSV R3,#PTE$V_PFN,#PTE$S_PFN,4(R0)>
                                     0C03  2583 ;*					;  inserting PFN for 2nd page in SPTE
                       3A   52   DA  0C03  2584 	MTPR	R2,#PR$_TBIS		; invalidate local CPU TB
          04 A0   15   00   53   F0  0C06  2585 	INSV	R3,#PTE$V_PFN,#PTE$S_PFN,4(R0)
                                     0C0C  2586 					;  and insert PFN of cached data in SPTE
                                     0C0C  2587 
                  51   011C C5   A8  0C0C  2588 	BISW	UCB$W_CD_BOFF(R5),R1	; merge byte offset into address	
                                     0C11  2589 18$:
                  50   0104 C5   D0  0C11  2590 	MOVL	UCB$L_CD_CSVA(R5),R0	; recover SVA for cache buffer mapped
                                 05  0C16  2591 	RSB
                                     0C17  2592 
                                     0C17  2593 ;
                                     0C17  2594 CD_END:
                                     0C17  2595 	.END
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  41
Symbol table                                                             26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

$$$                            = 00000024 R     02        IO$_SENSEMODE                  = 00000027                 
$$CHK                          = 00000000                 IO$_SETCHAR                    = 0000001A                 
$$LEN                          = 00000000                 IO$_SETMODE                    = 00000023                 
$$OP                           = 00000002                 IO$_VIRTUAL                    = 0000003F                 
$$TMP                          = 00000000                 IO$_WRITECHECK                 = 0000000A                 
..SMP_FLAG..                   = 00000100                 IO$_WRITEPBLK                  = 0000000B                 
AT$_NULL                       = 00000005                 IOC$GQ_POSTIQ                    ********   X   03        
CCB$B_AMOD                     = 00000009                 IOC$MNTVER                       ********   X   03        
CCB$C_LENGTH                   = 00000010                 IOC$PTETOPFN                     ********   X   03        
CCB$L_UCB                      = 00000000                 IOC$REQCOM                       ********   X   03        
CD$DDT                           00000000 RG    03        IOC$RETURN                       ********   X   03        
CD_ALTSTARTIO                    000007AD R     03        IPL$_MMG                       = 00000008                 
CD_BLKSIZ                      = 00000200                 IPL$_SYNCH                     = 00000008                 
CD_CACHESIZE                   = 00007FFF                 IPL$_TIMER                     = 00000008                 
CD_CANCELIO                      00000684 R     03        IRP$K_LENGTH                   = 000000A8                 
CD_CHECK                         00000A31 R     03        IRP$L_BCNT                     = 00000032                 
CD_CTRL_INIT                     00000094 R     03        IRP$L_IOST1                    = 00000038                 
CD_DELETE                        0000059E R     03        IRP$L_MEDIA                    = 00000038                 
CD_END                           00000C17 R     03        IRP$L_OBCNT                    = 00000044                 
CD_EXTEND                        00000465 R     03        IRP$L_PID                      = 0000000C                 
CD_FINISHIO                      0000022A R     03        IRP$L_SEGVBN                   = 00000048                 
CD_FINISHIOC                     000002B3 R     03        IRP$L_SVAPTE                   = 0000002C                 
CD_FUNCTABLE                     00000040 R     03        IRP$L_UCB                      = 0000001C                 
CD_INVALIDATE                    00000A02 R     03        IRP$L_WIND                     = 00000018                 
CD_IOPOST                        000008F2 R     03        IRP$M_PAGIO                    = 00000004                 
CD_LOAD                          00000A91 R     03        IRP$M_SWAPIO                   = 00000040                 
CD_LOCATE                        00000A74 R     03        IRP$S_FCODE                    = 00000006                 
CD_MAP                           00000BB6 R     03        IRP$V_BUFIO                    = 00000000                 
CD_MAXRECL                     = 0000001C                 IRP$V_FCODE                    = 00000000                 
CD_PURGE                         00000623 R     03        IRP$V_FUNC                     = 00000001                 
CD_READ                          00000B3D R     03        IRP$V_PHYSIO                   = 00000008                 
CD_READBLK                       0000017F R     03        IRP$V_SRVIO                    = 0000000E                 
CD_RECALL                        0000089E R     03        IRP$V_VIRTUAL                  = 00000004                 
CD_RECORD                        0000073B R     03        IRP$W_BCNT                     = 00000032                 
CD_RECORD_ALL                  = 00000001                 IRP$W_BOFF                     = 00000030                 
CD_REQCOM                        000006EA R     03        IRP$W_CHAN                     = 00000028                 
CD_RETURN                        000008E9 R     03        IRP$W_FUNC                     = 00000020                 
CD_SENSEMODE                     000001D9 R     03        IRP$W_STS                      = 0000002A                 
CD_SETMODE                       00000230 R     03        LDR$ALLOC_PT                     ********   X   03        
CD_SHUTDOWN                      0000042B R     03        LDR$GL_SPTBASE                   ********   X   03        
CD_STARTIO                       00000642 R     03        MASKH                          = 00020002                 
CD_STARTUP                       00000398 R     03        MASKL                          = 00001000                 
CD_STATS                         000009E4 R     03        MMG$ALLOCPFN                     ********   X   03        
CD_TIMEDIO                       0000069E R     03        MMG$RELPFN                       ********   X   03        
CD_UNIT_INIT                     000000AE R     03        MPW$GW_LOLIM                     ********   X   03        
CD_UNLOAD                        00000154 R     03        P1                             = 00000000                 
CPU$L_PHY_CPUID                = 00000268                 P2                             = 00000004                 
CPU$L_PSFL                     = 00000230                 P3                             = 00000008                 
CRB$L_INTD                     = 00000050                 P4                             = 0000000C                 
CTL$GL_CCBBASE                   ********   X   03        P5                             = 00000010                 
CTL$GW_CHINDX                    ********   X   03        P6                             = 00000014                 
DC$_DISK                       = 00000001                 PCB$L_PID                      = 00000060                 
DC$_MISC                       = 000000C8                 PENDQBL                          00000088 R     03        
DDB$L_DDT                      = 0000000C                 PENDQFL                          00000084 R     03        
DDB$L_UCB                      = 00000004                 PFN$AB_STATE                     ********   X   03        
DDB$T_NAME                     = 00000014                 PFN$AB_TYPE                      ********   X   03        
DDT$C_LENGTH                   = 00000040                 PFN$AL_PTE                       ********   X   03        
DDT$L_ALTSTART                 = 0000001C                 PFN$AW_REFCNT                    ********   X   03        
DDT$L_START                    = 00000000                 PFN$C_ACTIVE                   = 00000007                 
DEV$M_AVL                      = 00040000                 PFN$GL_PHYPGCNT                  ********   X   03        
DEV$M_IDV                      = 04000000                 PFN$M_DELCON                   = 00000010                 
DEV$M_NNM                      = 00000200                 PIB$K_LENGTH                     00000018                 
DEV$M_ODV                      = 08000000                 PIB$L_IRP                        00000008                 
DEV$M_SHR                      = 00010000                 PIB$L_LBN                        00000014                 
DPT$C_LENGTH                   = 00000082                 PIB$L_PENDQBL                    00000004                 
DPT$C_VERSION                  = 00000005                 PIB$L_PENDQFL                    00000000                 
DPT$INITAB                       00000082 R     02        PIB$L_PID                        0000000C                 
DPT$K_STRUC_CRB                = 00000005                 PIB$L_UCB                        00000010                 
DPT$K_STRUC_DDB                = 00000004                 PR$_IPL                        = 00000012                 
DPT$K_STRUC_UCB                = 00000002                 PR$_ISP                        = 00000004                 
DPT$M_SMPMOD                   = 00000100                 PR$_TBIS                       = 0000003A                 
DPT$M_SVP                      = 00000002                 PSL$S_PRVMOD                   = 00000002                 
DPT$REINITAB                     000000A1 R     02        PSL$V_PRVMOD                   = 00000016                 
DPT$TAB                          00000000 R     02        PTE$C_KW                       = 10000000                 
DYN$C_DPT                      = 0000001E                 PTE$M_PFN                      = 001FFFFF                 
DYN$C_FRK                      = 00000008                 PTE$M_VALID                    = 80000000                 
DYN$C_TQE                      = 0000000F                 PTE$S_PFN                      = 00000015                 
EXE$ALONONPAGED                  ********   X   03        PTE$V_PFN                      = 00000000                 
EXE$ALONPAGVAR                   ********   X   03        PURGE                            000002BE R     03        
EXE$DEANONPGDSIZ                 ********   X   03        READ                             00000839 R     03        
EXE$DEBIT_BYTCNT_ALO             ********   X   03        SCH$GL_FREECNT                   ********   X   03        
EXE$FINISHIO                     ********   X   03        SGN$GL_FREELIM                   ********   X   03        
EXE$FINISHIOC                    ********   X   03        SGN$GL_MAXWSCNT                  ********   X   03        
EXE$GQ_SYSTIME                   ********   X   03        SHUTDOWN                         000002B9 R     03        
EXE$INSTIMQ                      ********   X   03        SIZ...                         = 00000001                 
EXE$QIODRVPKT                    ********   X   03        SMP$ACQUIRE                      ********   X   03        
EXE$READCHK                      ********   X   03        SMP$AL_IPLVEC                    ********   X   03        
EXE$SENSEMODE                    ********   X   03        SMP$GL_BASE_MSK                  ********   X   03        
EXTEND                           000002C3 R     03        SMP$GL_FLAGS                     ********   X   03        
FCB$W_FID_NUM                  = 00000024                 SMP$GL_PRIMID                    ********   X   03        
FKB$C_LENGTH                   = 00000018                 SMP$RELEASE                      ********   X   03        
FKB$K_LENGTH                   = 00000018                 SMP$RESTORE                      ********   X   03        
FKB$W_SIZE                     = 00000008                 SMP$V_ENABLED                  = 00000000                 
FREEQBL                          00000090 R     03        SPL$C_IOLOCK8                  = 00000034                 
FREEQFL                          0000008C R     03        SPL$C_MMG                      = 00000030                 
FUNCTAB_LEN                    = 00000040                 SPL$C_QUEUEAST                 = 00000036                 
IO$M_CD_EXTEND                 = 00000100                 SPL$C_TIMER                    = 00000032                 
IO$M_CD_PURGE                  = 00000200                 SS$_BADPARAM                   = 00000014                 
IO$M_CD_SETMODES               = 000003C0                 SS$_BUFFEROVF                  = 00000601                 
IO$M_CD_SHUTDOWN               = 00000080                 SS$_CANCEL                     = 00000830                 
IO$M_CD_STARTUP                = 00000040                 SS$_DEVACTIVE                  = 000002C4                 
IO$S_FMODIFIERS                = 0000000A                 SS$_DEVINACT                   = 000020D4                 
IO$V_CD_FLUSH                  = 0000000F                 SS$_DUPUNIT                    = 000021C4                 
IO$V_CD_GETINFO                = 00000006                 SS$_ILLIOFUNC                  = 000000F4                 
IO$V_CD_LOAD                   = 0000000E                 SS$_INSFMEM                    = 00000124                 
IO$V_CD_PAGSWAPIO              = 0000000D                 SS$_IVCHAN                     = 0000013C                 
IO$V_CD_RRD                    = 00000006                 SS$_NOPRIV                     = 00000024                 
IO$V_CD_STARTUP                = 00000006                 SS$_NORMAL                     = 00000001                 
IO$V_CD_ZERO                   = 0000000C                 SS$_NOTFILEDEV                 = 000001CC                 
IO$V_FMODIFIERS                = 00000006                 SS$_TIMEOUT                    = 0000022C                 
IO$V_TIMED                     = 00000007                 STARTUP                          000002E4 R     03        
IO$_READLBLK                   = 00000021                 TAG$K_LENGTH                     00000008                 
IO$_READPBLK                   = 0000000C                 TAG$K_REFCNT                   = 08000000                 
IO$_READVBLK                   = 00000031                 TAG$L_LBN                        00000000                 
IO$_SENSECHAR                  = 0000001B                 TAG$L_PFN                        00000004                 
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  42
Symbol table                                                             26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

TAG$M_PFN                      = 00FFFFFF                 
TAG$M_REFCNT                   = F8000000                 
TAG$M_REREAD                   = 01000000                 
TAG$M_VALID                    = 04000000                 
TAG$M_WRLOAD                   = 02000000                 
TAG$V_REREAD                   = 00000018                 
TAG$V_VALID                    = 0000001A                 
TAG$V_WRLOAD                   = 00000019                 
TQE$C_LENGTH                   = 00000034                 
TQE$C_SSSNGL                   = 00000001                 
TQE$K_LENGTH                   = 00000034                 
TQE$L_FPC                      = 0000000C                 
TQE$L_FR3                      = 00000010                 
TQE$L_TQFL                     = 00000000                 
TQE$W_SIZE                     = 00000008                 
UCB                              00000080 R     03        
UCB$B_DEVCLASS                 = 0000004C                 
UCB$B_DIPL                     = 00000072                 
UCB$B_FLCK                     = 0000000B                 
UCB$B_SECTORS                  = 00000050                 
UCB$B_TRACKS                   = 00000051                 
UCB$K_CD_LENGTH                  00000164                 
UCB$K_LENGTH                   = 000000A4                 
UCB$L_CD_CACHESIZE               0000013C                 
UCB$L_CD_CSPTE                   00000100                 
UCB$L_CD_CSVA                    00000104                 
UCB$L_CD_DSKDDT                  00000114                 
UCB$L_CD_DSKSTARTIO              00000110                 
UCB$L_CD_DSKUCB                = 00000054                 
UCB$L_CD_RDBLK                   00000144                 
UCB$L_CD_RDCNT                   00000140                 
UCB$L_CD_RDHIT                   00000150                 
UCB$L_CD_RDLOAD                  00000148                 
UCB$L_CD_RDONCE                  0000014C                 
UCB$L_CD_SETCOUNT                00000138                 
UCB$L_CD_SETSIZE                 00000134                 
UCB$L_CD_SVAPTE                  00000118                 
UCB$L_CD_TAGADDR                 000000FC                 
UCB$L_CD_TAGSIZE                 000000F8                 
UCB$L_CD_USPTE                   00000108                 
UCB$L_CD_USVA                    0000010C                 
UCB$L_CD_WRBLK                   00000158                 
UCB$L_CD_WRCNT                   00000154                 
UCB$L_CD_WRLOAD                  0000015C                 
UCB$L_CD_WRONCE                  00000160                 
UCB$L_DDB                      = 0000002C                 
UCB$L_DDT                      = 0000009C                 
UCB$L_DEVCHAR                  = 0000003C                 
UCB$L_DEVCHAR2                 = 00000040                 
UCB$L_DEVDEPEND                = 00000050                 
UCB$L_DEVDEPND2                = 00000054                 
UCB$L_IRP                      = 0000006C                 
UCB$L_LINK                     = 00000034                 
UCB$L_SVAPTE                   = 0000008C                 
UCB$L_SVPN                     = 00000088                 
UCB$M_CD_ACTIVE                = 00000040                 
UCB$M_CD_ALLOC                 = 00000020                 
UCB$M_CD_DEFAULT               = 00000000                 
UCB$M_CD_FLUSH                 = 00000001                 
UCB$M_CD_LOAD                  = 00000002                 
UCB$M_CD_PAGSWAPIO             = 00000004                 
UCB$M_CD_RRD                   = 00000008                 
UCB$M_CD_TIMED                 = 00000010                 
UCB$M_ONLINE                   = 00000010                 
UCB$Q_CD_FLBN                    000000D8                 
UCB$T_CD_FKB                     000000E0                 
UCB$T_CD_INFO                    00000120                 
UCB$T_CD_NAME                    00000120                 
UCB$T_CD_STATS                   00000140                 
UCB$T_CD_TQE                     000000A4                 
UCB$V_BSY                      = 00000008                 
UCB$V_CD_ACTIVE                = 00000006                 
UCB$V_CD_ALLOC                 = 00000005                 
UCB$V_CD_FLUSH                 = 00000000                 
UCB$V_CD_LOAD                  = 00000001                 
UCB$V_CD_PAGSWAPIO             = 00000002                 
UCB$V_CD_TIMED                 = 00000004                 
UCB$V_NOCNVRT                  = 00000002                 
UCB$W_BCNT                     = 00000092                 
UCB$W_CD_BOFF                    0000011C                 
UCB$W_CD_RESERVED                00000132                 
UCB$W_CD_UNIT                    00000130                 
UCB$W_DEVBUFSIZ                = 0000004E                 
UCB$W_DEVSTS                   = 0000007C                 
UCB$W_STS                      = 00000078                 
UCB$W_UNIT                     = 00000068                 
VA$V_SYSTEM                    = 0000001F                 
VEC$L_INITIAL                  = 0000000C                 
VEC$L_UNITINIT                 = 00000018                 
WCB$L_FCB                      = 00000018                 
WRITE                            0000087C R     03        
ZERO                             00000289 R     03        
ZERO1                            0000028E R     03        

                                                +----------------+
                                                ! Psect synopsis !
                                                +----------------+

PSECT name                      Allocation          PSECT No.  Attributes     
----------                      ----------          ---------  ----------     
.  ABS  .                       00000000  (    0.)  00 (  0.)  NOPIC   USR   CON   ABS   LCL NOSHR NOEXE NORD  NOWRT NOVEC BYTE  
$ABS$                           00000164  (  356.)  01 (  1.)  NOPIC   USR   CON   ABS   LCL NOSHR   EXE   RD    WRT NOVEC BYTE  
$$$105_PROLOGUE                 000000B1  (  177.)  02 (  2.)  NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT NOVEC BYTE  
$$$115_DRIVER                   00000C17  ( 3095.)  03 (  3.)  NOPIC   USR   CON   REL   LCL NOSHR   EXE   RD    WRT NOVEC LONG  
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  43
Cross reference                                                          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)


                                             +------------------------+
                                             ! Symbol Cross Reference !
                                             +------------------------+

SYMBOL                          VALUE        DEFINITION      REFERENCES... 
------                          -----        ----------      ------------- 
$$$                            =00000024-R   181    (3)      181    (3)    
$$CHK                          =00000000     2007   (3)    
$$LEN                          =00000000     2007   (3)    
$$OP                           =00000002     206    (3)      185    (3)      186    (3)      191    (3)      193    (3)    
                                                             194    (3)      196    (3)      200    (3)      203    (3)    
                                                             206    (3)    
$$TMP                          =00000000     2007   (3)    
..SMP_FLAG..                   =00000100     2110   (3)      181    (3)    
AT$_NULL                       =00000005                     181    (3)    
CCB$B_AMOD                     =00000009                   #-852    (3)    
CCB$C_LENGTH                   =00000010                   #-841    (3)    
CCB$L_UCB                      =00000000                   #-857    (3)    
CD$DDT                          00000000-R   220    (3)      200    (3)      220    (3)    
CD_ALTSTARTIO                   000007AD-R   1628   (3)      220    (3)    
CD_BLKSIZ                      =00000200     160    (3)      196    (3)    
CD_CACHESIZE                   =00007FFF                   #-799    (3)    #-817    (3)    
CD_CANCELIO                     00000684-R   1369   (3)      220    (3)    
CD_CHECK                        00000A31-R   2208   (3)    #-1807   (3)    
CD_CTRL_INIT                    00000094-R   343    (3)      203    (3)    
CD_DELETE                       0000059E-R   1201   (3)    #-1024   (3)    
CD_END                          00000C17-R   2594   (3)      181    (3)    
CD_EXTEND                       00000465-R   1069   (3)    #-801    (3)    #-947    (3)    
CD_FINISHIO                     0000022A-R   668    (3)    
CD_FINISHIOC                    000002B3-R   781    (3)    #-592    (3)    #-744    (3)    #-749    (3)    #-807    (3)    
                                                           #-818    (3)    #-855    (3)    
CD_FUNCTABLE                    00000040-R   225    (3)      220    (3)    
CD_INVALIDATE                   00000A02-R   2157   (3)    #-2105   (3)    
CD_IOPOST                       000008F2-R   2000   (3)      1938   (3)    
CD_LOAD                         00000A91-R   2328   (3)    #-2096   (3)    
CD_LOCATE                       00000A74-R   2267   (3)    #-2159   (3)    #-2209   (3)    #-2337   (3)    
CD_MAP                          00000BB6-R   2552   (3)    #-2385   (3)    #-2481   (3)    
CD_MAXRECL                     =0000001C     161    (3)    #-1535   (3)    #-568    (3)    
CD_PURGE                        00000623-R   1276   (3)    #-789    (3)    
CD_READ                         00000B3D-R   2453   (3)    #-1811   (3)    
CD_READBLK                      0000017F-R   562    (3)      260    (3)    
CD_RECALL                       0000089E-R   1913   (3)    #-1809   (3)    #-1812   (3)    #-1906   (3)    #-1930   (3)    
CD_RECORD                       0000073B-R   1508   (3)    #-1699   (3)    
CD_RECORD_ALL                  =00000001     77     (2)    
CD_REQCOM                       000006EA-R   1436   (3)    #-1376   (3)    #-1407   (3)    #-1540   (3)    
CD_RETURN                       000008E9-R   1943   (3)    #-1702   (3)    #-1733   (3)    #-1817   (3)    #-1904   (3)    
CD_SENSEMODE                    000001D9-R   638    (3)      251    (3)    
CD_SETMODE                      00000230-R   733    (3)      247    (3)    
CD_SHUTDOWN                     0000042B-R   1005   (3)    #-785    (3)    
CD_STARTIO                      00000642-R   1321   (3)      220    (3)    
CD_STARTUP                      00000398-R   920    (3)    #-866    (3)    
CD_STATS                        000009E4-R   2120   (3)    #-1282   (3)    #-2167   (3)    #-2373   (3)    
CD_TIMEDIO                      0000069E-R   1399   (3)      423    (3)    
CD_UNIT_INIT                    000000AE-R   398    (3)      206    (3)    
CD_UNLOAD                       00000154-R   496    (3)      181    (3)    
CPU$L_PHY_CPUID                =00000268                   #-2031   (3)    
CPU$L_PSFL                     =00000230                     2042   (3)    
CRB$L_INTD                     =00000050                     203    (3)      206    (3)    
CTL$GL_CCBBASE                  00000000-XR                #-847    (3)    
CTL$GW_CHINDX                   00000000-XR                #-844    (3)    
DC$_DISK                       =00000001                   #-923    (3)    
DC$_MISC                       =000000C8                     194    (3)    
DDB$L_DDT                      =0000000C                     200    (3)    
DDB$L_UCB                      =00000004                   #-345    (3)    #-401    (3)    
DDB$T_NAME                     =00000014                   #-953    (3)    
DDT$C_LENGTH                   =00000040                     220    (3)    
DDT$L_ALTSTART                 =0000001C                   #-962    (3)    #-967    (3)    
DDT$L_START                    =00000000                   #-1021   (3)    #-962    (3)    #-965    (3)    #-967    (3)    
DEV$M_AVL                      =00040000                     191    (3)    
DEV$M_IDV                      =04000000                     191    (3)    
DEV$M_NNM                      =00000200                     193    (3)    
DEV$M_ODV                      =08000000                     191    (3)    
DEV$M_SHR                      =00010000                     191    (3)    
DPT$C_LENGTH                   =00000082                     181    (3)    
DPT$C_VERSION                  =00000005                     181    (3)    
DPT$INITAB                      00000082-R   183    (3)      181    (3)    
DPT$K_STRUC_CRB                =00000005                     203    (3)      206    (3)    
DPT$K_STRUC_DDB                =00000004                     200    (3)    
DPT$K_STRUC_UCB                =00000002                     185    (3)      186    (3)      191    (3)      193    (3)    
                                                             194    (3)      196    (3)    
DPT$M_SMPMOD                   =00000100                     1097   (3)      1168   (3)      1209   (3)      1233   (3)    
                                                             1403   (3)      1410   (3)      1440   (3)      1445   (3)    
                                                             2007   (3)      2110   (3)      754    (3)      778    (3)    
                                                             862    (3)    
DPT$M_SVP                      =00000002                     181    (3)    
DPT$REINITAB                    000000A1-R   198    (3)      181    (3)    
DPT$TAB                         00000000-R   181    (3)      181    (3)      200    (3)      203    (3)      206    (3)    
DYN$C_DPT                      =0000001E                     181    (3)    
DYN$C_FRK                      =00000008                   #-417    (3)    
DYN$C_TQE                      =0000000F                   #-420    (3)    
EXE$ALONONPAGED                 00000000-XR                  1918   (3)    
EXE$ALONPAGVAR                  00000000-XR                  1079   (3)    
EXE$DEANONPGDSIZ                00000000-XR                  1090   (3)      1236   (3)    
EXE$DEBIT_BYTCNT_ALO            00000000-XR                  574    (3)    
EXE$FINISHIO                    00000000-XR                  669    (3)    
EXE$FINISHIOC                   00000000-XR                  782    (3)    
EXE$GQ_SYSTIME                  00000000-XR                #-1329   (3)    
EXE$INSTIMQ                     00000000-XR                  1332   (3)    
EXE$QIODRVPKT                   00000000-XR                  587    (3)    
EXE$READCHK                     00000000-XR                  571    (3)      646    (3)    
EXE$SENSEMODE                   00000000-XR                  255    (3)    
EXTEND                          000002C3-R   792    (3)      760    (3)    
FCB$W_FID_NUM                  =00000024                   #-1527   (3)    
FKB$C_LENGTH                   =00000018                   #-417    (3)    
FKB$W_SIZE                     =00000008                   #-418    (3)    
FREEQBL                         00000090-R   279    (3)    #-349    (3)    
FREEQFL                         0000008C-R   277    (3)      1914   (3)      1925   (3)      2046   (3)      348    (3)    
                                                             349    (3)    
FUNCTAB_LEN                    =00000040     260    (3)      220    (3)      234    (3)      243    (3)      247    (3)    
                                                             251    (3)      255    (3)      260    (3)    
IO$M_CD_SETMODES               =000003C0                   #-735    (3)    
IO$S_FMODIFIERS                =0000000A                   #-737    (3)    
IO$V_CD_FLUSH                  =0000000F                   #-823    (3)    
IO$V_CD_GETINFO                =00000006                   #-639    (3)    
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  44
Cross reference                                                          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

IO$V_CD_LOAD                   =0000000E                   #-826    (3)    
IO$V_CD_PAGSWAPIO              =0000000D                   #-829    (3)    
IO$V_CD_RRD                    =00000006                   #-1337   (3)    
IO$V_CD_STARTUP                =00000006                   #-745    (3)    
IO$V_CD_ZERO                   =0000000C                   #-768    (3)    
IO$V_FMODIFIERS                =00000006                   #-737    (3)    #-756    (3)    
IO$V_TIMED                     =00000007                   #-582    (3)    
IO$_READLBLK                   =00000021                     234    (3)      243    (3)      260    (3)    
IO$_READPBLK                   =0000000C                   #-1729   (3)    #-1794   (3)    #-2074   (3)      234    (3)    
                                                           #-2345   (3)    #-2362   (3)    #-2374   (3)      243    (3)    
                                                             260    (3)    
IO$_READVBLK                   =00000031                     234    (3)      243    (3)      260    (3)    
IO$_SENSECHAR                  =0000001B                     234    (3)      243    (3)      251    (3)      255    (3)    
IO$_SENSEMODE                  =00000027                     234    (3)      243    (3)      251    (3)      255    (3)    
IO$_SETCHAR                    =0000001A                     234    (3)      243    (3)      247    (3)    
IO$_SETMODE                    =00000023                     234    (3)      243    (3)      247    (3)    
IO$_VIRTUAL                    =0000003F                     234    (3)      243    (3)      247    (3)      251    (3)    
                                                             255    (3)      260    (3)    
IO$_WRITECHECK                 =0000000A                   #-2087   (3)    
IO$_WRITEPBLK                  =0000000B                   #-1731   (3)    #-1893   (3)    #-2089   (3)    
IOC$GQ_POSTIQ                   00000000-XR                  2036   (3)    
IOC$MNTVER                      00000000-XR                  220    (3)    
IOC$PTETOPFN                    00000000-XR                  2564   (3)      2578   (3)    
IOC$REQCOM                      00000000-XR                  1452   (3)      1814   (3)    
IOC$RETURN                      00000000-XR                  220    (3)    
IPL$_MMG                       =00000008                   #-1097   (3)    #-1209   (3)    
IPL$_SYNCH                     =00000008                     1322   (3)      186    (3)    
IPL$_TIMER                     =00000008                     1322   (3)    #-1440   (3)    
IRP$K_LENGTH                   =000000A8                   #-1917   (3)    
IRP$L_BCNT                     =00000032                   #-1529   (3)    #-1688   (3)    #-2062   (3)    #-2461   (3)    
                                                           #-2498   (3)    #-2500   (3)    
IRP$L_IOST1                    =00000038                   #-2063   (3)    #-2066   (3)    #-2069   (3)    
IRP$L_MEDIA                    =00000038                   #-1325   (3)    #-1667   (3)    #-1675   (3)    #-1677   (3)    
                                                           #-1681   (3)    #-581    (3)    #-584    (3)    
IRP$L_OBCNT                    =00000044                   #-1529   (3)    #-2064   (3)    
IRP$L_PID                      =0000000C                   #-1371   (3)    #-1517   (3)    #-1934   (3)    #-1938   (3)    
                                                           #-2020   (3)    
IRP$L_SEGVBN                   =00000048                   #-1521   (3)    
IRP$L_SVAPTE                   =0000002C                   #-1447   (3)    #-2333   (3)    #-2456   (3)    #-578    (3)    
IRP$L_UCB                      =0000001C                   #-2002   (3)    
IRP$L_WIND                     =00000018                   #-1523   (3)    
IRP$M_PAGIO                    =00000004                   #-1796   (3)    #-1895   (3)    #-2081   (3)    
IRP$M_SWAPIO                   =00000040                   #-1796   (3)    #-1895   (3)    #-2081   (3)    
IRP$S_FCODE                    =00000006                   #-1691   (3)    #-2072   (3)    #-2331   (3)    
IRP$V_BUFIO                    =00000000                   #-1700   (3)    
IRP$V_FCODE                    =00000000                   #-1691   (3)    #-2072   (3)    #-2331   (3)    
IRP$V_FUNC                     =00000001                   #-1708   (3)    
IRP$V_PHYSIO                   =00000008                   #-1665   (3)    
IRP$V_SRVIO                    =0000000E                   #-1710   (3)    
IRP$V_VIRTUAL                  =00000004                   #-1518   (3)    
IRP$W_BCNT                     =00000032                   #-1449   (3)    
IRP$W_BOFF                     =00000030                   #-577    (3)    
IRP$W_CHAN                     =00000028                   #-1373   (3)    
IRP$W_FUNC                     =00000020                     1337   (3)    #-1514   (3)      1691   (3)      2072   (3)    
                                                             2331   (3)      582    (3)      639    (3)    #-735    (3)    
                                                             768    (3)    #-822    (3)    
IRP$W_STS                      =0000002A                   #-1515   (3)      1518   (3)      1665   (3)      1700   (3)    
                                                             1708   (3)      1710   (3)    #-1796   (3)    #-1895   (3)    
                                                           #-2081   (3)    
LDR$ALLOC_PT                    00000000-XR                  431    (3)    
LDR$GL_SPTBASE                  00000000-XR                #-433    (3)    
MASKH                          =00020002     260    (3)      234    (3)      243    (3)      247    (3)      251    (3)    
                                                             255    (3)      260    (3)    
MASKL                          =00001000     260    (3)      234    (3)      243    (3)      247    (3)      251    (3)    
                                                             255    (3)      260    (3)    
MMG$ALLOCPFN                    00000000-XR                  1125   (3)    
MMG$RELPFN                      00000000-XR                  1225   (3)    
MPW$GW_LOLIM                    00000000-XR                #-1105   (3)    
P1                             =00000000     150    (3)    #-570    (3)    #-580    (3)    #-645    (3)    #-794    (3)    
                                                           #-841    (3)    
P2                             =00000004     151    (3)    #-567    (3)    #-643    (3)    #-661    (3)    #-664    (3)    
                                                           #-814    (3)    #-858    (3)    
P3                             =00000008     152    (3)    #-584    (3)    #-810    (3)    
P4                             =0000000C     153    (3)    
P5                             =00000010     154    (3)    
P6                             =00000014     155    (3)    
PCB$L_PID                      =00000060                   #-1371   (3)    
PENDQBL                         00000088-R   275    (3)      1939   (3)    #-347    (3)    
PENDQFL                         00000084-R   273    (3)      2003   (3)      346    (3)      347    (3)      505    (3)    
PFN$AB_STATE                    00000000-XR                #-1120   (3)    #-1211   (3)    
PFN$AB_TYPE                     00000000-XR                #-1121   (3)    
PFN$AL_PTE                      00000000-XR                #-1212   (3)    
PFN$AW_REFCNT                   00000000-XR                #-1119   (3)    #-1210   (3)    
PFN$C_ACTIVE                   =00000007                   #-1134   (3)    #-1221   (3)    
PFN$GL_PHYPGCNT                 00000000-XR                #-1108   (3)    #-1137   (3)    #-1227   (3)    
PFN$M_DELCON                   =00000010                   #-1134   (3)    #-1221   (3)    
PIB$K_LENGTH                    00000018                   #-1923   (3)    #-1926   (3)    
PIB$L_IRP                       00000008                   #-1933   (3)    #-2015   (3)    
PIB$L_LBN                       00000014                   #-1937   (3)    #-2045   (3)    
PIB$L_PID                       0000000C                   #-1934   (3)    #-2020   (3)    
PIB$L_UCB                       00000010                   #-1936   (3)    #-2044   (3)    
PR$_IPL                        =00000012                   #-1097   (3)    #-1209   (3)    #-1403   (3)    #-1410   (3)    
                                                           #-1440   (3)    #-2007   (3)    #-2110   (3)    #-754    (3)    
                                                           #-778    (3)    #-862    (3)    
PR$_ISP                        =00000004                   #-2030   (3)    
PR$_TBIS                       =0000003A                   #-2558   (3)    #-2570   (3)    #-2584   (3)    
PSL$S_PRVMOD                   =00000002                   #-850    (3)    
PSL$V_PRVMOD                   =00000016                   #-850    (3)    
PTE$C_KW                       =10000000                   #-441    (3)    #-442    (3)    #-448    (3)    
PTE$M_PFN                      =001FFFFF                   #-441    (3)    #-442    (3)    #-448    (3)    
PTE$M_VALID                    =80000000                   #-441    (3)    #-442    (3)    #-448    (3)    
PTE$S_PFN                      =00000015                   #-1218   (3)    #-2559   (3)    #-2571   (3)    #-2585   (3)    
PTE$V_PFN                      =00000000                   #-1218   (3)    #-2559   (3)    #-2571   (3)    #-2585   (3)    
PURGE                           000002BE-R   788    (3)      761    (3)    
READ                            00000839-R   1789   (3)    #-1708   (3)    #-1730   (3)    
SCH$GL_FREECNT                  00000000-XR                #-1098   (3)    
SGN$GL_FREELIM                  00000000-XR                #-1099   (3)    #-1106   (3)    
SGN$GL_MAXWSCNT                 00000000-XR                #-1109   (3)    
SHUTDOWN                        000002B9-R   784    (3)      759    (3)    
SMP$ACQUIRE                     00000000-XR                  1097   (3)      1209   (3)      1403   (3)      1440   (3)    
                                                             2007   (3)      754    (3)      862    (3)    
SMP$AL_IPLVEC                   00000000-XR                #-1403   (3)    #-2007   (3)    #-754    (3)    #-862    (3)    
SMP$GL_BASE_MSK                 00000000-XR                #-2030   (3)    
SMP$GL_FLAGS                    00000000-XR                  1097   (3)    #-1168   (3)      1209   (3)    #-1233   (3)    
                                                           #-1403   (3)    #-1410   (3)      1440   (3)    #-1445   (3)    
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  45
Cross reference                                                          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                                                           #-2007   (3)    #-2110   (3)    #-754    (3)    #-778    (3)    
                                                           #-862    (3)    
SMP$GL_PRIMID                   00000000-XR                #-2031   (3)    
SMP$RELEASE                     00000000-XR                  1410   (3)      2110   (3)      778    (3)    
SMP$RESTORE                     00000000-XR                  1168   (3)      1233   (3)      1445   (3)    
SMP$V_ENABLED                  =00000000                     1097   (3)      1168   (3)      1209   (3)      1233   (3)    
                                                             1403   (3)      1410   (3)      1440   (3)      1445   (3)    
                                                             2007   (3)      2110   (3)      754    (3)      778    (3)    
                                                             862    (3)    
SPL$C_IOLOCK8                  =00000034                     185    (3)    
SPL$C_MMG                      =00000030                   #-1097   (3)    #-1168   (3)    #-1209   (3)    #-1233   (3)    
SPL$C_QUEUEAST                 =00000036                   #-417    (3)    
SPL$C_TIMER                    =00000032                   #-1440   (3)    #-1445   (3)    
SS$_BADPARAM                   =00000014                   #-566    (3)    #-793    (3)    #-809    (3)    
SS$_BUFFEROVF                  =00000601                   #-663    (3)    
SS$_CANCEL                     =00000830                   #-1375   (3)    
SS$_DEVACTIVE                  =000002C4                   #-511    (3)    #-806    (3)    
SS$_DEVINACT                   =000020D4                   #-563    (3)    #-747    (3)    
SS$_DUPUNIT                    =000021C4                   #-932    (3)    
SS$_ILLIOFUNC                  =000000F4                   #-742    (3)    
SS$_INSFMEM                    =00000124                   #-1154   (3)    
SS$_IVCHAN                     =0000013C                   #-840    (3)    
SS$_NOPRIV                     =00000024                   #-848    (3)    
SS$_NORMAL                     =00000001                   #-1025   (3)    #-1162   (3)    #-1286   (3)    #-1538   (3)    
                                                           #-2499   (3)    #-508    (3)    #-658    (3)    #-734    (3)    
                                                           #-970    (3)    
SS$_NOTFILEDEV                 =000001CC                   #-922    (3)    
SS$_TIMEOUT                    =0000022C                   #-1406   (3)    
STARTUP                         000002E4-R   804    (3)      758    (3)    
TAG$K_LENGTH                    00000008                     1068   (3)    #-1076   (3)    #-1081   (3)    #-1116   (3)    
                                                           #-1148   (3)    #-1228   (3)      1275   (3)      2207   (3)    
                                                           #-2273   (3)      2327   (3)    #-2335   (3)    #-2354   (3)    
                                                             2452   (3)    #-2458   (3)    
TAG$K_REFCNT                   =08000000                   #-2223   (3)    
TAG$L_LBN                       00000000                     1067   (3)      1274   (3)      2206   (3)      2326   (3)    
                                                             2451   (3)    
TAG$L_PFN                       00000004                     1067   (3)    #-1206   (3)      1274   (3)      2206   (3)    
                                                             2326   (3)    #-2352   (3)      2451   (3)    
TAG$M_PFN                      =00FFFFFF                   #-2130   (3)    #-2350   (3)    
TAG$M_REFCNT                   =F8000000                   #-2219   (3)    #-2388   (3)    
TAG$M_REREAD                   =01000000                   #-2486   (3)    
TAG$M_VALID                    =04000000                   #-2388   (3)    
TAG$M_WRLOAD                   =02000000                   #-2382   (3)    
TAG$V_REREAD                   =00000018                   #-2122   (3)    
TAG$V_VALID                    =0000001A                   #-2121   (3)    #-2217   (3)    #-2222   (3)    #-2344   (3)    
                                                           #-2475   (3)    
TAG$V_WRLOAD                   =00000019                   #-2123   (3)    
TQE$C_LENGTH                   =00000034                   #-420    (3)    
TQE$C_SSSNGL                   =00000001                   #-420    (3)    
TQE$L_FPC                      =0000000C                   #-423    (3)    
TQE$L_FR3                      =00000010                   #-1328   (3)    
TQE$L_TQFL                     =00000000                     1441   (3)    
TQE$W_SIZE                     =00000008                   #-421    (3)    
UCB                             00000080-R   271    (3)    #-1012   (3)    #-1630   (3)    #-345    (3)    #-401    (3)    
                                                           #-498    (3)    #-926    (3)    
UCB$B_DEVCLASS                 =0000004C                     194    (3)    #-923    (3)    
UCB$B_DIPL                     =00000072                     186    (3)    
UCB$B_FLCK                     =0000000B                   #-1403   (3)    #-1410   (3)      185    (3)    #-2007   (3)    
                                                           #-2110   (3)    #-754    (3)    #-778    (3)    #-862    (3)    
                                                           #-863    (3)    
UCB$B_SECTORS                  =00000050                   #-1679   (3)    
UCB$B_TRACKS                   =00000051                   #-1674   (3)    
UCB$K_CD_LENGTH                 00000164                     181    (3)    #-413    (3)    #-650    (3)    #-659    (3)    
                                                           #-772    (3)    
UCB$L_CD_CACHESIZE              0000013C                   #-1073   (3)    #-1081   (3)    #-1116   (3)    #-1142   (3)    
                                                           #-1148   (3)    #-1169   (3)    #-1229   (3)      1239   (3)    
                                                           #-1279   (3)    #-408    (3)    #-797    (3)    #-971    (3)    
UCB$L_CD_CSPTE                  00000100                     2559   (3)    #-447    (3)    
UCB$L_CD_CSVA                   00000104                   #-2554   (3)    #-2590   (3)    #-453    (3)    
UCB$L_CD_DSKDDT                 00000114                   #-1635   (3)    #-960    (3)    
UCB$L_CD_DSKSTARTIO             00000110                   #-1021   (3)    #-1638   (3)    #-1944   (3)    #-939    (3)    
                                                           #-965    (3)    
UCB$L_CD_DSKUCB                =00000054                   #-1008   (3)    #-1010   (3)    #-1014   (3)    #-1640   (3)    
                                                           #-1813   (3)    #-1945   (3)    #-404    (3)    #-667    (3)    
                                                           #-928    (3)    #-950    (3)    
UCB$L_CD_RDBLK                  00000144                   #-1803   (3)    
UCB$L_CD_RDCNT                  00000140                   #-1802   (3)    
UCB$L_CD_RDHIT                  00000150                   #-1810   (3)    
UCB$L_CD_RDLOAD                 00000148                   #-2377   (3)    
UCB$L_CD_RDONCE                 0000014C                   #-2124   (3)    
UCB$L_CD_SETCOUNT               00000138                   #-1140   (3)      1239   (3)    #-1240   (3)    #-2268   (3)    
                                                           #-2270   (3)      405    (3)    
UCB$L_CD_SETSIZE                00000134                   #-1115   (3)    #-1141   (3)    #-2162   (3)    #-2213   (3)    
                                                           #-2272   (3)    #-2335   (3)    #-2458   (3)      405    (3)    
                                                           #-406    (3)    #-796    (3)    #-810    (3)    #-812    (3)    
                                                           #-816    (3)    #-858    (3)    
UCB$L_CD_SVAPTE                 00000118                   #-2333   (3)    #-2391   (3)    #-2456   (3)    #-2489   (3)    
                                                           #-2562   (3)    #-2575   (3)    
UCB$L_CD_TAGADDR                000000FC                     1066   (3)      1086   (3)    #-1088   (3)    #-1118   (3)    
                                                           #-1151   (3)    #-1206   (3)    #-1234   (3)      1237   (3)    
                                                           #-1277   (3)    #-2174   (3)    #-2230   (3)    #-2274   (3)    
                                                           #-2396   (3)    #-2494   (3)      409    (3)    
UCB$L_CD_TAGSIZE                000000F8                     1066   (3)    #-1077   (3)    #-1089   (3)    #-1093   (3)    
                                                           #-1235   (3)      1237   (3)    #-1238   (3)      409    (3)    
                                                           #-410    (3)    
UCB$L_CD_USPTE                  00000108                   #-2561   (3)    #-440    (3)    
UCB$L_CD_USVA                   0000010C                   #-2566   (3)    #-438    (3)    
UCB$L_CD_WRBLK                  00000158                   #-1902   (3)    
UCB$L_CD_WRCNT                  00000154                   #-1901   (3)    
UCB$L_CD_WRLOAD                 0000015C                   #-2381   (3)    
UCB$L_CD_WRONCE                 00000160                   #-2127   (3)    
UCB$L_DDB                      =0000002C                   #-400    (3)    #-953    (3)    
UCB$L_DDT                      =0000009C                   #-1011   (3)    #-1016   (3)    #-1635   (3)    #-936    (3)    
                                                           #-959    (3)    #-961    (3)    
UCB$L_DEVCHAR                  =0000003C                     191    (3)    
UCB$L_DEVCHAR2                 =00000040                     193    (3)    
UCB$L_DEVDEPEND                =00000050                   #-1006   (3)    #-1163   (3)      1202   (3)    #-1323   (3)    
                                                           #-1334   (3)    #-1339   (3)    #-1404   (3)      1437   (3)    
                                                             1799   (3)      1804   (3)      1898   (3)      1904   (3)    
                                                             2047   (3)      2079   (3)      2084   (3)      2364   (3)    
                                                           #-403    (3)    #-500    (3)      564    (3)      648    (3)    
                                                             749    (3)      807    (3)    #-832    (3)    #-951    (3)    
UCB$L_IRP                      =0000006C                   #-1539   (3)    
UCB$L_LINK                     =00000034                   #-1019   (3)    #-1643   (3)    #-503    (3)    #-942    (3)    
UCB$L_SVAPTE                   =0000008C                   #-1342   (3)    #-1447   (3)    #-1512   (3)    #-1534   (3)    
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  46
Cross reference                                                          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

UCB$L_SVPN                     =00000088                   #-444    (3)    
UCB$M_CD_ACTIVE                =00000040                   #-1006   (3)    #-500    (3)    #-951    (3)    
UCB$M_CD_ALLOC                 =00000020                   #-1163   (3)    #-500    (3)    
UCB$M_CD_DEFAULT               =00000000                   #-403    (3)    #-821    (3)    
UCB$M_CD_FLUSH                 =00000001                   #-824    (3)    
UCB$M_CD_LOAD                  =00000002                   #-827    (3)    
UCB$M_CD_PAGSWAPIO             =00000004                   #-830    (3)    
UCB$M_CD_RRD                   =00000008                   #-1323   (3)    #-1339   (3)    
UCB$M_CD_TIMED                 =00000010                   #-1323   (3)    #-1334   (3)    #-1404   (3)    
UCB$M_ONLINE                   =00000010                   #-458    (3)    
UCB$T_CD_FKB                    000000E0                   #-418    (3)    
UCB$T_CD_INFO                   00000120                   #-413    (3)    #-650    (3)      654    (3)    #-659    (3)    
UCB$T_CD_NAME                   00000120                   #-955    (3)    #-956    (3)    
UCB$T_CD_STATS                  00000140                   #-772    (3)    
UCB$T_CD_TQE                    000000A4                   #-1327   (3)    #-1333   (3)    #-1400   (3)    #-1411   (3)    
                                                             1441   (3)    #-421    (3)    #-423    (3)    
UCB$V_BSY                      =00000008                   #-1370   (3)    #-1509   (3)    
UCB$V_CD_ACTIVE                =00000006                   #-2047   (3)    #-564    (3)    #-648    (3)    #-749    (3)    
                                                           #-807    (3)    
UCB$V_CD_ALLOC                 =00000005                   #-1202   (3)    #-1804   (3)    #-1904   (3)    
UCB$V_CD_FLUSH                 =00000000                   #-2079   (3)    
UCB$V_CD_LOAD                  =00000001                   #-2364   (3)    
UCB$V_CD_PAGSWAPIO             =00000002                   #-1799   (3)    #-1898   (3)    #-2084   (3)    
UCB$V_CD_TIMED                 =00000004                   #-1437   (3)    
UCB$V_NOCNVRT                  =00000002                   #-1668   (3)    
UCB$W_BCNT                     =00000092                   #-1513   (3)    #-1520   (3)    #-1535   (3)    
UCB$W_CD_BOFF                   0000011C                   #-2573   (3)    #-2588   (3)    
UCB$W_CD_UNIT                   00000130                   #-957    (3)    
UCB$W_DEVBUFSIZ                =0000004E                     196    (3)    
UCB$W_DEVSTS                   =0000007C                     1668   (3)    
UCB$W_STS                      =00000078                     1370   (3)      1509   (3)    #-458    (3)    
UCB$W_UNIT                     =00000068                   #-957    (3)    
VA$V_SYSTEM                    =0000001F                   #-436    (3)    #-451    (3)    
VEC$L_INITIAL                  =0000000C                     203    (3)    
VEC$L_UNITINIT                 =00000018                     206    (3)    
WCB$L_FCB                      =00000018                   #-1525   (3)    
WRITE                           0000087C-R   1888   (3)    #-1710   (3)    #-1732   (3)    
ZERO                            00000289-R   767    (3)    #-786    (3)    #-790    (3)    #-795    (3)    #-800    (3)    
                                                           #-802    (3)    
ZERO1                           0000028E-R   770    (3)    #-867    (3)    
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  47
Cross reference                                                          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)


                                             +------------------------+
                                             ! Macros Cross Reference !
                                             +------------------------+

MACRO             SIZE          DEFINITION       REFERENCES... 
-----             ----          ----------       ------------- 
$ACBDEF           2             104    (3)       104    (3)    
$CANDEF           1             105    (3)       105    (3)    
$CCBDEF           2             106    (3)       106    (3)    
$CPUDEF           16            107    (3)       107    (3)    
$CRBDEF           2             108    (3)       108    (3)    
$DCDEF            15            109    (3)       109    (3)    
$DDBDEF           2             110    (3)       110    (3)    
$DDTDEF           1             111    (3)       111    (3)       220    (3)    
$DEFINI           1             104    (3)       104    (3)       105    (3)       106    (3)       107    (3)       108    (3)    
                                                 109    (3)       110    (3)       111    (3)       112    (3)       113    (3)    
                                                 114    (3)       115    (3)       116    (3)       117    (3)       118    (3)    
                                                 119    (3)       120    (3)       121    (3)       122    (3)       123    (3)    
                                                 124    (3)       125    (3)       126    (3)       127    (3)       128    (3)    
                                                 129    (3)       130    (3)       131    (3)       132    (3)       133    (3)    
                                                 134    (3)       137    (3)       138    (3)       139    (3)       140    (3)    
$DEVDEF           5             112    (3)       112    (3)    
$DPTDEF           1             113    (3)       1097   (3)       113    (3)       1168   (3)       1209   (3)       1233   (3)    
                                                 1403   (3)       1410   (3)       1440   (3)       1445   (3)       181    (3)    
                                                 2007   (3)       2110   (3)       754    (3)       778    (3)       862    (3)    
$DYNDEF           12            114    (3)       114    (3)    
$FCBDEF           4             115    (3)       115    (3)    
$FKBDEF           1             116    (3)       116    (3)       140    (3)    
$IDBDEF           2             117    (3)       117    (3)    
$IODEF            1             118    (3)       118    (3)       137    (3)    
$IPLDEF           1             119    (3)       1097   (3)       119    (3)       1209   (3)       1440   (3)    
$IRPDEF           9             120    (3)       120    (3)    
$JIBDEF           4             121    (3)       121    (3)    
$PCBDEF           10            123    (3)       123    (3)    
$PFNDEF           3             122    (3)       122    (3)    
$PRDEF            1             124    (3)       1097   (3)       1209   (3)       124    (3)       1403   (3)       1410   (3)    
                                                 1440   (3)       2007   (3)       2030   (3)       2110   (3)       754    (3)    
                                                 778    (3)       862    (3)    
$PRTDEF           1             125    (3)       125    (3)    
$PSLDEF           2             126    (3)       126    (3)    
$PTEDEF           4             127    (3)       127    (3)    
$SPLCODDEF        1             128    (3)       1097   (3)       1168   (3)       1209   (3)       1233   (3)       128    (3)    
                                                 1403   (3)       1410   (3)       1440   (3)       1445   (3)       181    (3)    
                                                 2007   (3)       2110   (3)       754    (3)       778    (3)       862    (3)    
$SSDEF            25            129    (3)       129    (3)    
$TQEDEF           1             130    (3)       130    (3)       140    (3)    
$UCBDEF           1             131    (3)       131    (3)       140    (3)    
$VADEF            1             132    (3)       132    (3)    
$VECDEF           2             133    (3)       133    (3)    
$WCBDEF           3             134    (3)       134    (3)    
ASSUME            1             181    (3)       1066   (3)       1067   (3)       1068   (3)       1097   (3)       1168   (3)    
                                                 1209   (3)       1233   (3)       1237   (3)       1239   (3)       1274   (3)    
                                                 1275   (3)       1322   (3)       1403   (3)       1410   (3)       1440   (3)    
                                                 1445   (3)       181    (3)       2007   (3)       2110   (3)       220    (3)    
                                                 2206   (3)       2207   (3)       2326   (3)       2327   (3)       2451   (3)    
                                                 2452   (3)       405    (3)       409    (3)       754    (3)       778    (3)    
                                                 862    (3)    
CD$IODEF          1             137    (3)       137    (3)    
CD$PIBDEF         1             138    (3)       138    (3)    
CD$TAGDEF         1             139    (3)       139    (3)    
CD$UCBDEF         1             140    (3)       140    (3)    
DDTAB             2             216    (3)       216    (3)    
DPTAB             3             175    (3)       175    (3)    
DPT_STORE         2             183    (3)       183    (3)       185    (3)       186    (3)       187    (3)       192    (3)    
                                                 194    (3)       195    (3)       198    (3)       200    (3)       201    (3)    
                                                 204    (3)       208    (3)    
FIND_CPU_DATA     1             2030   (3)       2030   (3)    
FORKLOCK          2             752    (3)       1401   (3)       2005   (3)       752    (3)       860    (3)    
FORKUNLOCK        2             776    (3)       1408   (3)       2108   (3)       776    (3)    
FUNCTAB           1             227    (3)       227    (3)       236    (3)       245    (3)       249    (3)       253    (3)    
                                                 257    (3)    
GENRADDR          1             220    (3)       220    (3)       247    (3)       251    (3)       255    (3)       260    (3)    
LOCK              5             1096   (3)       1096   (3)       1208   (3)       1439   (3)    
REQCOM            1             1452   (3)       1452   (3)       1814   (3)    
SETIPL            2             754    (3)       1097   (3)       1209   (3)       1403   (3)       1440   (3)       2007   (3)    
                                                 754    (3)       862    (3)    
UNLOCK            4             1166   (3)       1166   (3)       1231   (3)       1443   (3)    
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  48
Cross reference                                                          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)


                                             +------------------------+
                                             ! Opcode Cross Reference !
                                             +------------------------+

OPCODE         VALUE     REFERENCES... 
------         -----     ------------- 
ADDL           00C0      1142   (3)    1143   (3)    1151   (3)    
ADDL2          00C0      1073   (3)    1106   (3)    1107   (3)    1118   (3)    1228   (3)    1327   (3)    1330   (3)    
                         1342   (3)    1411   (3)    1678   (3)    1682   (3)    1803   (3)    1810   (3)    1902   (3)    
                         1926   (3)    2103   (3)    2274   (3)    2391   (3)    2489   (3)    446    (3)    573    (3)    
                         847    (3)    
ADDL3          00C1      1206   (3)    1688   (3)    2339   (3)    2464   (3)    2580   (3)    579    (3)    797    (3)    
                         953    (3)    
ADWC           00D8      1331   (3)    
AOBLSS         00F2      2038   (3)    
ASHL           0078      1689   (3)    2095   (3)    2104   (3)    435    (3)    445    (3)    450    (3)    
BBC            00E1      1337   (3)    1370   (3)    1509   (3)    1518   (3)    1700   (3)    1710   (3)    1799   (3)    
                         1804   (3)    1898   (3)    1904   (3)    2047   (3)    2084   (3)    2121   (3)    2217   (3)    
                         2222   (3)    2344   (3)    2364   (3)    2475   (3)    564    (3)    582    (3)    648    (3)    
                         749    (3)    768    (3)    823    (3)    826    (3)    829    (3)    
BBCC           00E5      1202   (3)    1437   (3)    740    (3)    
BBS            00E0      1665   (3)    1668   (3)    1708   (3)    2079   (3)    2122   (3)    2123   (3)    639    (3)    
                         807    (3)    
BBSS           00E2      436    (3)    451    (3)    
BCC            001E      2037   (3)    
BEQL           0013      1009   (3)    1015   (3)    1017   (3)    1083   (3)    1150   (3)    1156   (3)    1278   (3)    
                         1326   (3)    1524   (3)    1526   (3)    1531   (3)    1641   (3)    1730   (3)    1732   (3)    
                         1798   (3)    1897   (3)    2065   (3)    2075   (3)    2083   (3)    2088   (3)    2363   (3)    
                         2467   (3)    2574   (3)    644    (3)    739    (3)    746    (3)    843    (3)    929    (3)    
                         946    (3)    964    (3)    
BGEQ           0018      662    (3)    
BGEQU          001E      1536   (3)    2353   (3)    
BGTR           0014      1110   (3)    
BGTRU          001A      800    (3)    818    (3)    845    (3)    
BICL           00CA      1006   (3)    1323   (3)    1404   (3)    2130   (3)    
BICL2          00CA      2030   (3)    2350   (3)    
BICL3          00CB      735    (3)    841    (3)    
BISL           00C8      1163   (3)    1334   (3)    1339   (3)    2219   (3)    2382   (3)    2388   (3)    2486   (3)    
                         824    (3)    827    (3)    830    (3)    951    (3)    
BISW           00A8      2588   (3)    458    (3)    
BITL           00D3      500    (3)    
BITW           00B3      1796   (3)    1895   (3)    2081   (3)    
BLBC           00E9      1080   (3)    1097   (3)    1168   (3)    1209   (3)    1233   (3)    1403   (3)    1410   (3)    
                         1440   (3)    1445   (3)    1812   (3)    2007   (3)    2063   (3)    2110   (3)    432    (3)    
                         754    (3)    778    (3)    862    (3)    948    (3)    
BLBS           00E8      1919   (3)    
BLEQ           0015      1100   (3)    1924   (3)    2399   (3)    2488   (3)    795    (3)    815    (3)    853    (3)    
BLEQU          001B      1078   (3)    2477   (3)    
BLSS           0019      1128   (3)    2563   (3)    2577   (3)    
BLSSU          001F      1145   (3)    2357   (3)    2470   (3)    569    (3)    
BNEQ           0012      1020   (3)    1372   (3)    1374   (3)    1637   (3)    1644   (3)    1795   (3)    1809   (3)    
                         1894   (3)    2011   (3)    2016   (3)    2033   (3)    2071   (3)    2090   (3)    2165   (3)    
                         2173   (3)    2216   (3)    2229   (3)    2343   (3)    2346   (3)    2375   (3)    2395   (3)    
                         2493   (3)    502    (3)    504    (3)    507    (3)    744    (3)    811    (3)    925    (3)    
                         931    (3)    938    (3)    943    (3)    
BRB            0011      1097   (3)    1112   (3)    1209   (3)    1376   (3)    1403   (3)    1440   (3)    1906   (3)    
                         1927   (3)    1930   (3)    2007   (3)    2067   (3)    2097   (3)    2125   (3)    2220   (3)    
                         2347   (3)    2378   (3)    2473   (3)    2495   (3)    509    (3)    754    (3)    786    (3)    
                         790    (3)    802    (3)    862    (3)    
BRW            0031      1702   (3)    1733   (3)    1817   (3)    2400   (3)    592    (3)    855    (3)    867    (3)    
                         934    (3)    
BSBB           0010      1407   (3)    2159   (3)    2167   (3)    2209   (3)    2337   (3)    2481   (3)    866    (3)    
BSBW           0030      1024   (3)    1282   (3)    1540   (3)    1699   (3)    1807   (3)    1811   (3)    2096   (3)    
                         2105   (3)    2373   (3)    2385   (3)    785    (3)    789    (3)    801    (3)    947    (3)    
BVC            001C      1915   (3)    
CASEB          008F      756    (3)    
CLRL           00D4      1010   (3)    1071   (3)    1152   (3)    1224   (3)    1451   (3)    2034   (3)    2472   (3)    
                         404    (3)    408    (3)    581    (3)    647    (3)    
CLRQ           007C      1238   (3)    1240   (3)    1522   (3)    406    (3)    410    (3)    
CLRW           00B4      1220   (3)    1528   (3)    
CMPB           0091      852    (3)    923    (3)    
CMPL           00D1      1016   (3)    1077   (3)    1099   (3)    1109   (3)    1144   (3)    1371   (3)    1529   (3)    
                         1635   (3)    1640   (3)    1729   (3)    1731   (3)    1794   (3)    1808   (3)    1893   (3)    
                         2010   (3)    2015   (3)    2031   (3)    2066   (3)    2074   (3)    2087   (3)    2089   (3)    
                         2164   (3)    2215   (3)    2342   (3)    2345   (3)    2352   (3)    2356   (3)    2362   (3)    
                         2374   (3)    2466   (3)    2469   (3)    2476   (3)    506    (3)    568    (3)    661    (3)    
                         745    (3)    799    (3)    817    (3)    930    (3)    936    (3)    962    (3)    
CMPW           00B1      1373   (3)    1535   (3)    2069   (3)    844    (3)    
DECL           00D7      1137   (3)    2398   (3)    
DECW           00B7      1532   (3)    
DIVL3          00C7      2268   (3)    
EXTZV          00EF      1218   (3)    1691   (3)    2072   (3)    2331   (3)    850    (3)    
FFS            00EA      737    (3)    
HALT           0000      1626   (3)    1921   (3)    2013   (3)    2040   (3)    
INCL           00D6      1074   (3)    1140   (3)    1227   (3)    1802   (3)    1901   (3)    2124   (3)    2127   (3)    
                         2171   (3)    2218   (3)    2227   (3)    2377   (3)    2381   (3)    2392   (3)    2490   (3)    
                         812    (3)    
INCW           00B6      1133   (3)    
INSQHI         005C      2036   (3)    
INSQUE         000E      1925   (3)    1939   (3)    2042   (3)    2046   (3)    
INSV           00F0      1169   (3)    1450   (3)    2559   (3)    2571   (3)    2585   (3)    666    (3)    971    (3)    
JMP            0017      1452   (3)    1651   (3)    1814   (3)    587    (3)    669    (3)    782    (3)    
JSB            0016      1079   (3)    1090   (3)    1097   (3)    1125   (3)    1168   (3)    1209   (3)    1225   (3)    
                         1233   (3)    1236   (3)    1332   (3)    1403   (3)    1410   (3)    1440   (3)    1445   (3)    
                         1918   (3)    2007   (3)    2110   (3)    2564   (3)    2578   (3)    431    (3)    571    (3)    
                         574    (3)    646    (3)    754    (3)    778    (3)    862    (3)    
MFPR           00DB      1403   (3)    2007   (3)    2030   (3)    754    (3)    862    (3)    
MNEGL          00CE      846    (3)    
MOVAL          00DE      1629   (3)    1938   (3)    2003   (3)    346    (3)    347    (3)    348    (3)    349    (3)    
                         423    (3)    505    (3)    
MOVB           0090      1134   (3)    1136   (3)    1221   (3)    863    (3)    
MOVC3          0028      1086   (3)    2386   (3)    2482   (3)    
MOVC5          002C      413    (3)    654    (3)    772    (3)    
MOVL           00D0      1008   (3)    1011   (3)    1012   (3)    1014   (3)    1019   (3)    1021   (3)    1072   (3)    
                         1088   (3)    1089   (3)    1115   (3)    1119   (3)    1120   (3)    1121   (3)    1124   (3)    
                         1127   (3)    1141   (3)    1155   (3)    1210   (3)    1211   (3)    1212   (3)    1234   (3)    
                         1235   (3)    1277   (3)    1279   (3)    1281   (3)    1325   (3)    1328   (3)    1512   (3)    
                         1517   (3)    1521   (3)    1523   (3)    1525   (3)    1534   (3)    1539   (3)    1543   (3)    
                         1630   (3)    1638   (3)    1643   (3)    1667   (3)    1690   (3)    1806   (3)    1813   (3)    
                         1917   (3)    1933   (3)    1934   (3)    1936   (3)    1937   (3)    1945   (3)    2001   (3)    
                         2002   (3)    2004   (3)    2009   (3)    2020   (3)    2044   (3)    2045   (3)    2062   (3)    
                         2162   (3)    2166   (3)    2174   (3)    2177   (3)    2213   (3)    2230   (3)    2233   (3)    
                         2340   (3)    2349   (3)    2367   (3)    2368   (3)    2393   (3)    2396   (3)    2461   (3)    
                         2462   (3)    2478   (3)    2491   (3)    2494   (3)    2498   (3)    2504   (3)    2554   (3)    
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  49
Cross reference                                                          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                         2561   (3)    2562   (3)    2566   (3)    2575   (3)    2576   (3)    2590   (3)    345    (3)    
                         400    (3)    401    (3)    403    (3)    417    (3)    420    (3)    430    (3)    433    (3)    
                         438    (3)    440    (3)    441    (3)    442    (3)    444    (3)    447    (3)    448    (3)    
                         453    (3)    498    (3)    503    (3)    567    (3)    570    (3)    576    (3)    578    (3)    
                         580    (3)    590    (3)    643    (3)    645    (3)    650    (3)    659    (3)    664    (3)    
                         667    (3)    794    (3)    814    (3)    821    (3)    832    (3)    857    (3)    926    (3)    
                         928    (3)    939    (3)    942    (3)    945    (3)    950    (3)    959    (3)    960    (3)    
                         961    (3)    965    (3)    967    (3)    974    (3)    
MOVPSL         00DC      849    (3)    
MOVQ           007D      1084   (3)    1085   (3)    1087   (3)    1091   (3)    1093   (3)    1329   (3)    1516   (3)    
                         1527   (3)    2330   (3)    2333   (3)    2402   (3)    2454   (3)    2456   (3)    2505   (3)    
                         955    (3)    956    (3)    
MOVW           00B0      1449   (3)    1514   (3)    1515   (3)    2499   (3)    577    (3)    957    (3)    
MOVZBL         009A      1097   (3)    1168   (3)    1209   (3)    1233   (3)    1403   (3)    1410   (3)    1440   (3)    
                         1445   (3)    1674   (3)    1677   (3)    1679   (3)    1681   (3)    2007   (3)    2110   (3)    
                         754    (3)    778    (3)    810    (3)    862    (3)    
MOVZWL         003C      1025   (3)    1105   (3)    1154   (3)    1162   (3)    1286   (3)    1375   (3)    1406   (3)    
                         1538   (3)    1675   (3)    2500   (3)    508    (3)    511    (3)    563    (3)    566    (3)    
                         658    (3)    663    (3)    734    (3)    742    (3)    747    (3)    793    (3)    806    (3)    
                         809    (3)    822    (3)    840    (3)    848    (3)    922    (3)    932    (3)    970    (3)    
MTPR           00DA      1097   (3)    1209   (3)    1403   (3)    1410   (3)    1440   (3)    2007   (3)    2110   (3)    
                         2558   (3)    2570   (3)    2584   (3)    754    (3)    778    (3)    862    (3)    
MULL2          00C4      1076   (3)    1676   (3)    1680   (3)    2270   (3)    2272   (3)    2273   (3)    796    (3)    
                         816    (3)    
MULL3          00C5      1081   (3)    1116   (3)    1148   (3)    2335   (3)    2458   (3)    584    (3)    858    (3)    
POPL           8ED0      1440   (3)    1445   (3)    2403   (3)    778    (3)    
POPR           00BA      1171   (3)    1241   (3)    1541   (3)    1929   (3)    2234   (3)    2387   (3)    2483   (3)    
                         415    (3)    656    (3)    774    (3)    
PUSHL          00DD      1440   (3)    1445   (3)    1511   (3)    1944   (3)    2158   (3)    2211   (3)    2329   (3)    
                         2455   (3)    572    (3)    778    (3)    921    (3)    
PUSHR          00BB      1070   (3)    1205   (3)    1537   (3)    1916   (3)    2210   (3)    2384   (3)    2480   (3)    
                         412    (3)    653    (3)    771    (3)    
REMQUE         000F      1441   (3)    1914   (3)    2019   (3)    
RSB            0005      1027   (3)    1172   (3)    1244   (3)    1287   (3)    1343   (3)    1378   (3)    1412   (3)    
                         1546   (3)    1946   (3)    2111   (3)    2131   (3)    2178   (3)    2235   (3)    2275   (3)    
                         2404   (3)    2506   (3)    2591   (3)    350    (3)    461    (3)    513    (3)    641    (3)    
                         975    (3)    
SOBGTR         00F5      1139   (3)    1229   (3)    1284   (3)    2170   (3)    2176   (3)    2226   (3)    2232   (3)    
SUBL2          00C2      1333   (3)    1400   (3)    1923   (3)    2223   (3)    2487   (3)    
SUBL3          00C3      1098   (3)    1108   (3)    1447   (3)    2271   (3)    2354   (3)    434    (3)    
SUBW           00A2      1513   (3)    1520   (3)    
TSTL           00D5      1283   (3)    1625   (3)    2169   (3)    2172   (3)    2225   (3)    2228   (3)    2394   (3)    
                         2468   (3)    2492   (3)    743    (3)    
TSTW           00B5      2064   (3)    2573   (3)    
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  50
Cross reference                                                          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)


                                           +----------------------------+
                                           ! Directives Cross Reference !
                                           +----------------------------+

DIRECTIVE      REFERENCES... 
---------      ------------- 
.ASCIC         181    (3)    
.BLKL          181    (3)    272    (3)    274    (3)    276    (3)    278    (3)    280    (3)    
.BYTE          181    (3)    185    (3)    186    (3)    191    (3)    193    (3)    194    (3)    196    (3)    200    (3)    
               203    (3)    206    (3)    208    (3)    
.DISABLE       1736   (3)    2112   (3)    869    (3)    
.ENABLE        1611   (3)    1999   (3)    732    (3)    
.END           2595   (3)    
.ENDC          1066   (3)    1067   (3)    1068   (3)    1097   (3)    1168   (3)    1209   (3)    1233   (3)    1237   (3)    
               1239   (3)    1274   (3)    1275   (3)    1322   (3)    1403   (3)    1410   (3)    1440   (3)    1445   (3)    
               1663   (3)    1706   (3)    181    (3)    183    (3)    185    (3)    186    (3)    191    (3)    193    (3)    
               194    (3)    196    (3)    198    (3)    200    (3)    2007   (3)    203    (3)    2030   (3)    206    (3)    
               208    (3)    2110   (3)    220    (3)    2206   (3)    2207   (3)    2326   (3)    2327   (3)    234    (3)    
               243    (3)    2451   (3)    2452   (3)    247    (3)    251    (3)    255    (3)    260    (3)    298    (3)    
               405    (3)    409    (3)    754    (3)    778    (3)    862    (3)    
.ENDM          104    (3)    105    (3)    106    (3)    107    (3)    108    (3)    109    (3)    1096   (3)    110    (3)    
               111    (3)    112    (3)    113    (3)    114    (3)    115    (3)    116    (3)    1166   (3)    117    (3)    
               118    (3)    119    (3)    120    (3)    121    (3)    122    (3)    123    (3)    124    (3)    125    (3)    
               126    (3)    127    (3)    128    (3)    129    (3)    130    (3)    131    (3)    132    (3)    133    (3)    
               134    (3)    137    (3)    138    (3)    139    (3)    140    (3)    1452   (3)    175    (3)    181    (3)    
               183    (3)    2030   (3)    216    (3)    220    (3)    227    (3)    234    (3)    243    (3)    247    (3)    
               251    (3)    255    (3)    260    (3)    752    (3)    754    (3)    776    (3)    
.ENDR          185    (3)    186    (3)    191    (3)    193    (3)    194    (3)    196    (3)    200    (3)    203    (3)    
               206    (3)    
.EXTERNAL      1097   (3)    1168   (3)    1209   (3)    1233   (3)    1403   (3)    1410   (3)    1440   (3)    1445   (3)    
               2007   (3)    2110   (3)    754    (3)    778    (3)    862    (3)    
.IDENT         3      (1)    
.IF            1066   (3)    1067   (3)    1068   (3)    1097   (3)    1168   (3)    1209   (3)    1233   (3)    1237   (3)    
               1239   (3)    1274   (3)    1275   (3)    1322   (3)    1403   (3)    1410   (3)    1440   (3)    1445   (3)    
               1655   (3)    1694   (3)    181    (3)    183    (3)    185    (3)    186    (3)    191    (3)    193    (3)    
               194    (3)    196    (3)    198    (3)    200    (3)    2007   (3)    203    (3)    2030   (3)    206    (3)    
               208    (3)    2110   (3)    220    (3)    2206   (3)    2207   (3)    2326   (3)    2327   (3)    234    (3)    
               243    (3)    2451   (3)    2452   (3)    247    (3)    251    (3)    255    (3)    260    (3)    286    (3)    
               405    (3)    409    (3)    754    (3)    778    (3)    862    (3)    
.IFF           1066   (3)    1067   (3)    1068   (3)    1097   (3)    1168   (3)    1209   (3)    1233   (3)    1237   (3)    
               1239   (3)    1274   (3)    1275   (3)    1322   (3)    1403   (3)    1410   (3)    1440   (3)    1445   (3)    
               181    (3)    183    (3)    185    (3)    186    (3)    191    (3)    193    (3)    194    (3)    196    (3)    
               198    (3)    200    (3)    2007   (3)    203    (3)    2030   (3)    206    (3)    208    (3)    2110   (3)    
               220    (3)    2206   (3)    2207   (3)    2326   (3)    2327   (3)    234    (3)    243    (3)    2451   (3)    
               2452   (3)    247    (3)    251    (3)    255    (3)    260    (3)    405    (3)    409    (3)    754    (3)    
               778    (3)    862    (3)    
.IIF           1632   (3)    1647   (3)    1648   (3)    1649   (3)    1727   (3)    1791   (3)    1792   (3)    181    (3)    
               185    (3)    186    (3)    1890   (3)    1891   (3)    191    (3)    193    (3)    194    (3)    196    (3)    
               200    (3)    203    (3)    206    (3)    344    (3)    399    (3)    497    (3)    
.IRP           234    (3)    243    (3)    247    (3)    251    (3)    255    (3)    260    (3)    
.IRPC          185    (3)    186    (3)    191    (3)    193    (3)    194    (3)    196    (3)    200    (3)    203    (3)    
               206    (3)    220    (3)    247    (3)    251    (3)    255    (3)    260    (3)    
.LONG          181    (3)    191    (3)    193    (3)    220    (3)    234    (3)    243    (3)    247    (3)    251    (3)    
               255    (3)    260    (3)    
.MACRO         137    (3)    138    (3)    139    (3)    140    (3)    
.MDELETE       181    (3)    
.MEXIT         220    (3)    247    (3)    251    (3)    255    (3)    260    (3)    
.NOCROSS       104    (3)    105    (3)    106    (3)    107    (3)    108    (3)    109    (3)    110    (3)    111    (3)    
               112    (3)    113    (3)    114    (3)    115    (3)    116    (3)    117    (3)    118    (3)    119    (3)    
               120    (3)    121    (3)    122    (3)    123    (3)    124    (3)    125    (3)    126    (3)    127    (3)    
               128    (3)    129    (3)    130    (3)    131    (3)    132    (3)    133    (3)    134    (3)    137    (3)    
               138    (3)    139    (3)    140    (3)    
.PAGE          1030   (3)    1174   (3)    1246   (3)    1290   (3)    1347   (3)    1381   (3)    1415   (3)    1455   (3)    
               1548   (3)    165    (3)    1738   (3)    1820   (3)    1909   (3)    1949   (3)    2116   (3)    2134   (3)    
               2181   (3)    2238   (3)    2278   (3)    2407   (3)    2509   (3)    264    (3)    301    (3)    352    (3)    
               463    (3)    515    (3)    594    (3)    671    (3)    72     (2)    872    (3)    97     (3)    977    (3)    
.PSECT         181    (3)    220    (3)    
.QUAD          181    (3)    
.RESTORE       104    (3)    105    (3)    106    (3)    107    (3)    108    (3)    109    (3)    110    (3)    111    (3)    
               112    (3)    113    (3)    114    (3)    115    (3)    116    (3)    117    (3)    118    (3)    119    (3)    
               120    (3)    121    (3)    122    (3)    123    (3)    124    (3)    125    (3)    126    (3)    127    (3)    
               128    (3)    129    (3)    130    (3)    131    (3)    132    (3)    133    (3)    134    (3)    137    (3)    
               138    (3)    139    (3)    140    (3)    208    (3)    
.SAVE          104    (3)    105    (3)    106    (3)    107    (3)    108    (3)    109    (3)    110    (3)    111    (3)    
               112    (3)    113    (3)    114    (3)    115    (3)    116    (3)    117    (3)    118    (3)    119    (3)    
               120    (3)    121    (3)    122    (3)    123    (3)    124    (3)    125    (3)    126    (3)    127    (3)    
               128    (3)    129    (3)    130    (3)    131    (3)    132    (3)    133    (3)    134    (3)    137    (3)    
               138    (3)    139    (3)    140    (3)    181    (3)    
.SBTTL         1031   (3)    1175   (3)    1247   (3)    1291   (3)    1348   (3)    1382   (3)    1416   (3)    1456   (3)    
               1549   (3)    166    (3)    1950   (3)    2      (1)    2135   (3)    2182   (3)    2239   (3)    2279   (3)    
               2408   (3)    2510   (3)    265    (3)    302    (3)    353    (3)    464    (3)    516    (3)    595    (3)    
               672    (3)    73     (2)    873    (3)    978    (3)    98     (3)    
.TITLE         1      (1)    
.WORD          181    (3)    196    (3)    200    (3)    203    (3)    206    (3)    220    (3)    758    (3)    759    (3)    
               760    (3)    761    (3)    
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  51
Cross reference                                                          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)


                                            +--------------------------+
                                            ! Register Cross Reference !
                                            +--------------------------+

REGISTER  NO. REFERENCES     REFERENCES... 
--------  --------------     ------------- 
AP                13         #-567    (3)    #-570    (3)    #-580    (3)    #-584    (3)    #-643    (3)    #-645    (3)    
                             #-661    (3)    #-664    (3)    #-794    (3)    #-810    (3)    #-814    (3)    #-841    (3)    
                             #-858    (3)    
R0               227         #-1012   (3)    #-1014   (3)    #-1019   (3)    #-1025   (3)    #-1080   (3)    #-1081   (3)    
                             #-1086   (3)    #-1088   (3)    #-1097   (3)    #-1098   (3)    #-1099   (3)    #-1105   (3)    
                             #-1106   (3)    #-1107   (3)    #-1108   (3)    #-1109   (3)    #-1127   (3)    #-1133   (3)    
                             #-1134   (3)    #-1136   (3)    #-1148   (3)    #-1151   (3)    #-1152   (3)    #-1154   (3)    
                             #-1162   (3)    #-1168   (3)      1169   (3)    #-1209   (3)    #-1218   (3)    #-1220   (3)    
                             #-1221   (3)    #-1224   (3)    #-1233   (3)    #-1234   (3)    #-1277   (3)    #-1281   (3)    
                             #-1283   (3)    #-1286   (3)    #-1329   (3)    #-1330   (3)    #-1375   (3)    #-1403   (3)    
                             #-1406   (3)    #-1410   (3)    #-1440   (3)    #-1445   (3)      1450   (3)    #-1512   (3)    
                             #-1514   (3)    #-1515   (3)    #-1516   (3)    #-1517   (3)    #-1521   (3)    #-1522   (3)    
                             #-1527   (3)    #-1528   (3)    #-1532   (3)    #-1534   (3)    #-1538   (3)    #-1629   (3)    
                             #-1638   (3)      1651   (3)    #-1674   (3)    #-1676   (3)    #-1677   (3)    #-1678   (3)    
                             #-1679   (3)    #-1680   (3)    #-1681   (3)    #-1682   (3)    #-1812   (3)    #-1916   (3)    
                             #-1919   (3)    #-1929   (3)    #-2007   (3)    #-2030   (3)    #-2031   (3)    #-2034   (3)    
                             #-2038   (3)      2042   (3)    #-2110   (3)      2121   (3)      2122   (3)      2123   (3)    
                             #-2130   (3)    #-2164   (3)    #-2166   (3)    #-2169   (3)    #-2172   (3)    #-2174   (3)    
                             #-2210   (3)    #-2215   (3)      2217   (3)    #-2219   (3)      2222   (3)    #-2223   (3)    
                             #-2225   (3)    #-2228   (3)    #-2230   (3)    #-2234   (3)    #-2268   (3)    #-2270   (3)    
                             #-2271   (3)    #-2272   (3)    #-2273   (3)    #-2274   (3)    #-2339   (3)    #-2340   (3)    
                             #-2342   (3)      2344   (3)    #-2349   (3)    #-2350   (3)    #-2352   (3)    #-2354   (3)    
                             #-2356   (3)    #-2367   (3)    #-2368   (3)    #-2382   (3)    #-2384   (3)      2386   (3)    
                             #-2387   (3)    #-2388   (3)    #-2393   (3)    #-2394   (3)    #-2396   (3)    #-2464   (3)    
                             #-2466   (3)    #-2468   (3)    #-2469   (3)    #-2472   (3)      2475   (3)    #-2480   (3)    
                               2482   (3)    #-2483   (3)    #-2486   (3)    #-2491   (3)    #-2492   (3)    #-2494   (3)    
                             #-2498   (3)    #-2499   (3)    #-2559   (3)    #-2561   (3)      2571   (3)      2585   (3)    
                             #-2590   (3)    #-400    (3)    #-401    (3)    #-432    (3)    #-434    (3)    #-435    (3)    
                               436    (3)    #-438    (3)    #-445    (3)    #-446    (3)    #-447    (3)    #-448    (3)    
                             #-450    (3)      451    (3)    #-453    (3)    #-498    (3)    #-500    (3)    #-503    (3)    
                             #-505    (3)    #-506    (3)    #-508    (3)    #-511    (3)    #-563    (3)    #-566    (3)    
                             #-570    (3)    #-645    (3)      654    (3)    #-658    (3)    #-663    (3)      666    (3)    
                             #-734    (3)    #-742    (3)    #-747    (3)    #-754    (3)    #-771    (3)    #-774    (3)    
                             #-778    (3)    #-793    (3)    #-806    (3)    #-809    (3)    #-821    (3)    #-824    (3)    
                             #-827    (3)    #-830    (3)    #-832    (3)    #-840    (3)    #-848    (3)    #-862    (3)    
                             #-922    (3)    #-926    (3)    #-928    (3)    #-932    (3)    #-939    (3)    #-942    (3)    
                             #-948    (3)    #-953    (3)    #-955    (3)    #-956    (3)    #-959    (3)    #-960    (3)    
                             #-962    (3)    #-965    (3)    #-967    (3)    #-970    (3)      971    (3)    
R1               115         #-1014   (3)    #-1016   (3)    #-1072   (3)    #-1073   (3)    #-1074   (3)    #-1076   (3)    
                             #-1077   (3)    #-1084   (3)    #-1089   (3)    #-1091   (3)    #-1093   (3)    #-1155   (3)    
                             #-1235   (3)    #-1279   (3)    #-1284   (3)    #-1331   (3)    #-1441   (3)    #-1447   (3)    
                             #-1449   (3)    #-1450   (3)    #-1451   (3)    #-1511   (3)    #-1516   (3)    #-1523   (3)    
                             #-1525   (3)    #-1527   (3)    #-1543   (3)    #-1667   (3)    #-1675   (3)    #-1676   (3)    
                             #-1678   (3)    #-1680   (3)    #-1682   (3)    #-1916   (3)    #-1917   (3)    #-1923   (3)    
                             #-1929   (3)    #-1937   (3)    #-2004   (3)    #-2010   (3)    #-2045   (3)    #-2164   (3)    
                             #-2171   (3)    #-2210   (3)    #-2215   (3)    #-2227   (3)    #-2234   (3)    #-2268   (3)    
                             #-2271   (3)    #-2342   (3)    #-2368   (3)    #-2384   (3)      2386   (3)    #-2387   (3)    
                             #-2392   (3)    #-2455   (3)    #-2466   (3)    #-2480   (3)      2482   (3)    #-2483   (3)    
                             #-2490   (3)    #-2504   (3)    #-2566   (3)    #-2570   (3)    #-2580   (3)    #-2588   (3)    
                             #-434    (3)    #-440    (3)    #-441    (3)    #-442    (3)    #-567    (3)    #-568    (3)    
                             #-573    (3)    #-577    (3)    #-643    (3)    #-654    (3)    #-659    (3)    #-661    (3)    
                             #-664    (3)    #-666    (3)    #-667    (3)    #-735    (3)      737    (3)      740    (3)    
                             #-743    (3)    #-771    (3)    #-774    (3)    #-794    (3)    #-796    (3)    #-797    (3)    
                             #-814    (3)    #-816    (3)    #-817    (3)    #-822    (3)      823    (3)      826    (3)    
                               829    (3)    #-841    (3)    #-844    (3)    #-846    (3)    #-847    (3)    #-852    (3)    
                             #-857    (3)    #-858    (3)    #-921    (3)    #-928    (3)    #-930    (3)    #-936    (3)    
                             #-945    (3)    #-961    (3)    #-962    (3)    #-967    (3)    #-974    (3)    
R10                4         #-1120   (3)    #-1134   (3)    #-1211   (3)    #-1221   (3)    
R11                4         #-1121   (3)    #-1136   (3)    #-1212   (3)    #-1224   (3)    
R2                98         #-1008   (3)    #-1011   (3)    #-1016   (3)    #-1021   (3)    #-1070   (3)      1086   (3)    
                             #-1171   (3)    #-1325   (3)    #-1330   (3)    #-1373   (3)    #-1537   (3)    #-1541   (3)    
                             #-1688   (3)    #-1689   (3)    #-1803   (3)    #-1806   (3)    #-1808   (3)    #-1810   (3)    
                             #-1902   (3)    #-1914   (3)      1925   (3)    #-1926   (3)    #-1933   (3)    #-1934   (3)    
                             #-1936   (3)    #-1937   (3)      1939   (3)    #-2003   (3)    #-2004   (3)    #-2009   (3)    
                             #-2010   (3)    #-2015   (3)      2019   (3)    #-2020   (3)    #-2044   (3)    #-2045   (3)    
                               2046   (3)    #-2062   (3)    #-2066   (3)    #-2069   (3)    #-2095   (3)    #-2103   (3)    
                             #-2104   (3)    #-2176   (3)    #-2232   (3)    #-2233   (3)    #-2384   (3)    #-2387   (3)    
                             #-2398   (3)    #-2461   (3)    #-2476   (3)    #-2478   (3)    #-2480   (3)    #-2483   (3)    
                             #-2487   (3)    #-2554   (3)    #-2558   (3)    #-2580   (3)    #-2584   (3)    #-430    (3)    
                             #-444    (3)    #-445    (3)    #-450    (3)    #-578    (3)    #-579    (3)    #-580    (3)    
                             #-647    (3)    #-650    (3)    #-654    (3)    #-737    (3)    #-740    (3)    #-745    (3)    
                             #-756    (3)    #-771    (3)    #-774    (3)    #-797    (3)    #-799    (3)    #-849    (3)    
                               850    (3)    #-852    (3)    #-857    (3)    #-862    (3)    #-863    (3)    #-923    (3)    
                             #-930    (3)    #-936    (3)    #-950    (3)    #-953    (3)    #-957    (3)    #-959    (3)    
R3                97         #-1070   (3)    #-1171   (3)    #-1205   (3)    #-1241   (3)    #-1325   (3)    #-1328   (3)    
                               1337   (3)    #-1371   (3)    #-1373   (3)    #-1447   (3)    #-1449   (3)    #-1514   (3)    
                             #-1515   (3)    #-1517   (3)      1518   (3)    #-1521   (3)    #-1523   (3)    #-1529   (3)    
                             #-1537   (3)    #-1539   (3)    #-1541   (3)      1665   (3)    #-1667   (3)    #-1675   (3)    
                             #-1677   (3)    #-1681   (3)    #-1688   (3)      1691   (3)      1700   (3)      1708   (3)    
                               1710   (3)    #-1796   (3)    #-1895   (3)    #-1916   (3)    #-1929   (3)    #-1933   (3)    
                             #-1934   (3)    #-1938   (3)    #-2001   (3)    #-2002   (3)    #-2015   (3)    #-2020   (3)    
                               2036   (3)      2042   (3)    #-2062   (3)    #-2063   (3)    #-2064   (3)    #-2066   (3)    
                             #-2069   (3)      2072   (3)    #-2081   (3)    #-2158   (3)    #-2162   (3)    #-2170   (3)    
                             #-2177   (3)    #-2210   (3)    #-2213   (3)    #-2226   (3)    #-2234   (3)      2331   (3)    
                             #-2333   (3)    #-2384   (3)    #-2387   (3)    #-2456   (3)    #-2461   (3)    #-2480   (3)    
                             #-2483   (3)    #-2498   (3)    #-2500   (3)    #-2562   (3)    #-2571   (3)    #-2575   (3)    
                             #-2576   (3)    #-2585   (3)    #-412    (3)    #-415    (3)    #-433    (3)    #-434    (3)    
                             #-446    (3)    #-572    (3)    #-576    (3)    #-577    (3)    #-578    (3)    #-581    (3)    
                               582    (3)    #-584    (3)    #-590    (3)      639    (3)    #-653    (3)    #-656    (3)    
                             #-735    (3)      768    (3)    #-771    (3)    #-774    (3)    #-822    (3)    
R4                51         #-1070   (3)    #-1072   (3)    #-1085   (3)    #-1087   (3)    #-1098   (3)    #-1107   (3)    
                             #-1144   (3)    #-1171   (3)    #-1205   (3)    #-1206   (3)      1218   (3)    #-1228   (3)    
                             #-1241   (3)    #-1371   (3)    #-1537   (3)    #-1541   (3)    #-1630   (3)    #-1635   (3)    
                             #-1638   (3)    #-1640   (3)    #-1643   (3)    #-1690   (3)    #-1691   (3)    #-1729   (3)    
                             #-1731   (3)    #-1794   (3)    #-1806   (3)    #-1808   (3)    #-1893   (3)    #-2072   (3)    
                             #-2074   (3)    #-2087   (3)    #-2089   (3)    #-2340   (3)    #-2352   (3)    #-2354   (3)    
                             #-2367   (3)    #-2462   (3)    #-2476   (3)    #-2478   (3)    #-2480   (3)    #-2482   (3)    
                             #-2483   (3)    #-2487   (3)    #-412    (3)    #-415    (3)    #-653    (3)    #-656    (3)    
                             #-771    (3)    #-774    (3)    
R5               169         #-1006   (3)    #-1008   (3)    #-1010   (3)    #-1021   (3)    #-1073   (3)    #-1077   (3)    
                             #-1081   (3)      1086   (3)    #-1088   (3)    #-1089   (3)    #-1093   (3)    #-1115   (3)    
                             #-1116   (3)    #-1118   (3)    #-1140   (3)    #-1141   (3)    #-1142   (3)    #-1148   (3)    
                             #-1151   (3)    #-1163   (3)    #-1169   (3)      1202   (3)    #-1206   (3)    #-1229   (3)    
                             #-1234   (3)    #-1235   (3)    #-1238   (3)    #-1240   (3)    #-1277   (3)    #-1279   (3)    
                             #-1323   (3)    #-1327   (3)    #-1328   (3)    #-1333   (3)    #-1334   (3)    #-1339   (3)    
                             #-1342   (3)      1370   (3)    #-1400   (3)    #-1403   (3)    #-1404   (3)    #-1410   (3)    
                             #-1411   (3)      1437   (3)      1441   (3)    #-1447   (3)      1509   (3)    #-1512   (3)    
                             #-1513   (3)    #-1520   (3)    #-1534   (3)    #-1535   (3)    #-1537   (3)    #-1539   (3)    
CDDRIVER                                                                 26-AUG-1992 16:37:48  VAX MACRO T5.2V-4           Page  52
Cross reference                                                          26-AUG-1992 16:12:23  [JON.CDDRIVER]CDDRIVER.MAR;20     (3)

                             #-1541   (3)    #-1635   (3)    #-1640   (3)      1668   (3)    #-1674   (3)    #-1679   (3)    
                             #-1690   (3)      1799   (3)    #-1802   (3)    #-1803   (3)      1804   (3)    #-1810   (3)    
                             #-1813   (3)      1898   (3)    #-1901   (3)    #-1902   (3)      1904   (3)    #-1936   (3)    
                             #-1944   (3)    #-1945   (3)    #-2001   (3)    #-2002   (3)    #-2007   (3)    #-2044   (3)    
                               2047   (3)      2079   (3)      2084   (3)    #-2110   (3)    #-2124   (3)    #-2127   (3)    
                             #-2162   (3)    #-2174   (3)    #-2213   (3)    #-2230   (3)    #-2268   (3)    #-2270   (3)    
                             #-2272   (3)    #-2274   (3)    #-2333   (3)    #-2335   (3)      2364   (3)    #-2377   (3)    
                             #-2381   (3)    #-2384   (3)    #-2387   (3)    #-2391   (3)    #-2396   (3)    #-2456   (3)    
                             #-2458   (3)    #-2480   (3)    #-2483   (3)    #-2489   (3)    #-2494   (3)    #-2554   (3)    
                               2559   (3)    #-2561   (3)    #-2562   (3)    #-2566   (3)    #-2573   (3)    #-2575   (3)    
                             #-2588   (3)    #-2590   (3)    #-400    (3)    #-403    (3)    #-404    (3)    #-406    (3)    
                             #-408    (3)    #-410    (3)    #-412    (3)      413    (3)    #-415    (3)    #-418    (3)    
                             #-421    (3)    #-423    (3)    #-438    (3)    #-440    (3)    #-444    (3)    #-447    (3)    
                             #-453    (3)    #-458    (3)      564    (3)      648    (3)    #-653    (3)      654    (3)    
                             #-656    (3)    #-667    (3)      749    (3)    #-754    (3)    #-771    (3)      772    (3)    
                             #-774    (3)    #-778    (3)    #-796    (3)    #-797    (3)      807    (3)    #-810    (3)    
                             #-812    (3)    #-816    (3)    #-832    (3)    #-858    (3)    #-863    (3)    #-939    (3)    
                             #-950    (3)    #-951    (3)    #-955    (3)    #-956    (3)    #-957    (3)    #-960    (3)    
                             #-961    (3)    #-965    (3)    #-971    (3)    
R6                17         #-1070   (3)    #-1071   (3)    #-1143   (3)    #-1144   (3)    #-1155   (3)    #-1171   (3)    
                             #-2330   (3)    #-2339   (3)    #-2356   (3)    #-2393   (3)    #-2402   (3)    #-2454   (3)    
                             #-2464   (3)    #-2469   (3)    #-2491   (3)    #-2505   (3)    #-345    (3)    
R7                11         #-1070   (3)    #-1115   (3)    #-1139   (3)    #-1141   (3)    #-1142   (3)    #-1143   (3)    
                             #-1171   (3)    #-2335   (3)    #-2339   (3)    #-2458   (3)    #-2464   (3)    
R8                12         #-1070   (3)    #-1116   (3)    #-1118   (3)    #-1124   (3)    #-1127   (3)    #-1171   (3)    
                             #-2329   (3)    #-2331   (3)    #-2345   (3)    #-2362   (3)    #-2374   (3)    #-2403   (3)    
R9                 4         #-1119   (3)    #-1133   (3)    #-1210   (3)    #-1220   (3)    
SP                25         #-1084   (3)    #-1085   (3)    #-1087   (3)    #-1091   (3)    #-1403   (3)    #-1410   (3)    
                             #-1543   (3)    #-2007   (3)    #-2110   (3)    #-2177   (3)    #-2218   (3)    #-2233   (3)    
                             #-2330   (3)    #-2402   (3)    #-2454   (3)    #-2500   (3)    #-2504   (3)    #-2505   (3)    
                             #-576    (3)    #-590    (3)    #-754    (3)    #-778    (3)    #-862    (3)    #-945    (3)    
                             #-974    (3)    

                                             +------------------------+
                                             ! Performance indicators !
                                             +------------------------+

Phase                    Page faults    CPU Time       Elapsed Time   
-----                    -----------    --------       ------------   
Initialization                  171     00:00:00.11    00:00:00.31
Command processing              980     00:00:00.26    00:00:00.68
Pass 1                         1618     00:00:08.64    00:00:12.74
Symbol table sort                 0     00:00:00.69    00:00:00.84
Pass 2                           89     00:00:01.66    00:00:03.31
Symbol table output               0     00:00:00.05    00:00:00.05
Psect synopsis output             2     00:00:00.00    00:00:00.11
Cross-reference output            8     00:00:00.54    00:00:00.87
Assembler run totals           2880     00:00:11.96    00:00:18.95

The working set limit was 4050 pages.
235963 bytes (461 pages) of virtual memory were used to buffer the intermediate code.
There were 220 pages of symbol table space allocated to hold 3740 non-local and 140 local symbols.
2595 source lines were read in Pass 1, producing 24 object records in Pass 2.
209 pages of virtual memory were used to define 56 macros.

                                            +--------------------------+
                                            ! Macro library statistics !
                                            +--------------------------+

Macro library name                           Macros defined      
------------------                           --------------      
SYS$COMMON:[SYSLIB]LIB.MLB;1                           36        
ROOT$D913:[JON.CDDRIVER]CDDRIVER.MLB;26                 4        
SYS$COMMON:[SYSLIB]STARLET.MLB;1                       12        
TOTALS (all libraries)                                 52        

4428 GETS were required to define 52 macros.

There were no errors, warnings or information messages.

MACRO/LIST/OBJ=CDDRIVER.OBJ/CRO=ALL CDDRIVER.MAR+CDDRIVER/LIB+SYS$LIBRARY:LIB.MLB/LIB
