AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Table of contents 4- 4 ** AVF Data Area 4- 369 ** AVF Main Code 4- 516 ** TKINIT -- Task Initialization 4- 564 ** PSINIT -- Pass Initialization 4- 596 ** GETCMD -- Get next command 4- 628 ** GETDEV -- Process Device Specification 4- 759 ** DSCAN -- Find Prototype Unit 4- 842 ** CRDEV -- Create Device Database 4- 922 ** GETFIL -- Access Next Container File 4- 1138 ** CREBLK -- Create Secondary Block Structure 4- 1200 ** ONLINE -- Bring New Device Online 4- 1295 ** DETACH -- Detach from the Virtual Device 4- 1319 ** DEADEV -- Deallocate New Virtual Device Database 4- 1370 ** DEAFIL -- Deaccess Container Files 4- 1444 ** PRTWAR/PRTERR -- Print error messages AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 4 1 .Title AVF -- Assign Virtual Disk 2 .Enabl LC 3 .Ident /V03.00/ 4 .Sbttl ** AVF Data Area 5 ; 6 ; AVF -- Assign and Create Virtual Device Unit 7 ; 8 ; Version: V03.00 9 ; Operating Systems: RSX-11M-PLUS V3.0 10 ; MICRO/RSX V3.0 11 ; (has NOT been tested under P/OS) 12 ; 13 ; Originally written by Ralph Stamerjohn 14 ; 15 ; Previously modified by: 16 ; 17 ; R.S. Mearns 18 ; G. Everhart 19 ; 20 ; Updated by: G. L. Maxwell 21 ; U.S. Geological Survey 22 ; 27-AUG-86 23 ; 24 ; ************************************************************************ 25 ; * 26 ; Although this program has been tested by the Geological Survey, * 27 ; United States Department of the Interior, no warranty, expressed or * 28 ; implied, is made by the Geological Survey as to the accuracy and * 29 ; functioning of the program and related program material nor shall * 30 ; the fact of distribution constitute any such warranty, and no respon- * 31 ; sibility is assumed by the Geological Survey in connection therewith. * 32 ; * 33 ; Full permission and consent is hereby given to DECUS and to the DECUS * 34 ; Special Interest Groups to reproduce, distribute, and publish and * 35 ; permit others to reproduce in whole or in part, in any form and * 36 ; without restriction, this program and any information relating thereto * 37 ; * 38 ; ************************************************************************ 39 ; 40 ; AVF creates the data structures and environment necessary for the 41 ; functioning of a Virtual Disk. 42 ; 43 ; A Virtual Disk is composed of one or more contiguous container files 44 ; on mounted Files-11 volumes (which may themselves be virtual disks), 45 ; along with a virtual disk driver which maps I/O requests onto the 46 ; container files. 47 ; 48 ; AVF accepts as input from the user the following information: 49 ; 50 ; - The name and unit number to use for the virtual disk device. 51 ; Any valid RSX device name and unit number may be used. An 52 ; existing device may be specified only if it is a previously 53 ; existing virtual device which is unassigned. (The RSX Executive 54 ; also treats some devices as special cases, such as VT:.) 55 ; 56 ; - The names of one or more container files, which may be 57 ; created by AVF, which will compose the virtual disk. AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 4-1 ** AVF Data Area 58 ; 59 ; AVF attempts to create a new (or use an existing) device database 60 ; structure from the VF0: prototype database and link the database into 61 ; the device list. 62 ; 63 ; AVF processes all container file specifications, accesses each file and 64 ; retrieves the statistics block for each, and build the secondary control 65 ; block which will reside in secondary pool. 66 ; 67 ; AVF completes the linkages, increments the volume transaction counts 68 ; (a command switch option), and marks the device online. 69 ; 70 ;- 71 72 ; 73 ; Macro Library Calls: 74 ; 75 ; Symbolic Definitions. 76 ; 77 .MCALL HDRDF$ ; Define Task Header Offsets 78 000000 HDRDF$ 79 .MCALL UCBDF$ ; Define UCB Offsets 80 000000 UCBDF$ 81 .MCALL F11DF$ ; Define Files-11 Offsets 82 000000 F11DF$ 83 .MCALL TCBDF$ ; Define Task Control Block Offsets 84 000000 TCBDF$ 85 ; 86 ; Directive Macros. 87 ; 88 .MCALL DIR$ ; Issue Directive 89 .MCALL ALUN$S ; Assign Lun 90 .MCALL EXST$S ; Exit System 91 .MCALL QIOW$ ; Issue QIO And Wait 92 .MCALL GTSK$S ; Get Task Parameters 93 .MCALL SPWN$ ; Spawn Task 94 .MCALL STSE$S ; Stop For Single Event Flag 95 .MCALL GIN$ ; Get information directive 96 ; 97 ; GCML, CSI Macros. 98 ; 99 .MCALL GCMLB$ ; Define GCML block 100 .MCALL GCML$ ; Define GCML routine 101 .MCALL RCML$ ; Define RCML routine 102 .MCALL CSI$ ; Define CSI Offsets 103 000000 CSI$ 104 .MCALL CSI$SW,CSI$SV,CSI$ND ; Switch Table Macros 105 .MCALL CSI$1,CSI$4 ; Parse Command Line 106 ; 107 ; FCS Macros. 108 ; 109 .MCALL FDOF$L ; Define FCS Offsets 110 000000 FDOF$L 111 .MCALL NBOF$L ; Define FNB Offsets 112 000000 NBOF$L 113 .MCALL FCSBT$ ; Define FCS Bit Masks. 114 000000 FCSBT$ AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 4-2 ** AVF Data Area 115 .MCALL FDBDF$ ; Define FDB 116 .MCALL FDAT$R ; Define File Attributes 117 .MCALL FDRC$R ; Define Record Access 118 .MCALL FDBK$R ; Define Block Access 119 .MCALL FDOP$R ; Define Open Characteristics 120 .MCALL FSRSZ$ ; Define Fsr Region 121 .MCALL NMBLK$ ; Define Default Filename Block 122 .MCALL FINIT$ ; Define FCS init routine 123 ; 124 ; Define Files-11 QIO Macro. 125 ; 126 .MACRO F11QIO DPB,ADR 127 DIR$ #DPB 128 129 .IF NB ADR 130 131 BCS ADR 132 CMPB #IS.SUC,IOSTAT 133 BNE ADR 134 135 .ENDC 136 137 .ENDM F11QIO 138 139 000000 .PSECT $WDATA,RW,D 140 141 ; 142 ; Local Symbols: 143 ; 144 ; Logical Units/event Flags. 145 ; 146 000001 CMDLUN == 1 ; AVF command LUN 147 000002 TTYLUN == 2 ; Terminal I/O LUN 148 000003 FILLUN == 3 ; File I/O LUN 149 000004 VDLUN == 4 ; Virtual disk LUN 150 000001 EV.QIO == 1 ; QIO Wait Event Flag 151 000002 EV.SPN == 2 ; Spawn Event Flag 152 176314 DEFPRO == 176314 ; File protection [RW,RW,RW,] 153 ; 154 ; Files-11 Bit Masks. 155 ; 156 ; File attributes 157 ; 158 000001 H.FOWN = 1 ; File owner 159 000002 H.FPRO = 2 ; File protection 160 000003 H.UCHA = 3 ; File characteristics 161 000004 U.UFAT = 4 ; Record I/O area 162 000005 I.FNAM = 5 ; Filename, filetype, version no. 163 000006 I.FTYP = 6 ; Filetype 164 000007 I.FVER = 7 ; Version no. 165 000010 I.EXDT = 10 ; Expiration date 166 000011 I.STAT = 11 ; Statistics block 167 000012 I.FHDR = 12 ; Entire file header 168 000013 I.RVNO = 13 ; Revision number, cr, rv, ex dates 169 000014 I.PLCM = 14 ; Placement control 170 ; 171 ; File characteristics AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 4-3 ** AVF Data Area 172 ; 173 000200 UC.CON = 200 ; Logically contiguous file 174 000100 UC.DLK = 100 ; File improperly closed 175 ; 176 ; Size and extend control 177 ; 178 000001 EX.AC1 = 1 ; Extend contiguously 179 000002 EX.AC2 = 2 ; Extend by largest contiguous hole 180 000004 EX.FCO = 4 ; File must end up contiguous 181 000010 EX.ADF = 10 ; Use default extend size 182 000020 EX.ALL = 20 ; Placement control 183 000200 EX.ENA = 200 ; Enable extend 184 ; 185 ; Access control 186 ; 187 000001 AC.LCK = 1 ; Lock out further writes or extends 188 000002 AC.DLK = 2 ; Enable deaccess lock 189 000004 AC.LKL = 4 ; Enable block locking 190 000010 AC.EXL = 10 ; Enable explicit block unlocking 191 000040 AC.WCK = 40 ; Enable write-checking 192 000200 AC.ENB = 200 ; Enable access 193 194 102400 EXTCTL = * 400 ; Allocate contiguously 195 100400 ACWCTL = * 400 ; Write access - lock out further write 196 ; accesses. 197 100000 ACRCTL = * 400 ; Read access - enable only 198 199 ; 200 ; Local Data: 201 ; 202 ; Directives. 203 ; 204 000000 CREDPB: QIOW$ IO.CRE,FILLUN,EV.QIO,,IOSTAT,, 205 000030 ENADPB: QIOW$ IO.ENA,FILLUN,EV.QIO,,IOSTAT,,<0,0,0,0,0,FILFDB+F.FNB> 206 000060 DELDPB: QIOW$ IO.DEL,FILLUN,EV.QIO,,IOSTAT,, 207 000110 FNADPB: QIOW$ IO.FNA,FILLUN,EV.QIO,,IOSTAT,,<0,0,0,0,0,FILFDB+F.FNB> 208 000140 ACRDPB: QIOW$ IO.ACR,FILLUN,EV.QIO,,IOSTAT,, 209 000170 ACWDPB: QIOW$ IO.ACW,FILLUN,EV.QIO,,IOSTAT,, 210 000220 DACDPB: QIOW$ IO.DAC,FILLUN,EV.QIO,,IOSTAT,, 211 000250 WATDPB: QIOW$ IO.WAT,FILLUN,EV.QIO,,IOSTAT,, 212 000300 ERRDPB: QIOW$ IO.WVB,TTYLUN,EV.QIO,,IOSTAT,,<0,0,0,0,0,0> 213 ; 214 000330 CONDPB: SPWN$ ...CON,,,,,EV.SPN,,ESB,CONCMD 215 000362 PRVDPB: GIN$ GI.SPR,0 216 000370 VECDPB: GIN$ GI.VEC,VECBUF,VECSIZ ; Get system offsets 217 ; 218 ; GCML Control Block 219 ; 220 000003 MAXDEP = 3 ; Allow nesting level to 3 221 000377 MAXCMD = 255. ; Allow up to 255. char commands 222 223 000400 GCML: GCMLB$ MAXDEP,,,CMDLUN,,MAXCMD+2 224 .EVEN 225 ; 226 ; CSI Control Blocks. 227 ; 228 001332 000060 DSCBLK: .WORD C.EXPS ; Expanded command line descriptor AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 4-4 ** AVF Data Area 229 001334 001336' .WORD .+2 ; Pointer to buffer (follows) 230 001336 .BLKB C.EXPS ; Expanded command line buffer 231 .EVEN 232 233 001416 CSIBLK: .BLKB C.SIZE ; CSI Control Block 234 .EVEN 235 236 ; 237 ; Switch Bit Masks. 238 ; 239 000001 FL.CRE = 1 ; Create File 240 000002 FL.HLP = 2 ; Give help 241 000004 FL.RON = 4 ; Read-only Access to container file 242 000010 FL.LCK = 10 ; Lock container file 243 000040 FL.INC = 40 ; Increment volume transaction 244 000100 FL.WPR = 100 ; Device "hardware write-protected" 245 000200 FL.ONL = 200 ; Bring device online 246 247 000250 CSWDEF = FL.LCK ! FL.INC ! FL.ONL ; Default switches 248 249 000001 CSWNEW = FL.CRE ; Clear bit after each file 250 ; 251 ; CSI Switch Tables. 252 ; 253 001472 OUTSWI: CSI$SW HE,FL.HLP,CSIMSK,SET ; Output switch table 254 001502 CSI$SW WP,FL.WPR,CSIMSK,SET,NEG 255 001512 CSI$SW ONL,FL.ONL,CSIMSK,SET,NEG 256 001522 CSI$ND 257 258 001524 INPSWI: CSI$SW CR,FL.CRE,CSIMSK,SET,,CREVAL ; Input switches 259 001534 CSI$SW RO,FL.RON,CSIMSK,SET,NEG 260 001544 CSI$SW LO,FL.LCK,CSIMSK,SET,NEG 261 001554 CSI$SW IN,FL.INC,CSIMSK,SET,NEG 262 001564 CSI$ND 263 001566 CREVAL: CSI$SV ASCII,STRING,8. 264 001572 CSI$ND 265 ; 266 ; Fake File FDB (for parsing purposes). 267 ; 268 001574 FILFDB: FDBDF$ ; Define FDB block. 269 ; 270 ; Default Filename Block. 271 ; 272 001734 FILDFB: NMBLK$ ,DSK,,SY,0 ; Default filename 273 ; 274 ; Create Write Attribute List. 275 ; 276 001772 002 002 CRELST: .BYTE H.FPRO,02 ; Write protection code 277 001774 002014' .WORD PROATT ; 278 001776 004 016 .BYTE U.UFAT,16 ; Write FCS attributes 279 002000 001574' .WORD FILFDB ; 280 002002 005 012 .BYTE I.FNAM,12 ; Write filename attributes 281 002004 001704' .WORD FILFDB+F.FNB+N.FNAM ; 282 002006 003 001 .BYTE H.UCHA,01 ; Write file characteristics 283 002010 002050' .WORD WATATT ; 284 002012 000 000 .BYTE 0,0 ; End-of-list 285 AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 4-5 ** AVF Data Area 286 002014 176314 PROATT: .WORD DEFPRO ; Created file file protection 287 288 ; 289 ; Read Attribute List. 290 ; 291 002016 367 012 ACWLST: .BYTE -I.STAT,12 ; Read statistics block 292 002020 002030' .WORD STAATT ; 293 002022 375 001 .BYTE -H.UCHA,01 ; Read user characteristics 294 002024 002050' .WORD WATATT ; 295 002026 000 000 .BYTE 0,0 ; End-of-list 296 297 002030 STAATT: .BLKB 12 ; Statistics block 298 ; 299 ; Write Attribute List. 300 ; 301 002042 003 001 WATLST: .BYTE H.UCHA,01 ; Write user characteristics 302 002044 002050' .WORD WATATT ; 303 002046 000 000 .BYTE 0,0 ; End-of-list 304 002050 000 WATATT: .BYTE 0 ; To be read or filled in 305 .EVEN 306 002052 000000 .WORD 0 ; Safety margin (?) 307 ; 308 ; System vector offsets 309 ; 310 002054 000000 VECBUF: .WORD 0 ; Flags word 311 002056 000000G DEVHD: .WORD $DEVHD ; Device listhead 312 002060 000000G ALOCB: .WORD $ALOCB ; Pool allocation routine 313 002062 000000G DRQRQ: .WORD $DRQRQ ; Queue I/O to driver routine 314 002064 000000G SAHDB: .WORD $SAHDB ; Header bias location 315 002066 000000G SAHPT: .WORD $SAHPT ; Header displacement 316 002070 000000G KISA6: .WORD KISAR6 ; Kernel APR 6 317 002072 000000G HEADR: .WORD $HEADR ; Header pointer 318 002074 000000G ALSEC: .WORD $ALSEC ; Allocate secondary pool block 319 002076 000000G DEACB: .WORD $DEACB ; Pool deallocation routine 320 002100 000000G TKTCB: .WORD $TKTCB ; Pointer to TCB 321 002102 000000G .S.LHD: .WORD S.LHD ; SCB listhead 322 002104 000000G .S.STS: .WORD S.STS ; SCB status byte 323 002106 000000G .S.PKT: .WORD S.PKT ; SCB packet holder 324 000016 VECSIZ = <.-VECBUF>/2 ; Size of buffer in words 325 ; 326 ; Other variables. 327 ; 328 002110 000000 EXISTS::.WORD 0 ; Task exit status word 329 002112 000000 000000 IOSTAT::.WORD 0,0 ; I/O status block 330 002116 STRING::.BLKB 8. ; Disk block string 331 002126 BLKNUM::.BLKW 2 ; Disk block number 332 002132 000000 NEWFLG::.WORD 0 ; A data structure was created (0 = no) 333 002134 000000 NEWUCB::.WORD 0 ; Address of new disk UCB 334 002136 000000 VFDCB:: .WORD 0 ; VF0: DCB address 335 002140 000000 NEWDCB::.WORD 0 ; DCB of new device 336 002142 DVNAM:: .BLKB 2 ; Name of device to create 337 002144 000000 DVUNT:: .WORD 0 ; Device unit number 338 002146 000000 DVBCK:: .WORD 0 ; DCB address of preceding unit 339 002150 000000 ERRFLG::.WORD 0 ; System state error flag 340 002152 000000 CSIMSK::.WORD 0 ; CSI Mask word 341 002154 000000 OURTCB::.WORD 0 ; Pointer to this task's TCB 342 002156 000000 TIUCB:: .WORD 0 ; TI: UCB address AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 4-6 ** AVF Data Area 343 002160 000 PROUIC::.BYTE 0 ; Protection UIC (Group code here) 344 002161 000 DEVGRP::.BYTE 0 ; Protection group for created device 345 002162 ESB:: .BLKW 8. ; Exit status block 346 347 002202 000000 000000 BASLBN::.WORD 0,0 ; Working base LBN for container files 348 349 ; 350 ; Define local task area for building secondary control blocks 351 ; 352 002206 000000 CURBLK::.WORD 0 ; Address of next available block location 353 002210 000000 NUMFIL::.WORD 0 ; Number of container files currently defined 354 355 002212 SECBLK::.BLKB MX$FIL * X.LEN ; Define space for secondary blocks 356 357 .NLIST BEX 358 002752 103 117 116 CONCMD: .ASCII ^CONFIGURE/NOMSG ONLINE ^ 359 003001 CONADD: .BLKB 8. 360 .LIST BEX 361 .EVEN 362 363 ; 364 ; FSR region 365 ; 366 003012 FSRSZ$ 1 ; One buffer required for GCML$ 367 AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5 ** AVF Main Code 369 .SBTTL ** AVF Main Code 370 000000 .PSECT $CODE,RO,I 371 372 ;+ 373 ; $AVF -- Assign (Create) Virtual Disk Unit 374 ; 375 ; Syntax: 376 ; 377 ; >AVF ddnn:/out_switch = infile1/in_switch { , infile2 ...} 378 ; 379 ; ddnn: Specifies the name to be used for the Virtual Unit. 380 ; infile Specifies one or more container file to be assigned. 381 ; /out_switch Include: 382 ; /WP - Create a write-protected device 383 ; /ONL - Bring created device online 384 ; /HE - Provide help message 385 ; /in_switch Include: 386 ; /LO - Set lock bit on file (write access required) 387 ; /RO - Allow only read access to the file 388 ; /CR:n - Create container file with n decimal blocks 389 ; /NOINC - Do not increment volume transaction count 390 ; for this device. 391 ; 392 ;- 393 394 000000 $AVF:: 395 ; 396 ; Perform one-time initialization 397 ; 398 000000 CALL TKINIT ; Do task-level initialization 399 000004 103462 BCS AVFEX ; If we can't init, then we can't run 400 401 ; 402 ; Top of command processing pass loop 403 ; 404 ; Perform pass initialization 405 ; 406 000006 RESTRT: CALL PSINIT ; Perform pass intialization 407 ; 408 ; GETCMD returns: 409 ; 410 ; A new command line is read into the GCML buffer, and 411 ; preliminary parsing has been done (CSI$1). 412 ; 413 ; R0 contains the address of the CSI control block 414 ; 415 ; If carry is set, end-of-file or an error has occurred while 416 ; fetching the command line. 417 ; 418 000012 CALL GETCMD ; Get next command line 419 000016 103455 BCS AVFEX ; Exit with status to parent 420 ; 421 ; GETDEV performs the following: 422 ; 423 ; The output specification is parsed for the name and unit number 424 ; of the virtual device, along with any device switches. 425 ; AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-1 ** AVF Main Code 426 ; The device control block is allocated, initialized, and linked 427 ; into the system device list. 428 ; 429 ; Carry is set on one of the following conditions (error message 430 ; has already been printed): Syntax error, illegal switch, invalid 431 ; or duplicate device name, insufficient pool to allocate 432 ; device structure, device already attached, device allocated to 433 ; another terminal, or user requested help 434 ; 435 000020 CALL GETDEV ; Parse virtual device and allocate it 436 000024 103770 BCS RESTRT ; On error, start next command 437 ; 438 ; *** From this point on, any fatal error condition requires a call to 439 ; DEADEV to unlink and deallocate the newly created Virtual unit *** 440 ; 441 ; Process next file specification 442 ; 443 ; GETFIL returns the following: 444 ; 445 ; The next container file specification is scanned. The file is 446 ; created or accessed, and necessary control information is 447 ; stored in our local copy of the secondary block which will be 448 ; created later. 449 ; 450 ; Carry set indicates loop termination, a fatal error occurred: 451 ; File not found, privilege violation, creation failure, 452 ; syntax error, or illegal switch. 453 ; 454 000026 012700 000362' MOV #PRVDPB,R0 ; Get GIN$ set privilege DPB 455 000032 005060 000004 CLR G.IP01(R0) ; Set to turn off privilege 456 000036 DIR$ R0 ; Non-privileged for file access 457 000042 NXTFIL:: 458 000042 CALL GETFIL ; Get next container file specification 459 000046 103423 BCS UNDO ; If cs, handle exception return 460 000050 132767 000020 001417' BITB #CS.MOR,CSIBLK+C.STAT ; Are there more files on the line? 461 000056 001371 BNE NXTFIL ; Get the next one if we have more to do 462 ; 463 ; Create the secondary pool control block, and finish creation of 464 ; the virtual unit. 465 ; 466 ; CREBLK performs the following: 467 ; 468 ; Allocates secondary pool space and copies the local secondary 469 ; control block into secondary pool. 470 ; 471 ; Calculates the total size of the virtual device and stores 472 ; these values in the UCB 473 ; 474 ; Establishes final links and bitmasks to set the unit online. 475 ; 476 ; If carry is set upon return, then insufficient secondary pool was 477 ; available to create the secondary control block. 478 ; 479 000060 CALL CREBLK ; Create secondary pool block structure 480 000064 103414 BCS UNDO ; On failure, undo what we have done 481 ; 482 ; Try to bring the created unit online, if so desired by the user. AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-2 ** AVF Main Code 483 ; If this fails, we print a warning message, but we leave things stand 484 ; as they are. 485 ; 486 000066 012700 000362' MOV #PRVDPB,R0 ; Get GIN$ set privilege DPB 487 000072 012760 000001 000004 MOV #1,G.IP01(R0) ; Set to turn on privilege 488 000100 DIR$ R0 ; Privileged for online transition 489 490 000104 CALL ONLINE ; Optionally bring unit online 491 000110 CALL DETACH ; Detach from the virtual unit 492 493 000114 000734 BR RESTRT ; Get next command 494 495 ; 496 ; At this point, something has failed in our secondary processing. 497 ; The following actions are performed: 498 ; 499 ; DEAFIL is called to deaccess all active container files 500 ; 501 ; DEADEV is called to deallocate the virtual device database. 502 ; 503 000116 UNDO:: 504 000116 CALL DEAFIL ; Deaccess all container files 505 000122 CALL DETACH ; Detach from the virtual disk 506 507 000126 012700 000362' MOV #PRVDPB,R0 ; Get GIN$ set privilege DPB 508 000132 012760 000001 000004 MOV #1,G.IP01(R0) ; Set to turn on privilege 509 000140 DIR$ R0 ; Privileged until next file access 510 511 000144 CALL DEADEV ; Deallocate virtual device database 512 000150 000716 BR RESTRT ; And attempt to process new command 513 514 000152 AVFEX:: EXST$S EXISTS ; Exit with status 515 516 .SBTTL ** TKINIT -- Task Initialization 517 ;+ 518 ; ** TKINIT -- One-time task initialization 519 ; 520 ; This routine performs the following functions: 521 ; 522 ; - Retrieves the taskname for use in prompts and error messages 523 ; - Initializes the FCS buffers 524 ; - Retrieves the TCB for our task 525 ; - Retrieves the TI: UCB address and the Protection Group code 526 ; - Fills in the vector table with Executive routine entry points 527 ; 528 ; All registers are available to this routine 529 ;- 530 531 000164 TKINIT:: 532 000164 162706 000044 SUB #18.*2.,SP ; Allocate buffer on stack 533 000170 010605 MOV SP,R5 ; Point to it 534 000172 GTSK$S R5 ; Get task info 535 000202 016501 000000 MOV G.TSTN(R5),R1 ; Get task name 536 000206 012700 000000G MOV #TSKNAM,R0 ; Point to the output buffer 537 000212 010004 MOV R0,R4 ; Save the buffer address 538 000214 CALL $C5TA ; Convert to ASCII for error routines 539 000220 062706 000044 ADD #18.*2.,SP ; Release the stack space AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-3 ** TKINIT -- Task Initialization 540 000224 012703 000002G MOV #PRMSTR+2,R3 ; Get command line prompt string 541 000230 112423 MOVB (R4)+,(R3)+ ; Copy it over 542 000232 112423 MOVB (R4)+,(R3)+ ; ... 543 000234 112423 MOVB (R4)+,(R3)+ ; ... 544 545 000236 FINIT$ ; Initialize the FSR region 546 547 000242 012767 000001 002110' MOV #EX$SUC,EXISTS ; Assume successful status 548 549 000250 DIR$ #VECDPB ; Get Executive vectors filled 550 000256 103006 BCC 10$ ; If CC=0 then successful completion 551 000260 012704 000000G MOV #ER$GIN,R4 ; Get error code 552 000264 CALL PRTERR ; Print error message 553 000270 000261 SEC ; Set error return 554 000272 000413 BR 20$ ; And return 555 556 000274 017700 002100' 10$: MOV @TKTCB,R0 ; Get our TCB address 557 000300 010067 002154' MOV R0,OURTCB ; And save it 558 000304 016001 000026 MOV T.UCB(R0),R1 ; Get TI: UCB address 559 000310 010167 002156' MOV R1,TIUCB ; And save it 560 000314 016167 177774 002160' MOV U.LUIC(R1),PROUIC ; Save protection group code 561 562 000322 000207 20$: RETURN ; Return to caller 563 564 .SBTTL ** PSINIT -- Pass Initialization 565 ;+ 566 ; PSINIT -- Perform pass initialization 567 ; 568 ; This routine is executed prior to the scanning of a new command line. 569 ; It resets variables which will be used to construct the Virtual Device. 570 ; 571 ; Inputs: None. 572 ; Outputs: None. 573 ;- 574 575 000324 PSINIT:: 576 000324 012700 001574' MOV #FILFDB,R0 ; Get FDB address 577 000330 FDAT$R ,#R.FIX,,#512. ; Define file attributes 578 000344 FDRC$R ,#FD.RWM ; Define record access 579 000352 FDBK$R ; Define block access 580 000352 FDOP$R ,#FILLUN ; Define open access 581 000360 012700 002212' MOV #SECBLK,R0 ; Point to secondary block build area 582 000364 010067 002206' MOV R0,CURBLK ; Initialize pointer 583 000370 012701 000260 MOV #,R1 ; Get number of words 584 000374 005020 10$: CLR (R0)+ ; Clear out the block 585 000376 077102 SOB R1,10$ ; Loop until complete 586 000400 005067 002210' CLR NUMFIL ; No container files defined 587 588 000404 012767 000250 002152' MOV #CSWDEF,CSIMSK ; Store default switch environment 589 590 000412 005067 002202' CLR BASLBN ; Clear base LBN counter 591 000416 005067 002204' CLR BASLBN+2 ; 592 000422 005067 002132' CLR NEWFLG ; No new device created yet 593 594 000426 000207 RETURN ; Return to caller 595 596 .SBTTL ** GETCMD -- Get next command AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-4 ** GETCMD -- Get next command 597 ;+ 598 ; ** GETCMD -- Get next command for processing 599 ; 600 ; Inputs: None. 601 ; Outputs: Carry clear - A command has been successfully retrieved 602 ; R0 points to the CSI control block 603 ; Carry set - End of file or command I/O error 604 ; 605 ;- 606 607 000430 GETCMD:: 608 000430 GCML$ #GCML,#PRMSTR,#PRMSTL ; Get next command line 609 000454 103420 BCS 10$ ; If cs then check error 610 000456 010001 MOV R0,R1 ; Copy GCML block address 611 000460 012700 001416' MOV #CSIBLK,R0 ; Point to CSI control block 612 000464 016160 000146 000002 MOV G.CMLD(R1),C.CMLD(R0) ; Copy command line descriptor 613 000472 001756 BEQ GETCMD ; If eq then null command line 614 000474 016160 000150 000004 MOV G.CMLD+2(R1),C.CMLD+2(R0) 615 000502 CSI$1 ; Perform syntax preprocessing 616 000506 103021 BCC 30$ ; OK, exit to caller 617 000510 012704 000000G MOV #ER$SYN,R4 ; Get the error code 618 000514 000413 BR 20$ ; And proceed 619 000516 122760 177766 000140 10$: CMPB #GE.EOF,G.ERR(R0) ; End of file on outer level? 620 000524 000261 SEC ; Assume it is 621 000526 001411 BEQ 30$ ; If eq yes 622 000530 012704 000000G MOV #ER$GCM,R4 ; Get the error code 623 000534 RCML$ #GCML ; On GCML errors, reset the context 624 000544 20$: CALL PRTERR ; Print error code 625 000550 000727 BR GETCMD ; Try to do it again 626 000552 000207 30$: RETURN ; Return to caller 627 628 .SBTTL ** GETDEV -- Process Device Specification 629 ; 630 ; ** GETDEV -- Process virtual device specification 631 ; 632 ; Inputs: R0 points to CSI control block 633 ; 634 ; Outputs: Carry set: One of many errors has happened 635 ; Carry clear: Device data structure created. 636 ; 637 000554 GETDEV: 638 000554 CSI$4 ,OUTPUT,#OUTSWI,#DSCBLK ; Process output specification 639 000612 012704 000000G MOV #ER$SYN,R4 ; Assume an error occurred 640 000616 103002 BCC 5$ ; If cc=0 then OK 641 000620 000167 000416 JMP 2050$ ; Illegal switch or invalid spec 642 ; 643 ; Process help request 644 ; 645 000624 032767 000002 002152' 5$: BIT #FL.HLP,CSIMSK ; Was help requested? 646 000632 001416 BEQ 10$ ; If eq no 647 000634 012700 000300' MOV #ERRDPB,R0 ; Point to the QIO DPB 648 000640 012760 000000G 000014 MOV #HLPMSG,Q.IOPL(R0) ; Point to help message 649 000646 012760 000000G 000016 MOV #HLPLEN,Q.IOPL+2(R0) ; Store length 650 000654 012760 000040 000020 MOV #<' >,Q.IOPL+4(R0) ; Store VFC 651 000662 DIR$ R0 ; Write it out 652 000666 000567 BR 2080$ ; And go for next command 653 ; AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-5 ** GETDEV -- Process Device Specification 654 ; Perform other checks 655 ; 656 000670 012704 000000G 10$: MOV #ER$NEQ,R4 ; Assume no equals sign 657 000674 132760 000040 000001 BITB #CS.EQU,C.STAT(R0) ; Both input and output specified? 658 000702 001557 BEQ 2050$ ; If eq no 659 000704 012704 000000G MOV #ER$NDV,R4 ; Assume no device specified 660 000710 132760 000004 000001 BITB #CS.DVF,C.STAT(R0) ; Device specified? 661 000716 001551 BEQ 2050$ ; If eq no 662 000720 012704 000000G MOV #ER$NAM,R4 ; Assume filename, etc. specified 663 000724 132760 000033 000001 BITB #CS.NMF!CS.DIF!CS.WLD!CS.MOR,C.STAT(R0) ; Other garbage? 664 000732 001402 BEQ 15$ ; If eq no 665 000734 CALL PRTWAR ; Print the warning 666 ; 667 ; Extract device name 668 ; 669 000740 016003 000006 15$: MOV C.DEVD(R0),R3 ; Get length of device string 670 000744 016000 000010 MOV C.DEVD+2(R0),R0 ; Get address of device string 671 000750 112067 002142' MOVB (R0)+,DVNAM ; Store first char 672 000754 112067 002143' MOVB (R0)+,DVNAM+1 ; Store second char 673 000760 CALL $COTB ; Convert unit number 674 000764 010167 002144' MOV R1,DVUNT ; Store the unit number 675 ; 676 ; Go to system state to perform further checks and create device structure 677 ; 678 000770 005067 002150' CLR ERRFLG ; Clear system state error flag 679 000774 CALL $SWSTK,2000$ ; Switch to the system stack 680 681 001000 CALL DSCAN ;; Scan for VF0:, check our device name 682 001004 010567 002136' MOV R5,VFDCB ;; Store DCB for VF0: 683 001010 001503 BEQ 1002$ ;; If eq then VF: not loaded 684 001012 103504 BCS 1001$ ;; If CC=1 then invalid device name 685 001014 016705 002134' MOV NEWUCB,R5 ;; Device data structure exist? 686 001020 001026 BNE 20$ ;; If ne yes - bypass creation 687 688 001022 CALL CRDEV ;; Create new Virtual unit 689 001026 103472 BCS 1003$ ;; If cs then insufficient pool 690 001030 010467 002140' MOV R4,NEWDCB ;; Save the new device DCB 691 001034 016700 002146' MOV DVBCK,R0 ;; Get preceding device 692 001040 011014 MOV (R0),(R4) ;; Link forward from new one 693 001042 010410 MOV R4,(R0) ;; And link ourselves in 694 001044 010567 002134' MOV R5,NEWUCB ;; Store it for later reference 695 696 001050 016701 002136' MOV VFDCB,R1 ;; Get VF0: DCB 697 001054 016101 000000G MOV D.UCB(R1),R1 ;; Get the UCB address 698 001060 016165 000072 000072 MOV U.VLNK(R1),U.VLNK(R5) ;; Link to next virtual unit 699 001066 010561 000072 MOV R5,U.VLNK(R1) ;; Make ours the first virtual unit 700 701 001072 005167 002132' COM NEWFLG ;; Show we have created a device 702 703 ; The following check will fail only for devices already in existence. 704 705 001076 005765 177776 20$: TST U.OWN(R5) ;; Does someone own the unit? 706 001102 001404 BEQ 30$ ;; If eq no 707 001104 026567 177776 002156' CMP U.OWN(R5),TIUCB ;; Yes, do we own it? 708 001112 001036 BNE 1004$ ;; If ne no -- reject the command 709 710 001114 005765 000022 30$: TST U.ATT(R5) ;; Is a task attached to the device? AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-6 ** GETDEV -- Process Device Specification 711 001120 001033 BNE 1004$ ;; If ne yes -- reject the command 712 001122 016765 002154' 000022 MOV OURTCB,U.ATT(R5) ;; Attach to the device 713 714 ; 715 ; Assign LUN to the virtual disk so that in case we die a horrible death, 716 ; I/O rundown will detach us from the unit 717 ; 718 .IF DF X$$HDR 719 720 001130 017746 002070' MOV @KISA6,-(SP) ;; Save APR 721 001134 017777 002064' 002070' MOV @SAHDB,@KISA6 ;; Map external header (if necessary) 722 001142 017700 002066' MOV @SAHPT,R0 ;; Get the header bias 723 724 .IFF ; DF X$$HDR 725 726 MOV @HEADR,R0 ;; Get task header address 727 728 .IFTF ; DF X$$HDR 729 730 001146 010560 000112 MOV R5,H.LUN+<*4>(R0) 731 ;; Assign LUN to Virtual Unit 732 733 .IFT ; DF X$$HDR 734 735 001152 012677 002070' MOV (SP)+,@KISA6 ;; Restore mapping 736 737 .ENDC ; DF X$$HDR 738 739 001156 116765 002161' 000050 MOVB DEVGRP,U.XGRP(R5) ;; Set the protection group code 740 001164 105065 000046 CLRB U.XFLG(R5) ;; Clear flags byte 741 001170 032767 000100 002152' BIT #FL.WPR,CSIMSK ;; User want write-protected disk? 742 001176 001403 BEQ 40$ ;; If eq no 743 001200 152765 000001 000046 BISB #XF.WPR,U.XFLG(R5) ;; Set the bit 744 001206 000410 40$: BR 1900$ ;; Return successfully 745 746 001210 005267 002150' 1004$: INC ERRFLG ;; Device allocated or attached 747 001214 005267 002150' 1003$: INC ERRFLG ;; Insufficient pool 748 001220 005267 002150' 1002$: INC ERRFLG ;; VF: not loaded 749 001224 005267 002150' 1001$: INC ERRFLG ;; Duplicate device name 750 001230 000207 1900$: RETURN ;; Return to user state 751 752 001232 000241 2000$: CLC ; Assume success 753 001234 016704 002150' MOV ERRFLG,R4 ; Get error flag 754 001240 001403 BEQ 2100$ ; If eq, then OK 755 001242 2050$: CALL PRTERR ; Handle error, no undoing required. 756 001246 000261 2080$: SEC ; Indicate failure 757 001250 000207 2100$: RETURN ; Return to caller 758 759 .SBTTL ** DSCAN -- Find Prototype Unit 760 ;+ 761 ; DSCAN -- Search for the prototype unit database and perform checks 762 ; (System state routine) 763 ; 764 ; Inputs: DVNAM contains the ASCII device name to be created 765 ; DVUNT contains the binary unit number to be created 766 ; 767 ; Outputs: Carry clear - Device duplication check passed AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-7 ** DSCAN -- Find Prototype Unit 768 ; R4 and DVBCK contain DCB address of preceding device 769 ; R5 contains DCB address of VF0: (0 if not found) 770 ; 771 ;- 772 773 001252 005005 DSCAN:: CLR R5 ;; Clear VF0: DCB 774 001254 005004 CLR R4 ;; Clear preceding DCB pointer 775 776 001256 016701 002056' MOV DEVHD,R1 ;; Get address of device listhead 777 001262 010100 10$: MOV R1,R0 ;; Copy previous DCB 778 001264 011001 MOV (R0),R1 ;; Get next DCB 779 001266 001506 BEQ 70$ ;; If eq then VF0: not found - return error 780 001270 026127 000000G 043126 CMP D.NAM(R1),#<"VF> ;; Right name? 781 001276 001371 BNE 10$ ;; If ne no - try next 782 001300 005761 000000G TST D.UNIT(R1) ;; Unit zero? 783 001304 001366 BNE 10$ ;; If ne no - try next 784 001306 005761 000000G TST D.PCB(R1) ;; Is the driver loaded? 785 001312 001474 BEQ 70$ ;; If eq no - fatal error 786 001314 016102 000000G MOV D.UCB(R1),R2 ;; Get the first UCB address 787 001320 132762 000001 000007 BITB #US.OFL,U.ST2(R2) ;; Unit offline? 788 001326 001066 BNE 70$ ;; If ne yes - fatal error 789 001330 010105 MOV R1,R5 ;; Save VF0: DCB address 790 ; 791 ; Look for existing device or spot in device list where we will place this one 792 ; 793 794 001332 016701 002056' MOV DEVHD,R1 ;; Get device listhead again 795 001336 010100 20$: MOV R1,R0 ;; Copy previous device 796 001340 011001 MOV (R0),R1 ;; Get next device 797 001342 001451 BEQ 50$ ;; If eq then break out of loop 798 001344 016102 000000G MOV D.UCB(R1),R2 ;; Get first UCB 799 001350 032762 010000 000010 BIT #DV.PSE,U.CW1(R2) ;; Is this a pseudo-device? 800 001356 001041 BNE 30$ ;; If ne yes, we go before it 801 001360 026167 000000G 002142' CMP D.NAM(R1),DVNAM ;; Names match? 802 001366 001363 BNE 20$ ;; If ne no, keep looking 803 001370 126167 000000G 002144' CMPB D.UNIT(R1),DVUNT ;; Check lowest unit on DCB 804 001376 001405 BEQ 22$ ;; If eq then duplicate check it out 805 001400 101030 BHI 30$ ;; If hi then this is the one 806 001402 126167 000001G 002144' CMPB D.UNIT+1(R1),DVUNT ;; Check highest unit on DCB 807 001410 103752 BLO 20$ ;; If lo then keep looking 808 ; 809 ; This device data structure contains the device specified by the user. 810 ; We will accept it if: 811 ; 812 ; - It has the right structure (single unit on the DCB) 813 ; - It is linked into the Virtual Device List (U.VLNK) 814 ; - It is currently unassigned (U.CTLP is zero) 815 ; 816 001412 126161 000000G 000001G 22$: CMPB D.UNIT(R1),D.UNIT+1(R1) ;; Single unit device? 817 001420 001031 BNE 70$ ;; If ne no - cannot be this device 818 001422 016500 000000G MOV D.UCB(R5),R0 ;; Get VF0: UCB 819 001426 016000 000072 24$: MOV U.VLNK(R0),R0 ;; Get next virtual device 820 001432 001424 BEQ 70$ ;; If eq then this is not virtual device 821 001434 020002 CMP R0,R2 ;; Is it this device? 822 001436 001373 BNE 24$ ;; No, try next virtual device 823 001440 005760 000052 TST U.CTLP(R0) ;; Is the device currently assigned? 824 001444 001017 BNE 70$ ;; Yes, that's an error AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-8 ** DSCAN -- Find Prototype Unit 825 001446 010067 002134' MOV R0,NEWUCB ;; Mark it up as our baby 826 001452 016067 000000 002140' MOV U.DCB(R0),NEWDCB ;; Save the DCB address 827 001460 000407 BR 65$ ;; And return 828 829 001462 010004 30$: MOV R0,R4 ;; Save previous DCB address 830 001464 000403 BR 60$ ;; And return 831 832 001466 005704 50$: TST R4 ;; Did we find preceding unit? 833 001470 001001 BNE 60$ ;; If ne then all's fine 834 001472 010004 MOV R0,R4 ;; Make the last device preceding 835 001474 010467 002146' 60$: MOV R4,DVBCK ;; Store the DCB address 836 001500 000241 65$: CLC ;; Indicate success 837 001502 000207 RETURN ;; Return carry clear 838 839 001504 000261 70$: SEC ;; Return error status 840 001506 000207 RETURN ;; Return to caller 841 842 .SBTTL ** CRDEV -- Create Device Database 843 ;+ 844 ; CRDEV -- Allocate and initialize device database 845 ; 846 ; Inputs: VFDCB contains the DCB address of the prototype device 847 ; DVNAM contains the two character device name 848 ; DVUNT contains the binary unit number of the device 849 ; 850 ; Outputs: Carry set -- Insufficient pool to create structure 851 ; Carry clear: 852 ; R2 contains the SCB address of the new data structure. 853 ; R4 contains the DCB address of the new data structure. 854 ; R5 contains the UCB address of the new data structure. 855 ; 856 ; This routine is entered and exited at system state level 857 ;- 858 859 001510 CRDEV:: 860 001510 012701 000000G MOV #$VFSIZ,R1 ;; Get size of VF: data structure 861 001514 CALL @ALOCB ;; Allocate device database 862 001520 103520 BCS 40$ ;; If cs then insufficient pool 863 864 001522 016705 002136' MOV VFDCB,R5 ;; Get prototype DCB address 865 001526 010004 MOV R0,R4 ;; Save address of the data structure 866 001530 012702 000000C MOV #<$VFSIZ/2>,R2 ;; Get the size of the database 867 001534 012520 10$: MOV (R5)+,(R0)+ ;; Copy the database 868 001536 077202 SOB R2,10$ ;; Loop until done 869 ; 870 ; Now initialize the data structure. Setup R4 as the DCB, R5 as the UCB 871 ; and R2 as the SCB pointers 872 ; 873 001540 010405 MOV R4,R5 ;; Copy DCB address 874 001542 062705 000000G ADD #$VFUOF,R5 ;; Point to the UCB 875 001546 010502 MOV R5,R2 ;; Copy the UCB address 876 001550 062702 000000G ADD #$VFSOF,R2 ;; Point to the SCB 877 ; 878 ; Initialize the DCB 879 ; 880 001554 010564 000000G MOV R5,D.UCB(R4) ;; Setup UCB pointer 881 001560 116764 002144' 000000G MOVB DVUNT,D.UNIT(R4) ;; Store low unit number AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-9 ** CRDEV -- Create Device Database 882 001566 116764 002144' 000001G MOVB DVUNT,D.UNIT+1(R4) ;; Store high unit number 883 001574 016764 002142' 000000G MOV DVNAM,D.NAM(R4) ;; Save device name 884 ; 885 ; Initialize the UCB 886 ; 887 001602 005065 177776 CLR U.OWN(R5) ;; No one can own it yet 888 001606 010465 000000 MOV R4,U.DCB(R5) ;; Back pointer to DCB 889 001612 010565 000002 MOV R5,U.RED(R5) ;; No redirect 890 001616 112765 000101 000005 MOVB #US.MNT!US.VV,U.STS(R5) ;; Not mounted 891 001624 112765 000001 000007 MOVB #US.OFL,U.ST2(R5) ;; Unit offline 892 001632 012765 140110 000010 MOV #DV.DIR!DV.MSD!DV.F11!DV.MNT,U.CW1(R5) ;; Preset chars 893 001640 005065 000012 CLR U.CW2(R5) ;; Clear device size words (redundant) 894 001644 005065 000014 CLR U.CW3(R5) ;; 895 001650 012765 001000 000016 MOV #512.,U.CW4(R5) ;; Buffer size (redundant) 896 001656 010265 000020 MOV R2,U.SCB(R5) ;; Store SCB pointer 897 001662 005065 000022 CLR U.ATT(R5) ;; No one is attached 898 001666 005065 000032 CLR U.UCBX(R5) ;; No UCB extension 899 001672 005065 000034 CLR U.ACP(R5) ;; No ACP is attached (redundant) 900 001676 005065 000036 CLR U.VCB(R5) ;; No VCB associated (redundant) 901 001702 005065 000040 CLR U.UMB(R5) ;; No UMB node (redundant) 902 001706 005065 000042 CLR U.PRM(R5) ;; Preset geometry (may be changed later) 903 001712 005065 000044 CLR U.PRM+2(R5) ;; 904 001716 005065 000052 CLR U.CTLP(R5) ;; Clear secondary block bias 905 001722 005065 000072 CLR U.VLNK(R5) ;; Clear virtual UCB link 906 ; 907 ; Initialize the SCB 908 ; 909 001726 016700 002102' MOV .S.LHD,R0 ;; Get SCB listhead offset 910 001732 060200 ADD R2,R0 ;; Form pointer to I/O queue listhead 911 001734 005010 CLR (R0) ;; Clear I/O queue listhead 912 001736 010060 000002 MOV R0,2(R0) ;; Empty the queue 913 001742 016700 002104' MOV .S.STS,R0 ;; Get SCB status offset 914 001746 060200 ADD R2,R0 ;; Form pointer to it 915 001750 105010 CLRB (R0) ;; Unit is not busy 916 001752 016700 002106' MOV .S.PKT,R0 ;; Get SCB packet address pointer 917 001756 060200 ADD R2,R0 ;; Point to it 918 001760 005010 CLR (R0) ;; No active packet 919 920 001762 000207 40$: RETURN ;; Return to caller 921 922 .SBTTL ** GETFIL -- Access Next Container File 923 ;+ 924 ; ** GETFIL -- Access the next container file for use 925 ; 926 ; The next container file specification is scanned. The file is 927 ; created or accessed, and necessary control information is 928 ; stored in our local copy of the secondary block which will be 929 ; created later. 930 ; 931 ; GETFIL returns the CSI control block address in R0. 932 ; 933 ; Carry set indicates loop termination: 934 ; If Z-bit clear, then a fatal error occurred: 935 ; File not found, privilege violation, creation failure, 936 ; syntax error, or illegal switch. 937 ; If Z-bit set, then no more container files remain. 938 ;- AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-10 ** GETFIL -- Access Next Container File 939 940 001764 GETFIL:: 941 001764 012704 000000G MOV #ER$TMF,R4 ; Assume too many files 942 001770 022767 000020 002210' CMP #MX$FIL,NUMFIL ; How many container files do we have now? 943 001776 101002 BHI 10$ ; If hi then we can have more 944 002000 000167 001106 JMP 250$ ; Too many files 945 946 002004 042767 000001 002152' 10$: BIC #CSWNEW,CSIMSK ; Clear non-propagating switches 947 002012 012704 000000G MOV #ER$SYN,R4 ; Assume a syntax error will occur 948 002016 CSI$4 #CSIBLK,INPUT,#INPSWI,#DSCBLK ; Parse the next input file 949 002060 103421 BCS 30$ ; Syntax error 950 002062 132760 000010 000001 BITB #CS.WLD,C.STAT(R0) ; Any wild specifiers? 951 002070 001015 BNE 30$ ; If ne yes, that's illegal 952 953 002072 012700 001574' 20$: MOV #FILFDB,R0 ; Get FDB address 954 002076 012701 001676' MOV #FILFDB+F.FNB,R1 ; Get filename block address 955 002102 012702 001424' MOV #CSIBLK+C.DSDS,R2 ; Get dataset descriptor 956 002106 012703 001734' MOV #FILDFB,R3 ; Get default filename block 957 002112 CALL .PARSE ; Create filename block 958 002116 103004 BCC 40$ ; Branch if successful 959 002120 012704 000000G MOV #ER$PAR,R4 ; Get error code 960 961 002124 000167 000762 30$: JMP 250$ ; Syntax error, go handle it 962 963 002130 016704 002152' 40$: MOV CSIMSK,R4 ; Get the switch mask 964 002134 042704 177763 BIC #^C,R4 ; Mask off bits 965 002140 022704 000014 CMP #,R4 ; Both /LO and /RO specified? 966 002144 001013 BNE 50$ ; If ne no 967 002146 042767 000010 002152' BIC #FL.LCK,CSIMSK ; Clear the switch mask 968 002154 032767 000010 001442' BIT #FL.LCK,CSIBLK+C.MKW1 ; Was /LO actually specified? 969 002162 001404 BEQ 50$ ; If eq no - no error 970 002164 012704 000000G MOV #ER$LOR,R4 ; Get error code 971 002170 CALL PRTWAR ; Print the warning 972 973 002174 032767 000001 002152' 50$: BIT #FL.CRE,CSIMSK ; Was /CR specified? 974 002202 001504 BEQ 120$ ; If eq no 975 002204 012704 002116' MOV #STRING,R4 ; Get start of the size string 976 002210 010405 MOV R4,R5 ; Copy it 977 002212 012703 000010 MOV #8.,R3 ; Set maximum size 978 002216 105724 60$: TSTB (R4)+ ; Look for terminating null 979 002220 001402 BEQ 70$ ; Found it 980 002222 077303 SOB R3,60$ ; Search rest of string 981 002224 000413 BR 80$ ; If loop dropped out, value is too large 982 983 002226 162704 002117' 70$: SUB #STRING+1,R4 ; Calculate length of number 984 002232 012703 002126' MOV #BLKNUM,R3 ; Get result area 985 002236 CALL .DD2CT ; Convert decimal to double binary 986 002242 103404 BCS 80$ ; If cs, conversion error 987 002244 012301 MOV (R3)+,R1 ; Get high order size of file 988 002246 105763 177777 TSTB -1(R3) ; Inspect high byte of high word 989 002252 001404 BEQ 90$ ; If eq, then valid size 990 991 002254 012704 000000G 80$: MOV #ER$SIZ,R4 ; Illegal file length 992 002260 000167 000626 JMP 250$ ; Go handle the error 993 994 002264 012300 90$: MOV (R3)+,R0 ; Get low order block size 995 002266 010067 000022' MOV R0,CREDPB+Q.IOPL+6 ; Set size of file to create AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-11 ** GETFIL -- Access Next Container File 996 002272 110167 000020' MOVB R1,CREDPB+Q.IOPL+4 997 002276 010067 001602' MOV R0,FILFDB+F.HIBK+2 ; Set size of file in attribute block 998 002302 110167 001604' MOVB R1,FILFDB+F.EFBK+0 999 002306 010067 001606' MOV R0,FILFDB+F.EFBK+2 ; Set EOF block in attribute block 1000 002312 110167 001604' MOVB R1,FILFDB+F.EFBK+0 1001 002316 012767 001000 001610' MOV #1000,FILFDB+F.FFBY ; Mark EOF at end of last block 1002 002324 F11QIO CREDPB,110$ ; Attempt to create the file 1003 002344 F11QIO ENADPB,100$ ; Attempt to create directory entry 1004 002364 000430 BR 140$ ; Continue if everything worked 1005 002366 100$: F11QIO DELDPB ; On create error, delete the file 1006 002374 012704 000000G MOV #ER$ENT,R4 ; Error entering filename 1007 002400 000167 000506 JMP 250$ ; Go print the error 1008 002404 012704 000000G 110$: MOV #ER$SIZ,R4 ; Get error code 1009 002410 000167 000476 JMP 250$ ; Go print the error 1010 ; 1011 ; Perform directory lookup operation on an existing container file 1012 ; 1013 002414 120$: F11QIO FNADPB,130$ ; Lookup existing file 1014 002434 000404 BR 140$ ; Continue on successful lookup 1015 002436 012704 000000G 130$: MOV #ER$FNF,R4 ; Get error code 1016 002442 000167 000444 JMP 250$ ; Go print the error 1017 ; 1018 ; Access, then deaccess file, obtaining necessary statistics 1019 ; 1020 002446 032767 000004 002152' 140$: BIT #FL.RON,CSIMSK ; Is the container file read-only? 1021 002454 001030 BNE 150$ ; If ne yes 1022 002456 F11QIO ACWDPB,170$ ; Issue write access request 1023 002476 032767 000010 002152' BIT #FL.LCK,CSIMSK ; Is the file to be locked? 1024 002504 001424 BEQ 160$ ; If eq no 1025 002506 152767 000100 002050' BISB #UC.DLK,WATATT ; Set the deaccess lock bit 1026 002514 F11QIO WATDPB,170$ ; Write the attribute 1027 002534 000410 BR 160$ ; And proceed 1028 002536 150$: F11QIO ACRDPB,170$ ; Issue read access request 1029 1030 002556 160$: F11QIO DACDPB,170$ ; And deaccess the file 1031 002576 000407 BR 175$ ; Continue on success 1032 1033 002600 170$: F11QIO DACDPB ; Make sure the file is deaccessed 1034 002606 012704 000000G MOV #ER$ACC,R4 ; Get error code 1035 002612 000167 000274 JMP 250$ ; And handle the error 1036 1037 ; 1038 ; Get the next space in the local secondary pool block, and fill in 1039 ; the details 1040 ; 1041 1042 002616 016704 002206' 175$: MOV CURBLK,R4 ; Get address of next slot 1043 1044 002622 012700 002030' MOV #STAATT,R0 ; Point to the statistics block 1045 ; 1046 ; Format of the Files-11 statistics block as returned by the ACP: 1047 ; 1048 ; Words 0 and 1: High and low logical block no. (zero if non-contiguous) 1049 ; Words 2 and 3: High and low block size 1050 ; Word 4: Access count and Lock count 1051 ; 1052 002626 012064 000014 MOV (R0)+,X.BASE(R4) ; Store LBN base for this file AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-12 ** GETFIL -- Access Next Container File 1053 002632 012064 000016 MOV (R0)+,X.BASE+2(R4) ; 1054 002636 001004 BNE 180$ ; If ne then file is contiguous 1055 002640 012704 000000G MOV #ER$NCT,R4 ; Get error code 1056 002644 000167 000242 JMP 250$ ; File not contiguous 1057 ; 1058 ; Store the offset into the virtual device that the container file 1059 ; represents, store the container size, and update the offset in case 1060 ; another container file is coming later. 1061 ; 1062 002650 016764 002202' 000010 180$: MOV BASLBN,X.OFF(R4) ; Store current offset into virtual device 1063 002656 016764 002204' 000012 MOV BASLBN+2,X.OFF+2(R4) 1064 002664 011064 000004 MOV (R0),X.SIZE(R4) ; Store high order size of container file 1065 002670 062067 002202' ADD (R0)+,BASLBN ; Update offset for next container file 1066 002674 011064 000006 MOV (R0),X.SIZE+2(R4) ; Store low order size of container file 1067 002700 061067 002204' ADD (R0),BASLBN+2 ; Update low order offset for next file 1068 002704 005567 002202' ADC BASLBN ; Propagate carry to high order 1069 ; 1070 ; Store the file ID of the container file in the block 1071 ; 1072 002710 012700 001676' MOV #FILFDB+F.FNB+N.FID,R0 ; Point to the file ID 1073 002714 012064 000020 MOV (R0)+,X.FID(R4) ; Copy it into the block 1074 002720 012064 000022 MOV (R0)+,X.FID+2(R4) 1075 002724 011064 000024 MOV (R0),X.FID+4(R4) 1076 ; 1077 ; Now get the UCB address of the device which holds the container file, 1078 ; and increment the volume transaction count, if that is called for 1079 ; 1080 002730 CALL $SWSTK,210$ ; Go on the system stack 1081 1082 .IF DF X$$HDR 1083 1084 002734 017746 002070' MOV @KISA6,-(SP) ;; Save APR 1085 002740 017777 002064' 002070' MOV @SAHDB,@KISA6 ;; Map external header (if necessary) 1086 002746 017700 002066' MOV @SAHPT,R0 ;; Get the header bias 1087 1088 .IFF ; DF X$$HDR 1089 1090 MOV @HEADR,R0 ;; Get task header address 1091 1092 .IFTF ; DF X$$HDR 1093 1094 002752 016001 000106 MOV H.LUN+<*4>(R0),R1 1095 ;; Grab container file UCB address 1096 1097 .IFT ; DF X$$HDR 1098 1099 002756 012677 002070' MOV (SP)+,@KISA6 ;; Restore mapping 1100 1101 .ENDC ; DF X$$HDR 1102 1103 002762 016101 000002 190$: MOV U.RED(R1),R1 ;; Follow redirect chain 1104 002766 026101 000002 CMP U.RED(R1),R1 ;; End of chain? 1105 002772 001373 BNE 190$ ;; If ne no 1106 002774 010164 000000 MOV R1,X.UCB(R4) ;; Store UCB address in control block 1107 1108 003000 032767 000040 002152' BIT #FL.INC,CSIMSK ;; Increment volume transaction? 1109 003006 001404 BEQ 200$ ;; If eq no AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-13 ** GETFIL -- Access Next Container File 1110 003010 016100 000036 MOV U.VCB(R1),R0 ;; Get the Volume Control Block 1111 003014 005260 000000 INC V.TRCT(R0) ;; And increment the count 1112 1113 003020 000207 200$: RETURN ;; Return to user state at 210$ 1114 1115 003022 005000 210$: CLR R0 ; Preset flag word 1116 003024 016701 002152' MOV CSIMSK,R1 ; Get the switch mask word 1117 003030 032701 000010 BIT #FL.LCK,R1 ; Have we set the lock bit? 1118 003034 001402 BEQ 220$ ; If eq no 1119 003036 052700 000001 BIS #XF.LCK,R0 ; Set the bit 1120 003042 032701 000040 220$: BIT #FL.INC,R1 ; Have we incremented the transaction count? 1121 003046 001402 BEQ 230$ ; If eq no 1122 003050 052700 000002 BIS #XF.TRN,R0 ; Set the bit 1123 003054 032701 000004 230$: BIT #FL.RON,R1 ; Is the file readonly? 1124 003060 001402 BEQ 240$ ; If eq no 1125 003062 052700 000004 BIS #XF.RON,R0 ; Set the bit 1126 003066 010064 000002 240$: MOV R0,X.FLAG(R4) ; Store the flags word 1127 1128 003072 005267 002210' INC NUMFIL ; Bump the number of active files 1129 003076 062704 000026 ADD #X.LEN,R4 ; Bump to the next container block 1130 003102 010467 002206' MOV R4,CURBLK ; And store the pointer 1131 003106 000241 CLC ; Indicate success 1132 003110 000403 BR 260$ ; And return 1133 1134 003112 250$: CALL PRTERR ; Print an error message 1135 003116 000261 SEC ; Indicate failure 1136 003120 000207 260$: RETURN ; Return to caller 1137 1138 .SBTTL ** CREBLK -- Create Secondary Block Structure 1139 ;+ 1140 ; CREBLK - Create the secondary pool control block, and finish creation of 1141 ; the virtual unit. 1142 ; 1143 ; CREBLK performs the following: 1144 ; 1145 ; Allocates secondary pool space and copies the local secondary 1146 ; control block into secondary pool. 1147 ; 1148 ; Calculates the total size of the virtual device and stores 1149 ; these values in the UCB 1150 ; 1151 ; Establishes final links and bitmasks to set the unit online. 1152 ; 1153 ; If carry is set upon return, then insufficient secondary pool was 1154 ; available to create the secondary control block. 1155 ; 1156 ;- 1157 1158 003122 CREBLK:: 1159 003122 005067 002150' CLR ERRFLG ; Assume no errors 1160 1161 003126 CALL $SWSTK,100$ ; Go on the system stack 1162 1163 003132 016705 002134' MOV NEWUCB,R5 ;; Get address of virtual UCB 1164 003136 016701 002210' MOV NUMFIL,R1 ;; Get number of container files 1165 003142 110165 000047 MOVB R1,U.XFIL(R5) ;; Store number in the UCB 1166 003146 070127 000026 MUL #X.LEN,R1 ;; Calculate number of bytes needed AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-14 ** CREBLK -- Create Secondary Block Structure 1167 003152 010103 MOV R1,R3 ;; Save for later use 1168 003154 072127 177772 ASH #-6,R1 ;; Convert to 32 word blocks 1169 003160 032703 000077 BIT #77,R3 ;; Do we need an extra block? 1170 003164 001401 BEQ 10$ ;; No, we're OK 1171 003166 005201 INC R1 ;; Allocate one more block 1172 1173 003170 10$: CALL @ALSEC ;; Allocate secondary block 1174 003174 103426 BCS 95$ ;; If carry set, insufficient pool 1175 1176 003176 010065 000052 MOV R0,U.CTLP(R5) ;; Save address of control block 1177 003202 017746 002070' MOV @KISA6,-(SP) ;; Save APR 1178 003206 010077 002070' MOV R0,@KISA6 ;; Map the control block 1179 003212 012700 140000 MOV #140000,R0 ;; Load displacement 1180 003216 012701 002212' MOV #SECBLK,R1 ;; Point to local copy of secondary block 1181 003222 006203 ASR R3 ;; Calculate number of words to move 1182 003224 012120 20$: MOV (R1)+,(R0)+ ;; Copy into secondary pool 1183 003226 077302 SOB R3,20$ ;; Loop until finished 1184 003230 012677 002070' MOV (SP)+,@KISA6 ;; Restore APR 1185 1186 003234 016765 002202' 000012 MOV BASLBN,U.CW2(R5) ;; Store high order disk size 1187 003242 016765 002204' 000014 MOV BASLBN+2,U.CW3(R5) ;; Store low order 1188 003250 000403 BR 99$ ;; All done! 1189 1190 003252 012767 000000G 002150' 95$: MOV #ER$UPS,ERRFLG ;; Store error code 1191 003260 000207 99$: RETURN ;; Return to user state 1192 1193 003262 000241 100$: CLC ; Assume no problems 1194 003264 016704 002150' MOV ERRFLG,R4 ; Any errors? 1195 003270 001403 BEQ 120$ ; If eq no 1196 003272 CALL PRTERR ; Print error message 1197 003276 000261 SEC ; Indicate failure 1198 003300 000207 120$: RETURN ; Return to caller 1199 1200 .SBTTL ** ONLINE -- Bring New Device Online 1201 ;+ 1202 ; 1203 ; ONLINE -- Bring New Device Online, per User Request 1204 ; 1205 ; Inputs: DVNAM and DVUNT are used to generate the device name 1206 ; Outputs: None. 1207 ; 1208 ; The Online Reconfiguration Task, HRC, is notified that a new device 1209 ; database exists in the system. 1210 ; 1211 ; The CON command is spawned with an ONLINE command to bring the new 1212 ; device online. If this fails, then we manually place the device by 1213 ; allocating (if necessary) and initializing a UCB extension and clearing 1214 ; the US.OFL bit in the UCB. 1215 ; 1216 ;- 1217 1218 003302 ONLINE:: 1219 1220 ; NOTE WELL!!! 1221 ; 1222 ; The following code may require changes if the RD:/HRC interface 1223 ; changes substantially. If it does, one should be able to revive AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-15 ** ONLINE -- Bring New Device Online 1224 ; the code by building AVF against OLR.OLB to bring in the HRCIN 1225 ; module, and using the following code: 1226 ; 1227 ; MOV #FILLUN,R0 ; Get LUN to use for RD: 1228 ; CALL $HRCIN ; Tell HRC about the new device 1229 ; 1230 ; End of optional code. The following code replaces the call to $HRCIN 1231 ; 1232 003302 ALUN$S #FILLUN,#"RD,#0 ; Assing to RD0: 1233 003322 103531 BCS 40$ ; Print error on failure 1234 1235 003324 F11QIO HRCDPB,40$ ; Request HRC to reinitialize 1236 ; 1237 ; ** End of possibly future incompatible code ** 1238 ; 1239 003344 032767 000200 002152' BIT #FL.ONL,CSIMSK ; Bring the new unit online? 1240 003352 001521 BEQ 60$ ; If eq no, return now 1241 003354 012700 003001' MOV #CONADD,R0 ; Get address for device string 1242 003360 116720 002142' MOVB DVNAM,(R0)+ ; Store device name 1243 003364 116720 002143' MOVB DVNAM+1,(R0)+ ; 1244 003370 016701 002144' MOV DVUNT,R1 ; Get unit number 1245 003374 005002 CLR R2 ; Suppress leading zeroes 1246 003376 CALL $CBOMG ; Convert binary to octal 1247 003402 112720 000072 MOVB #<':>,(R0)+ ; Finish with a colon 1248 003406 162700 002752' SUB #CONCMD,R0 ; Calculate length of the command 1249 003412 012701 000330' MOV #CONDPB,R1 ; Get the DPB 1250 003416 010061 000026 MOV R0,S.PWCL(R1) ; Store command length 1251 003422 DIR$ R1 ; Bring the device online 1252 003426 103411 BCS 10$ ; Branch on spawn error 1253 003430 STSE$S #EV.SPN ; Wait for command completion 1254 003442 022767 000001 002162' CMP #EX$SUC,ESB ; Did it work? 1255 003450 001462 BEQ 60$ ; If eq yes 1256 ; 1257 ; We could not bring the device online with CON, probably because the 1258 ; user is not privileged. At this point, handle the UCB extension and 1259 ; clear the US.OFL bit in the UCB. 1260 ; 1261 003452 10$: CALL $SWSTK,60$ ; Go on the system stack 1262 003456 016705 002134' MOV NEWUCB,R5 ;; Get the UCB address 1263 003462 005765 000032 TST U.UCBX(R5) ;; Do we already have a UCBX? 1264 003466 001043 BNE 30$ ;; If ne yes, one is enough 1265 1266 ; 1267 ; *** NOTE WELL! The following code must reside in APR 5 mapping! 1268 ; 1269 1270 003470 012701 000001 MOV #/100,R1 ;; Set number of secondary pool blocks 1271 003474 CALL @ALSEC ;; Allocate it 1272 003500 103436 BCS 30$ ;; If CC=1, no room for UCBX 1273 003502 017746 002070' MOV @KISA6,-(SP) ;; Save APR mapping 1274 003506 010077 002070' MOV R0,@KISA6 ;; Map to the UCBX 1275 003512 010065 000032 MOV R0,U.UCBX(R5) ;; And store in the UCB 1276 003516 012701 000036 MOV #X.LGTH/2,R1 ;; Get length in words 1277 003522 012700 140000 MOV #140000,R0 ;; Get displacement into the block 1278 003526 010002 MOV R0,R2 ;; Save it 1279 003530 005020 20$: CLR (R0)+ ;; Clear the UCBX 1280 003532 077102 SOB R1,20$ ;; Loop until done AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-16 ** ONLINE -- Bring New Device Online 1281 003534 112762 000005 000033 MOVB #X.DFHL,X.ERHL(R2) ;; Initialize hard error limit 1282 003542 112762 000010 000032 MOVB #X.DFSL,X.ERSL(R2) ;; Initialize soft error limit 1283 003550 112762 000012 000051 MOVB #X.DFFL,X.FLIM(R2) ;; Initialize fairness count 1284 003556 012762 102573 000022 MOV #<^RUNK>,X.NAME(R2) ;; Set unknown drive name 1285 003564 012762 053600 000024 MOV #<^RN >,X.NAME+2(R2) ;; ... 1286 003572 012677 002070' MOV (SP)+,@KISA6 ;; Restore previous mapping 1287 1288 003576 142765 000001 000007 30$: BICB #US.OFL,U.ST2(R5) ;; Set the device online 1289 003604 000207 RETURN ;; Back to user state and return 1290 1291 003606 012704 000000G 40$: MOV #ER$HRC,R4 ; Get error code...HRC not alive 1292 003612 50$: CALL PRTWAR ; Print the warning 1293 003616 000207 60$: RETURN ; Return to caller 1294 1295 .SBTTL ** DETACH -- Detach from the Virtual Device 1296 ;+ 1297 ; 1298 ; DETACH -- Detach from the Virtual Device 1299 ; 1300 ; Inputs: None 1301 ; Outputs: None 1302 ; 1303 ;- 1304 1305 003620 DETACH:: 1306 003620 016705 002134' MOV NEWUCB,R5 ; Get the UCB address 1307 1308 003624 CALL $SWSTK,10$ ; Go on the system stack 1309 1310 003630 026567 000022 002154' CMP U.ATT(R5),OURTCB ;; We are still attached, aren't we? 1311 003636 001005 BNE 10$ ;; No? Ask no questions, hear no lies 1312 003640 005065 000022 CLR U.ATT(R5) ;; Release the device 1313 003644 005001 CLR R1 ;; No I/O packet 1314 003646 CALL @DRQRQ ;; Kick the driver in case someone is waiting 1315 1316 003652 000207 10$: RETURN ;; Return to user state and to caller 1317 1318 1319 .SBTTL ** DEADEV -- Deallocate New Virtual Device Database 1320 ;+ 1321 ; 1322 ; DEADEV -- Deallocate newly created virtual device data structure 1323 ; 1324 ; This routine is called when an error occurs subsequent to the device 1325 ; creation which forces us to deallocate the data structure 1326 ; 1327 ; Inputs: None 1328 ; Outputs: None 1329 ;- 1330 1331 003654 DEADEV:: 1332 003654 005767 002132' TST NEWFLG ; New device created? 1333 003660 001440 BEQ 50$ ; If eq no - don't delete 1334 1335 003662 CALL $SWSTK,50$ ; Go on the system stack 1336 ; 1337 ; Scan the device list for our database AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-17 ** DEADEV -- Deallocate New Virtual Device Database 1338 ; 1339 003666 016700 002056' MOV DEVHD,R0 ;; Get address of device listhead 1340 003672 010001 10$: MOV R0,R1 ;; Make current one the previous 1341 003674 011100 MOV (R1),R0 ;; Get next device 1342 003676 001001 BNE 20$ ;; Proceed 1343 003700 000003 BPT ;; Could not find it? That's fatal! 1344 003702 020067 002140' 20$: CMP R0,NEWDCB ;; Is this the device? 1345 003706 001371 BNE 10$ ;; If ne no, keep looking 1346 ; 1347 ; Unlink from the device list 1348 ; 1349 003710 011011 MOV (R0),(R1) ;; Unlink our DCB from the list 1350 ; 1351 ; Unlink from the virtual device list that begins with VF0: 1352 ; 1353 003712 016001 000000G MOV D.UCB(R0),R1 ;; Get new UCB address 1354 003716 016702 002136' MOV VFDCB,R2 ;; Get VF0: DCB address 1355 003722 016202 000000G MOV D.UCB(R2),R2 ;; Get its UCB address 1356 003726 026201 000072 30$: CMP U.VLNK(R2),R1 ;; Found the virtual link to this device? 1357 003732 001404 BEQ 40$ ;; If eq then we have 1358 003734 016202 000072 MOV U.VLNK(R2),R2 ;; Get next virtual UCB 1359 003740 001372 BNE 30$ ;; Keep looking 1360 003742 000003 BPT ;; Virtual link not found? That's fatal! 1361 1362 003744 016162 000072 000072 40$: MOV U.VLNK(R1),U.VLNK(R2) ;; Unlink us from the list 1363 ; 1364 ; Deallocate the data structure 1365 ; 1366 003752 012701 000000G MOV #$VFSIZ,R1 ;; Get size of the database 1367 003756 CALL @DEACB ;; And deallocate the data structure 1368 003762 000207 50$: RETURN ;; Return to user state and to caller 1369 1370 .SBTTL ** DEAFIL -- Deaccess Container Files 1371 ;+ 1372 ; DEAFIL -- Deaccess Container Files (Error Recovery) 1373 ; 1374 ; This routine is called when an error has occurred in the creation 1375 ; of the virtual unit. Any file which was accessed must be examined 1376 ; to undo the operation. This may involve: 1377 ; 1378 ; - Re-writing attributes to disable the deaccess lock bit 1379 ; - Decrementing the volume transaction count of the ACP 1380 ;- 1381 1382 003764 DEAFIL:: 1383 003764 012704 002212' MOV #SECBLK,R4 ; Point to secondary block area 1384 003770 005767 002210' TST NUMFIL ; Any files there to check? 1385 003774 001477 BEQ 100$ ; If eq no - all done 1386 1387 003776 016400 000002 10$: MOV X.FLAG(R4),R0 ; Get flags word for this container file 1388 004002 001466 BEQ 80$ ; Nothing to do -- get next one 1389 004004 016405 000000 MOV X.UCB(R4),R5 ; Get the UCB address of the device 1390 1391 004010 CALL $SWSTK,30$ ; Go on the system stack 1392 1393 .IF DF X$$HDR 1394 AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-18 ** DEAFIL -- Deaccess Container Files 1395 004014 017746 002070' MOV @KISA6,-(SP) ;; Save APR6 1396 004020 017777 002064' 002070' MOV @SAHDB,@KISA6 ;; Map external header 1397 004026 017701 002066' MOV @SAHPT,R1 ;; Point to the header 1398 1399 .IFF ; DF X$$HDR 1400 1401 MOV @HEADR,R1 ;; Point to task header 1402 1403 .IFTF ; DF X$$HDR 1404 1405 004032 010561 000106 MOV R5,H.LUN+<*4>(R1) ;; Assign to the device 1406 1407 .IFT ; DF X$$HDR 1408 1409 004036 012677 002070' MOV (SP)+,@KISA6 ;; Restore APR 6 1410 1411 .ENDC ; DF X$$HDR 1412 1413 004042 032700 000002 BIT #XF.TRN,R0 ;; Did we increment the volume transaction? 1414 004046 001404 BEQ 20$ ;; If eq no 1415 004050 016501 000036 MOV U.VCB(R5),R1 ;; Get Volume Control Block 1416 004054 005361 000000 DEC V.TRCT(R1) ;; Decrement transaction cout 1417 1418 004060 000207 20$: RETURN ;; Return to user state 1419 1420 004062 032700 000001 30$: BIT #XF.LCK,R0 ; Did we set the write lock bit? 1421 004066 001434 BEQ 80$ ; If eq no - don't touch the file 1422 004070 012701 001676' MOV #FILFDB+F.FNB+N.FID,R1 ; Point to file ID in filename block 1423 004074 016421 000020 MOV X.FID(R4),(R1)+ ; Copy the file ID 1424 004100 016421 000022 MOV X.FID+2(R4),(R1)+ 1425 004104 016411 000024 MOV X.FID+4(R4),(R1) 1426 004110 005067 001730' CLR FILFDB+F.FNB+N.DVNM ; Indicate the device is assigned 1427 004114 112767 000200 002050' MOVB #UC.CON,WATATT ; Remove deaccess lock bit (leave contig) 1428 004122 F11QIO WATDPB,70$ ; Write the attribute 1429 004142 000406 BR 80$ ; Get the next file 1430 1431 004144 010446 70$: MOV R4,-(SP) ; Save secondary block address 1432 004146 012704 000000G MOV #ER$RCE,R4 ; Get error code 1433 004152 CALL PRTWAR ; Print warning code 1434 004156 012604 MOV (SP)+,R4 ; Recover pointer 1435 1436 004160 005367 002210' 80$: DEC NUMFIL ; One less file to look at 1437 004164 001403 BEQ 100$ ; No more to look at 1438 004166 062704 000026 ADD #X.LEN,R4 ; Bump to the next container block 1439 004172 000701 BR 10$ ; And process it 1440 1441 004174 000207 100$: RETURN ; Return to caller 1442 1443 1444 .SBTTL ** PRTWAR/PRTERR -- Print error messages 1445 ;+ 1446 ; PRTERR -- Print error message and set error status for task 1447 ; PRTWAR -- Print error message and set warning status for task 1448 ; 1449 ; Input: R4 contains the index of the error message 1450 ;- 1451 AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-19 ** PRTWAR/PRTERR -- Print error messages 1452 004176 022767 000002 002110' PRTWAR::CMP #EX$ERR,EXISTS ; Already at error status? 1453 004204 001407 BEQ WARERR ; If eq yes, don't supercede 1454 004206 012767 000000 002110' MOV #EX$WAR,EXISTS ; Set exit status 1455 004214 000403 BR WARERR ; And proceed 1456 1457 004216 012767 000002 002110' PRTERR::MOV #EX$ERR,EXISTS ; Set exit status 1458 1459 004224 010046 WARERR: MOV R0,-(SP) ; Save a register 1460 004226 012700 000300' MOV #ERRDPB,R0 ; Point to the QIO DPB 1461 004232 012760 000000G 000014 MOV #TSKNAM,Q.IOPL(R0) ; Point to task name 1462 004240 012760 000000G 000016 MOV #TSKLEN,Q.IOPL+2(R0) ; Store length 1463 004246 012760 000044 000020 MOV #<'$>,Q.IOPL+4(R0) ; Store VFC 1464 004254 DIR$ R0 ; Write it out 1465 004260 006304 ASL R4 ; Make error code a word index 1466 004262 016460 177776G 000014 MOV ERRTAB-2(R4),Q.IOPL(R0) ; Store address of error string 1467 004270 016460 177776G 000016 MOV ERRLEN-2(R4),Q.IOPL+2(R0) ; Store length of error string 1468 004276 012760 000053 000020 MOV #<'+>,Q.IOPL+4(R0) ; Store VFC 1469 004304 DIR$ R0 ; Write it out 1470 004310 012600 MOV (SP)+,R0 ; Restore register 1471 004312 000207 RETURN ; Return to caller 1472 1473 000000' .END $AVF AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-20 Symbol table ACRCTL= 100000 C$$RSH= 177564 D$$PAR= 000000 FA.CRE= 000010 FL.RON= 000004 ACRDPB 000140R 002 C$$RUN= 000000 D$$SHF= 000000 FA.DLK= 001000 FL.VCP= 000002 ACWCTL= 100400 C.CMLD= 000002 D$$VMD= 000000 FA.ENB= 100000 FL.WPR= 000100 ACWDPB 000170R 002 C.DEVD= 000006 D$$V11= 000001 FA.EXC= 002000 FNADPB 000110R 002 ACWLST 002016R 002 C.DIRD= 000012 D$$WCK= 000000 FA.EXL= 004000 FO.APD= 000106 AC.DLK= 000002 C.DSDS= 000006 D$$YNC= 000000 FA.EXT= 000004 FO.MFY= 000002 AC.ENB= 000200 C.EXPS= 000060 D$$YNM= 000000 FA.LKL= 002000 FO.RD = 000001 AC.EXL= 000010 C.FILD= 000016 D.NAM = ****** GX FA.NSP= 000100 FO.UPD= 000006 AC.LCK= 000001 C.IDIA= 000036 D.PCB = ****** GX FA.POS= 010000 FO.WRT= 000016 AC.LKL= 000004 C.IDIL= 000034 D.UCB = ****** GX FA.RD = 000001 FT.ANI= 000001 AC.WCK= 000040 C.IDVA= 000032 D.UNIT= ****** GX FA.RWD= 004000 FT.BBF= 000002 ALOCB 002060R 002 C.IDVL= 000030 ENADPB 000030R 002 FA.SEQ= 040000 FT.MBF= 000004 ALSEC 002074R 002 C.MKW1= 000024 ERRDPB 000300R 002 FA.SHR= 000040 FX.DIR= 000004 AVFEX 000152RG 004 C.MKW2= 000026 ERRFLG 002150RG 002 FA.TMP= 000020 FX.DLN= 000003 A$$CHK= 000000 C.ODVL= 000040 ERRLEN= ****** GX FA.WCK= 020000 FX.DMX= 000002 A$$CLI= 000020 C.SIZE= 000054 ERRTAB= ****** GX FA.WRT= 000002 FX.LEN= 000000 A$$CNT= 000000 C.STAT= 000001 ER$ACC= ****** GX FC.CEF= 020000 F$$DVN= 000000 A$$CPS= 000000 C.SWAD= 000022 ER$ENT= ****** GX FC.DIR= 040000 F$$LPP= 000000 A$$NSI= 000000 C.TYPR= 000000 ER$FNF= ****** GX FC.FCO= 010000 F$$LVL= 000001 A$$PRI= 000000 DACDPB 000220R 002 ER$GCM= ****** GX FC.WAC= 100000 F$$MAP= 000000 A$$TRP= 000000 DEACB 002076R 002 ER$GIN= ****** GX FD.BLK= 000010 F$$NIM= 000000 BASLBN 002202RG 002 DEADEV 003654RG 004 ER$HRC= ****** GX FD.CCL= 000002 F.ACTL= 000076 BLKNUM 002126RG 002 DEAFIL 003764RG 004 ER$LOR= ****** GX FD.COM= 020000 F.ALOC= 000040 CHR$$ = 000116 DEFPRO= 176314 G ER$NAM= ****** GX FD.CR = 000002 F.BBFS= 000062 CH.AND= 000001 DELDPB 000060R 002 ER$NCT= ****** GX FD.DIR= 000010 F.BDB = 000070 CMDLUN= 000001 G DETACH 003620RG 004 ER$NDV= ****** GX FD.FTN= 000001 F.BGBC= 000057 CNT$$ = 000002 DEVGRP 002161RG 002 ER$NEQ= ****** GX FD.F11= 040000 F.BKDN= 000026 CONADD 003001R 002 DEVHD 002056R 002 ER$PAR= ****** GX FD.INS= 000010 F.BKDS= 000020 CONCMD 002752R 002 DRQRQ 002062R 002 ER$RCE= ****** GX FD.ISP= 002000 F.BKEF= 000050 CONDPB 000330R 002 DSCAN 001252RG 004 ER$SIZ= ****** GX FD.MNT= 100000 F.BKP1= 000051 CRDEV 001510RG 004 DSCBLK 001332R 002 ER$SYN= ****** GX FD.OSP= 004000 F.BKST= 000024 CREBLK 003122RG 004 DU$C0 = 000004 ER$TMF= ****** GX FD.PLC= 000004 F.BKVB= 000064 CREDPB 000000R 002 DU$R0 = 000004 ER$UPS= ****** GX FD.PRN= 000004 F.CHR = 000075 CRELST 001772R 002 DVBCK 002146RG 002 ESB 002162RG 002 FD.PSE= 010000 F.CNTG= 000034 CREVAL 001566R 002 DVNAM 002142RG 002 EV.QIO= 000001 G FD.RAH= 000001 F.DFNB= 000046 CSIBLK 001416R 002 DVUNT 002144RG 002 EV.SPN= 000002 G FD.RAN= 000002 F.DREF 000036 CSIMSK 002152RG 002 DV.CCL= 000002 EXISTS 002110RG 002 FD.REC= 000001 F.DRNM 000040 CSWDEF= 000250 DV.COM= 020000 EXTCTL= 102400 FD.RWM= 000001 F.DSPT= 000044 CSWNEW= 000001 DV.DIR= 000010 EX$ERR= 000002 FD.SDI= 000020 F.DVNM= 000134 CS.DIF= 000002 DV.EXT= 000400 EX$SEV= 000004 FD.SQD= 000040 F.EFBK= 000010 CS.DVF= 000004 DV.F11= 040000 EX$SUC= 000001 FD.TTY= 000004 F.EFN = 000050 CS.EQU= 000040 DV.ISP= 002000 EX$WAR= 000000 FD.WBH= 000002 F.EOBB= 000032 CS.INP= 000001 DV.MBC= 000400 EX.AC1= 000001 FF.CHR= 000005 F.ERR = 000052 CS.LOG= 000100 DV.MNT= 100000 EX.AC2= 000002 FF.NV = 000003 F.EXT = 000072 CS.MOR= 000020 DV.MSD= 000100 EX.ADF= 000010 FF.POE= 000002 F.FACC= 000043 CS.NMF= 000001 DV.OSP= 004000 EX.ALL= 000020 FF.RWD= 000001 F.FEXT 000042 CS.OUT= 000002 DV.PSE= 010000 EX.ENA= 000200 FF.RWF= 000006 F.FFBY= 000014 CS.WLD= 000010 DV.REC= 000001 EX.FCO= 000004 FF.SPC= 000004 F.FLG = 000074 CURBLK 002206RG 002 DV.SDI= 000020 E$$DVC= 000000 FILDFB 001734R 002 F.FNAM= 000110 C$$CDA= 000000 DV.SQD= 000040 E$$ICM= 000000 FILFDB 001574R 002 F.FNB = 000102 C$$CKP= 000000 DV.SWL= 001000 E$$LOG= 000000 FILLUN= 000003 G F.FNUM 000002 C$$CTC= 000000 DV.TTY= 000004 E$$MOU= 000000 FL.AEX= 000001 F.FOWN 000010 C$$DFB= 000000 DV.UMD= 000200 E$$NSI= 000000 FL.CRE= 000001 F.FPRO 000012 C$$INT= 000000 D$$CHE= 000000 E$$PER= 000000 FL.HLP= 000002 F.FSEQ 000004 C$$ODB= 000000 D$$IAG= 000000 E$$SEF= 000000 FL.INC= 000040 F.FSQN 000007 C$$ORE= 001000 D$$ISK= 000000 E$$XPR= 000000 FL.LCK= 000010 F.FTYP= 000116 C$$PCR= 000000 D$$L11= 000001 FA.APD= 000100 FL.ONL= 000200 F.FVBN 000044 AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-21 Symbol table F.FVER= 000120 GI.DVJ= 000022 H$$FMS= 000004 I.EXDT= 000010 M.TYPE 000002 F.HDLB 000016 GI.FMK= 000003 H$$FMX= 000002 I.FHDR= 000012 NB.ANS= 002000 F.HIBK= 000004 GI.GAS= 000000 H$$RTZ= 000062 I.FNAM= 000005 NB.DEV= 000200 F.LBN 000022 GI.MSD= 000020 H.CSP 000000 I.FTYP= 000006 NB.DIR= 000100 F.LGTH 000054 GI.QMC= 000004 H.CUIC 000010 I.FVER= 000007 NB.NAM= 000004 F.LINK 000000 GI.REN= 000010 H.DMAP 000005 I.PLCM= 000014 NB.SD1= 000400 F.LKL 000050 GI.SPM= 000013 H.DSW 000046 I.RVNO= 000013 NB.SD2= 001000 F.LUN = 000042 GI.SPR= 000007 H.DUIC 000012 I.STAT= 000011 NB.SNM= 000040 F.MBCT= 000054 GI.SSN= 000015 H.EFSV 000040 KISAR6= ****** GX NB.STP= 000020 F.MBC1= 000055 GI.TSK= 000012 H.FCS 000050 KISA6 002070R 002 NB.SUP= 020000 F.MBFG= 000056 GI.UAB= 000005 H.FMAP 000006 K$$CNT= 177546 NB.SVR= 000010 F.NACS 000032 GI.UIC= 000001 H.FORT 000052 K$$CSR= 177546 NB.TYP= 000002 F.NLCK 000033 GI.UPD= 000021 H.FOWN= 000001 K$$DAS= 000000 NB.VER= 000001 F.NRBD= 000024 GI.VEC= 000017 H.FPRO= 000002 K$$IEN= 000115 NB.WCH= 004000 F.NREC= 000030 G$$DVI= 000003 H.FPSA 000042 K$$LDC= 000001 NB.WLV= 010000 F.NWAC 000034 G$$GEF= 000000 H.FPSL= 000062 K$$TPS= 000062 NEWDCB 002140RG 002 F.OVBS= 000030 G$$TPP= 000000 H.FPVA 000034 LD$CO = 000000 NEWFLG 002132RG 002 F.RACC= 000016 G$$TSS= 000000 H.GARD 000072 LD$DU = 000000 NEWUCB 002134RG 002 F.RATT= 000001 G$$TTK= 000000 H.HDLN 000002 LD$MU = 000000 NUMFIL 002210RG 002 F.RCNM= 000034 G.CMLD= 000146 H.IPC 000016 LD$NL = 000000 NXTFIL 000042RG 004 F.RCTL= 000017 G.DPRM= 000160 H.IPS 000014 LD$RD = 000000 N$$DIR= 000000 F.RSIZ= 000002 G.ERR = 000140 H.ISP 000020 LD$TT = 000000 N$$LDV= 000001 F.RTYP= 000000 G.INSF= 000002 H.LUN 000076 LD$VF = 000000 N$$MOV= 000041 F.SCHA 000015 G.IP01= 000004 H.LUTE 000070 LD$VT = 000000 N$$UMR= 000030 F.SEQN= 000100 G.IP02= 000006 H.NLUN 000074 LK.SPN= 000002 N.ANM1= 000002 F.SIZE 000026 G.IP03= 000010 H.NML 000061 LK.WAT= 000010 N.ANM2= 000024 F.SPDV= 000072 G.IP04= 000012 H.ODVA 000022 L$$ASG= 000000 N.DID = 000024 F.SPUN= 000074 G.IP05= 000014 H.ODVL 000024 L$$DRV= 000000 N.DVNM= 000032 F.STAT 000034 G.IP06= 000016 H.OVLY 000054 L$$GCL= 000000 N.FID = 000000 F.STBK= 000036 G.IP07= 000020 H.PFVA 000032 L$$LDR= 000000 N.FNAM= 000006 F.UCHA 000014 G.IP08= 000022 H.RCVA 000036 L$$NAM= 000000 N.FTYP= 000014 F.UNIT= 000136 G.IP09= 000024 H.RRVA 000062 L$$50H= 000000 N.FVER= 000016 F.URBD= 000020 G.ISIZ= 000020 H.SMAP 000004 L.CNT 000005 N.NEXT= 000022 F.VBN = 000064 G.LPDL= 000100 H.SPRI 000060 L.LKSZ 000010 N.STAT= 000020 F.VBSZ= 000060 G.MODE= 000141 H.TKVA 000026 L.LNK 000000 N.UNIT= 000034 F.WIN 000052 G.PSDS= 000142 H.TKVL 000030 L.VB1 000004 ONLINE 003302RG 004 GCML 000400R 002 G.RBUF= 000156 H.UCHA= 000003 L.WI1 000002 OURTCB 002154RG 002 GETCMD 000430RG 004 G.SIZE= 000224 H.VEXT 000056 MAXCMD= 000377 OUTSWI 001472R 002 GETDEV 000554R 004 G.TSDU= 000036 H.WND 000044 MAXDEP= 000003 O$$LAP= 000000 GETFIL 001764RG 004 G.TSFW= 000024 H.X25 000064 MT.MLS= 000001 PAR$$$= 000027 GE.BIF= 177775 G.TSGC= 000017 INPSWI 001524R 002 MU$C0 = 000004 PRMSTL= ****** GX GE.CLO= 000004 G.TSMT= 000022 IOSTAT 002112RG 002 MU$R0 = 000004 PRMSTR= ****** GX GE.COM= 000001 G.TSNL= 000020 IO.ACR= ****** GX MX$FIL= 000020 PROATT 002014R 002 GE.CON= 000020 G.TSPC= 000016 IO.ACW= ****** GX M$$CRB= 000124 PROUIC 002160RG 002 GE.EOF= 177766 G.TSPN= 000004 IO.CRE= ****** GX M$$CRX= 000000 PRTERR 004216RG 004 GE.IND= 000002 G.TSPR= 000014 IO.DAC= ****** GX M$$EXT= 000000 PRTWAR 004176RG 004 GE.IOR= 177777 G.TSRN= 000010 IO.DEL= ****** GX M$$FCS= 000000 PRVDPB 000362R 002 GE.LC = 000010 G.TSSY= 000034 IO.ENA= ****** GX M$$MGE= 000000 PSINIT 000324RG 004 GE.MDE= 177774 G.TSTN= 000000 IO.FNA= ****** GX M$$MUP= 000000 P$$BPR= 000063 GE.OPR= 177776 G.TSTS= 000032 IO.WAT= ****** GX M$$NET= 002627 P$$CTL= 000000 GE.RBG= 177730 G.TSVA= 000026 IO.WVB= ****** GX M$$OVR= 000000 P$$D70= 000000 GE.SIZ= 000040 G.TSVL= 000030 IS.SUC= ****** GX M$$XLN= 000400 P$$FRS= 000310 GI.ABO= 000016 HEADR 002072R 002 I$$CSZ= 000200 M.ACC 000003 P$$GMX= 000000 GI.APR= 000011 HLPLEN= ****** GX I$$PFS= 000000 M.DEV 000004 P$$HIL= 003100 GI.CFG= 000014 HLPMSG= ****** GX I$$P11= 000000 M.LEN 000010 P$$LAS= 000000 GI.DEF= 000002 HRCDPB= ****** GX I$$RAR= 000000 M.LNK 000000 P$$LOL= 001130 GI.DEV= 000006 H$$FME= 000020 I$$RDN= 000000 M.TI 000006 P$$MAX= 000400 AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-22 Symbol table P$$MON= 000000 S$$NM2= 046530 TS.CIP= 010000 T.ST2 000034 UD.UNS= 000000 P$$OFF= 000000 S$$NM3= 046120 TS.CKR= 000100 T.ST3 000036 UD.160= 000004 P$$OOL= 000000 S$$OPT= 000000 TS.EXE= 100000 T.ST4 000060 UD.200= 000001 P$$P45= 000000 S$$WPC= 000036 TS.MSG= 020000 T.TCBL 000030 UD.556= 000002 P$$RFL= 000000 S$$WPR= 000005 TS.RDN= 040000 T.TIO 000065 UD.625= 000005 P$$RTY= 000000 S$$WRG= 000000 TS.RSW= 002000 T.TKSZ 000072 UD.8K = 000006 P$$SRF= 000000 S$$WST= 000000 TS.RUN= 004000 T.UCB 000026 UD.800= 000003 P$$WND= 000000 S$$YSZ= 020000 TS.STP= 001000 T2.ABO= 000100 UM.CLI= 000036 Q$$MGR= 000000 S.ANM1= 000014 TTYLUN= 000002 G T2.AFF= 000400 UM.CMD= 002000 Q$$OPT= 000005 S.ANM2= 000005 T$$ACD= 000000 T2.AST= 100000 UM.CNT= 001000 Q.IOAE= 000012 S.BFHD= 000020 T$$BTW= 000000 T2.CHK= 020000 UM.DSB= 000200 Q.IOEF= 000006 S.FATT= 000016 T$$CCA= 000000 T2.DST= 040000 UM.KIL= 010000 Q.IOFN= 000002 S.FDB = 000140 T$$COM= 000000 T2.HLT= 000200 UM.NBR= 000400 Q.IOLU= 000004 S.FNAM= 000006 T$$CON= 000000 T2.REX= 010000 UM.OVR= 000001 Q.IOPL= 000014 S.FNB = 000036 T$$CTR= 000000 T2.SEF= 004000 UM.SER= 004000 Q.IOPR= 000007 S.FNBW= 000017 T$$CUP= 000000 T2.SIO= 001000 UNDO 000116RG 004 Q.IOSB= 000010 S.FNTY= 000004 T$$EIO= 000000 T2.SPN= 000004 US.ABO= 000001 RESTRT 000006R 004 S.FTYP= 000002 T$$ESC= 000000 T2.STP= 000020 US.BSY= 000200 RX$IAS= 000003 S.LHD = ****** GX T$$GMC= 000000 T2.WFR= 000001 US.CRW= 000004 RX$11D= 000000 S.NFEN= 000020 T$$GTS= 000000 T3.ACP= 100000 US.DSB= 000002 RX$11M= 000001 S.PKT = ****** GX T$$KMG= 000000 T3.CAL= 000100 US.FOR= 000040 RX$11S= 000002 S.PWCA= 000024 T$$LTH= 000000 T3.CLI= 001000 US.FRK= 000002 R$$CON= 000000 S.PWCL= 000026 T$$LWC= 000000 T3.CMD= 000004 US.LAB= 000004 R$$DSP= 000000 S.PWDN= 000032 T$$OVL= 000000 T3.GFL= 000001 US.MDE= 000002 R$$EIS= 000000 S.PWEA= 000020 T$$RED= 000000 T3.MCR= 004000 US.MDM= 000020 R$$EXV= 000000 S.PWEF= 000016 T$$RNE= 000000 T3.MPC= 000010 US.MNT= 000100 R$$FEA= 000000 S.PWES= 000022 T$$RPR= 000000 T3.NET= 000020 US.MUN= 000040 R$$GIN= 000000 S.PWTN= 000002 T$$RST= 000000 T3.NSD= 000200 US.OFL= 000001 R$$IIC= 000000 S.PWUG= 000015 T$$RUB= 000000 T3.PMD= 040000 US.OIU= 000001 R$$LKL= 000001 S.PWUM= 000014 T$$SMC= 000000 T3.PRV= 010000 US.PDF= 000020 R$$MPL= 000000 S.PWVT= 000030 T$$TSA= 000000 T3.REM= 020000 US.PUB= 000004 R$$MYA= 000001 S.PWXX= 000006 T$$UMR= 000000 T3.ROV= 000040 US.PWF= 000010 R$$NDC= 000006 S.STBK= 000012 T$$USP= 000000 T3.RST= 000400 US.RED= 000002 R$$NDH= 000226 S.STS = ****** GX T$$UTO= 000036 T3.SLV= 002000 US.SHR= 000001 R$$NDL= 000001 TIUCB 002156RG 002 T.ACTL 000052 T3.SWS= 000002 US.SIO= 000200 R$$SND= 000000 TKINIT 000164RG 004 T.ASTL 000016 T4.CTC= 000100 US.SPU= 000002 R$$TPR= 031470 TKTCB 002100R 002 T.ATT 000054 T4.DFB= 000400 US.TRN= 000100 R$$UDA= 000001 TR.CPA= 000001 T.DPRI 000040 T4.DSP= 000002 US.UMD= 000010 R$$11M= 000000 TR.CPB= 000002 T.EFLG 000022 T4.FMP= 000200 US.VV = 000001 R.FIX = 000001 TR.CPC= 000004 T.EFLM 000066 T4.LBW= 001000 US.WCK= 000010 R.SEQ = 000003 TR.CPD= 000010 T.GGF 000064 T4.LDD= 000020 UU.ABO= 000400 R.STM = 000004 TR.UBE= 000020 T.HDLN 000062 T4.LRW= 002000 UU.ATN= 000100 R.VAR = 000002 TR.UBF= 000040 T.IID = 000042 T4.MUT= 000040 UU.AVN= 000004 SAHDB 002064R 002 TR.UBH= 000100 T.IOC 000003 T4.PRO= 000010 UU.BLK= 004000 SAHPT 002066R 002 TR.UBJ= 000200 T.LBN 000041 T4.PRV= 000004 UU.GUS= 000010 SECBLK 002212RG 002 TR.UBK= 000400 T.LDV 000044 T4.P0 = 004000 UU.IOS= 002000 SIZ$$ = 000002 TR.UBL= 001000 T.LNK 000000 T4.RIN= 010000 UU.ONL= 000020 SP.WX8= 004000 TR.UBM= 002000 T.MXSZ 000050 T4.SNC= 000001 UU.RCT= 000002 STAATT 002030R 002 TR.UBN= 004000 T.NAM 000006 UC.ALG= 000200 UU.RDY= 000200 STRING 002116RG 002 TR.UBP= 010000 T.OFF 000074 UC.ATT= 000010 UU.SER= 000001 S$$ECC= 000000 TR.UBR= 020000 T.PCB 000046 UC.CON= 000200 UU.SIO= 001000 S$$EXC= 000000 TR.UBS= 040000 T.PCBV 000004 UC.DLK= 000100 UU.SPC= 000040 S$$HDW= 000000 TR.UBT= 100000 T.PRI 000002 UC.KIL= 000004 U$$DAS= 000000 S$$HFC= 000036 TSKLEN= ****** GX T.RCVL 000012 UC.LGH= 000003 U$$MHI= 000000 S$$LIB= 000000 TSKNAM= ****** GX T.RRFL 000100 UC.NPR= 000100 U$$MLO= 140000 S$$MAP= 000000 TS.BLC= 000037 T.SRCT 000077 UC.PWF= 000020 U$$MRN= 170230 S$$NM1= 051522 TS.BLK= 177777 T.STAT 000032 UC.QUE= 000040 U$$UMD= 000000 AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-23 Symbol table U$$UMR= 000000 U2.DJ1= 040000 V.IBSZ 000033 XC.DIR= 000020 X.UCB 000000 U.AAST 000034 U2.DZ1= 000100 V.IFWI 000024 XC.ENA= 000200 X.UHVR 000037 U.ACP = 000034 U2.ESC= 001000 V.LABL 000004 XC.LOG= 000002 X.UNFL 000002 U.ATT 000022 U2.HFF= 010000 V.LGTH 000076 XC.OVR= 000010 X.UNIT 000054 U.BPKT= 000050 U2.HLD= 000040 V.LRUC 000057 XC.RDA= 000001 X.UNSZ 000044 U.BUF 000024 U2.LOG= 000400 V.PKSR 000020 XF.LCK= 000001 X.UNTI 000010 U.CBF = 000032 U2.LWC= 000001 V.SBCL 000041 XF.RON= 000004 X.USVR 000036 U.CNT 000030 U2.L3S= 000004 V.SBLB 000044 XF.TRN= 000002 X.VSER 000050 U.COTQ 000030 U2.L8S= 010000 V.SBSZ 000042 XF.WPR= 000001 X.WCNT 000036 U.CTCB 000026 U2.NEC= 004000 V.SLEN 000024 XX.DAT= 000005 X.XDAT 000066 U.CTL 000004 U2.PRV= 000010 V.STS 000062 XX.DIR= 000001 X.XDIR 000070 U.CTLP 000052 U2.RMT= 020000 V.TRCT 000000 XX.LOG= 000001 X.XLOG 000071 U.CW1 000010 U2.R04= 100000 V.TYPE 000002 XX.MAX= 000177 X.XOVR 000072 U.CW2 000012 U2.SLV= 000200 V.VCHA 000003 XX.OVR= 000004 X.XRDA 000067 U.CW3 000014 U2.VT5= 000002 V.VOWN 000050 XX.RDA= 000005 X2.DEA= 000001 U.CW4 000016 U2.7CH= 010000 V.VPRO 000052 X$$HDR= 000000 $ALOCB= ****** GX U.DCB 000000 U3.DBF= 000002 V.WISZ 000040 X$$SEC= 000000 $ALSEC= ****** GX U.FCDE= 000042 U3.FDX= 000001 WARERR 004224R 004 X.BASE 000014 $AVF 000000RG 004 U.IAST 000030 U3.OPA= 100000 WATATT 002050R 002 X.CCED 000062 $CBOMG= ****** GX U.ICSR= 000046 U3.PAR= 040000 WATDPB 000250R 002 X.CCYL 000046 $COTB = ****** GX U.IOSB 000056 U3.RPR= 000004 WATLST 002042R 002 X.CPCB 000056 $C5TA = ****** GX U.ISB2 000070 U3.UPC= 020000 WB.BPS= 000040 X.CSBA 000060 $DEACB= ****** GX U.KRB1= 000044 U4.CR = 000100 WB.NBP= 000020 X.CSTS 000055 $DEVHD= ****** GX U.LUIC 177774 VC.DEA= 000004 WI.DLK= 010000 X.CST2 000073 $DRQRQ= ****** GX U.MEDI= 000050 VC.DUP= 000020 WI.EXL= 040000 X.CYL 000034 $HEADR= ****** GX U.MUP 177772 VC.HLK= 000002 WI.EXT= 002000 X.CYLC 000042 $SAHDB= ****** GX U.OAST 000032 VC.PUB= 000010 WI.LCK= 004000 X.DFFL= 000012 $SAHPT= ****** GX U.OCNT 000006 VC.SIL= 000040 WI.PND= 020000 X.DFHL= 000005 $TKTCB= ****** GX U.OWN 177776 VC.SLK= 000001 WI.RDV= 000400 X.DFSL= 000010 $VFSIZ= ****** GX U.PRM = 000042 VDLUN = 000004 G WI.WCK= 100000 X.DNAM 000052 $VFSOF= ****** GX U.PTCB 000040 VECBUF 002054R 002 WI.WRV= 001000 X.DSKD 000051 $VFUOF= ****** GX U.RED 000002 VECDPB 000370R 002 WS.MDL= 000001 X.DUSZ= 000054 $$ = 000001 U.RED2 000034 VECSIZ= 000016 W.ACT 000000 X.ERHC 000035 $$$ = 000560R 002 U.RPKT 000024 VFDCB 002136RG 002 W.BATT 000006 X.ERHL 000033 $$$ARG= 000006 U.SCB 000020 VS.BMW= 000002 W.BFPD 000014 X.ERSC 000034 $$$I = 000000 U.SLT = 000050 VS.IFW= 000001 W.BHVR 000004 X.ERSL 000032 $$$N = 000003 U.SNUM= 000040 VT.ANS= 000010 W.BLGH 000020 X.FCUR 000050 $$$OST= 000005 U.SPRM= 000052 VT.FOR= 000000 W.BLKS 000000 X.FID 000020 $$$T1 = 000006 U.STS 000005 VT.SL1= 000001 W.BLPD 000016 X.FLAG 000002 .CSI1 = ****** G U.ST2 000007 VT.SL2= 000002 W.BLVR 000002 X.FLIM 000051 .CSI4 = ****** G U.UCBX= 000032 VT.UNL= 000011 W.BNPD 000015 X.GRP 000032 .DD2CT= ****** GX U.UC2X= 000054 V$$CTR= 001000 W.BOFF 000012 X.IOC 000026 .FINIT= ****** G U.UFAT= 000004 V$$TLD= 000170 W.BPCB 000000 X.LEN = 000026 .FSRCB= ****** G U.UMB = 000040 V$$TLM= 000270 W.BSIZ 000010 X.LGTH= 000074 .FSR5 = ****** GX U.UNIT 000006 V$$TRM= 000000 W.CTL 000000 X.MEDI 000020 .GCML1= ****** G U.UTIL= 000046 V.EXT 000064 W.FCB 000004 X.MLUN 000000 .GCML2= ****** G U.VCB = 000036 V.FCB 000026 W.IOC 000002 X.NAME 000022 .PARSE= ****** GX U.VLNK 000072 V.FFNU 000063 W.LKL 000012 X.OFF 000010 .S.LHD 002102R 002 U.WPKT 000026 V.FIEX 000045 W.STS 000003 X.RBNS 000042 .S.PKT 002106R 002 U.XFIL 000047 V.FMAX 000036 W.TCB 000006 X.RCTC 000043 .S.STS 002104R 002 U.XFLG 000046 V.FPRO 000054 W.UCB 000010 X.RCTS 000040 ...GBL= 000000 U.XGRP 000050 V.FRBK 000056 W.WIN 000014 X.SHST 000026 ...PC1= 001574R 002 U.XLBN 000064 V.HBCS 000072 XC.ACT= 000100 X.SHUN 000024 ...PC2= 001770R 002 U2.AT.= 000020 V.HBLB 000066 XC.DAT= 000004 X.SIZE 000004 ...PC3= 001574R 002 U2.CRT= 002000 V.IBLB 000032 XC.DFR= 000040 X.TRCK 000030 ...TPC= 000020 U2.DH1= 100000 AVF -- Assign Virtual Disk MACRO V05.05 Wednesday 07-Sep-88 13:36 Page 5-24 Symbol table . ABS. 177776 000 (RW,I,GBL,ABS,OVR) 000000 001 (RW,I,LCL,REL,CON) $WDATA 003012 002 (RW,D,LCL,REL,CON) $$FSR1 001020 003 (RW,D,GBL,REL,OVR) $CODE 004314 004 (RO,I,LCL,REL,CON) Errors detected: 0 *** Assembler statistics Work file reads: 0 Work file writes: 4 Size of work file: 17904 Words ( 70 Pages) Size of core pool: 17698 Words ( 68 Pages) Operating system: RSX-11M/M-PLUS Elapsed time: 00:01:02.13 AVF,AVF/-SP=LB:[1,1]EXEMC.MLB/ML,LB:[11,10]RSXMC.MAC/PA:1,SY:[307,20]VFPRE/PA:1,AVF