.MCALL .MODULE .MODULE BUPDDI,VERSION=03,COMMENT=<>,IDENT=NO ; Copyright (c) 1998 by Mentec, Inc., Nashua, NH. ; All rights reserved ; ; This software is furnished under a license for use only on a ; single computer system and may be copied only with the ; inclusion of the above copyright notice. This software, or ; any other copies thereof, may not be provided or otherwise ; made available to any other person except for use on such ; system and to one who agrees to these license terms. Title ; to and ownership of the software shall at all times remain ; in Mentec, Inc. ; ; The information in this document is subject to change without ; notice and should not be construed as a commitment by Digital ; Equipment Corporation, or Mentec, Inc. ; ; Digital and Mentec assume no responsibility for the use or ; reliability of its software on equipment which is not supplied ; by Digital or Mentec, and listed in the Software Product ; Description. .SBTTL BUPDDI - Disk Directory for Backup .ENABL LC,GBL ; 28-Feb-89 RHH V5.5 work ; Macro References .MCALL .LOOKUP, .DATE, .GTIM, .PRINT, .READW, .PURGE .MCALL .RCTRLO, .HERR, .SERR, .BR, .ASSUME ; Local Macros .MACRO .COUT CALL DOPUTC .ENDM .MACRO .PFILE ARG MOV ARG,R0 CALL DOLINE .ENDM .MACRO ...... .ENDM ; Equates/Definitions VOLPRT = 0 ; Display volume name? ; Offsets into new BUQ prefix block BQ.ID =: 2 ; BUQ identifier BQ.S1LN =: 30 ; 1st section length BQ.SILN =: 32 ; intermediate section length BQ.SLLN =: 34 ; last section length BQ.TLLN =: 36 ; total saveset length (w/o prefixes) BQ.NOSC =: 40 ; number of sections in saveset BQ.SECN =: 42 ; section number BQ.DATE =: 46 ; saveset date word BQ.TIME =: 50 ; time values (hours, mins, secs) LFILE =: 1. ; SAVESET name column LSECT =: 15. ; SECTION column LBLOCK =: 27. ; BLOCKS column LDATE =: 40. ; DATE column LFILE2 =: 1. ; Filename column LBLOC2 =: 15. ; BLOCKS column LVINFO =: 23. ; VOLUME info column LDAYNM =: 32. ; Day-of-week column LDAYN2 =: 26. ; Day-of-week column for MAGTAPE LSTATS =: 44. ; STATUS column ; Local Data .NLIST BEX .PSECT DIRDAT,D MTDHED: .ASCIZ / Saveset Section Blocks Date/ ; name 1/1 3000/3000 13-Feb-1987 ; name2 1/1 1/1 13-Feb-1987 ; name3 1/109 65535/65535 13-Feb-1987 HEAD1: .ASCIZ / File Blocks Date/ HEAD2: .ASCIZ / File Blocks Volume Date/ DMESS1: .ASCII / Volume /<200> SAVMSG: .ASCII / Saveset: /<200> SUBMSG: .ASCII / Subset: /<200> CREATD: .ASCII / Created: /<200> NODATB: .ASCII / / NODATE: .ASCII / /<200> SSNAME: .ASCIZ /SSNAME.BUP/<200> QDISK: .BYTE 0 ; Disk is "BUQ" (new format) disk SSLST: .BYTE 0 ; Doing /SAVESET listing INVIS: .BYTE 0 ; "Invisible entry" indicator MTLIS: .BYTE 0 ; Doing /SAVESET from MAGTAPE .EVEN MEDIAZ: .WORD 0 ; Media size ; The following three words are passed as an array to IGTDIR. ; They must remain in order. NODEVC: .WORD 0 ; Indicate channel already open DIRBLK: .WORD 6 ; First directory block .ASSUME DIRBLK EQ NODEVC+2 RETALL: .WORD 1 ; Return ALL entries .ASSUME RETALL EQ NODEVC+4 PREFXB: .WORD 0 ; address of PREFIX block buffer SECNUM: .WORD 0 ; section number SECSIZ: .WORD 0 ; this section size TOTLLN: .WORD 0 ; total saveset size VOLSIZ: .WORD 0 ; volume size, minus reserved blocks NOVOLS: .WORD 0 ; number of volumes in saveset SEC1LN: .WORD 0 ; section 1 length INTMLN: .WORD 0 ; intermediate section length SSDATE: .WORD 0 ; saveset date DDATE: .WORD 0 ; directory entry date DHOURS::.WORD 0 ; prefix block hours DMINUT::.WORD 0 ; prefix block minutes DSECND: .WORD 0 ; prefix block seconds V1: .WORD 1 ; volume containing first file block V2: .WORD 2 ; volume containing final file block TOTLL2: .WORD 0 ; 2nd word of Total Saveset Size ; FORTRAN-style arg blocks for IDATE() and IWEEKD() IDTBLK: .WORD 4 .WORD MONTH ; month address .WORD DAY ; day address .WORD YEAR ; year address .WORD DATWRD ; RT-11 time word address MONTH: .WORD 0 DAY: .WORD 0 YEAR: .WORD 0 DATWRD: .WORD 0 DAYNAM::.ASCII / / ; zeroth day name ..DAYS:: .ASCII /Sunday Monday Tuesday Wednesday / .ASCII /Thursday Friday Saturday / .EVEN .SBTTL DIREC - BUP DISK Directory Code .PSECT DIRECT,I .ENABL LSB DIRECO::MOV INFIL,DEVSPC MOV NHDRAD,R1 CALL FETHAN ; Fetch input handler MOV R0,NHDRAD ; Next avail hdlr address ; Set up listing file. Fetch handler, setup block buffer, open ; the device, etc. CLRB NEEDOP ; Assume TT output MOV #1,VOLNUM ; Just in case GSIZE fails, CALL SETRES ; Setup device names in messages CMPB DEV1,#DEV.TT ; Output to TT? BEQ 20$ ; If so, proceed. MOV R0,R1 ; NHDRAD MOV OUTFIL,DEVSPC ; list output device CALL FETHAN ; Fetch list output handler MOV R0,DOBUF ; Set up buffer pointer ADD #512.,R0 ; Make room for LIST buffer MOV OUTCHA,DSKCHA ; Use output channel for list INCB NEEDOP ; declare NEED_OPEN ; Set up FORTRAN-style argument blocks for IGTDIR and IGTENT 20$: TSTB GIV.P ; /EXCLUDE? BPL 25$ INC IG.DEV+4 ; Set IGTDIR's RETURN_ALL flag 25$: MOV R0,IGDBUF ; Get buffer address ADD #2000,R0 ; Allow room for dir segs MOV R0,PREFXB ; Save PREFIX BLOCK buffer address ADD #1000,R0 ; and the point to next available MOV R0,IGDBLK+4 ; Use for IGTDIR work area MOV R0,IGEBLK+2 ; and for IGTENT work area ADD #,R0 ; Allow room for work area MOV R0,BUFADD ; and save next adrs, if it's needed CMP R0,TOPADD ; enough mem for all this? BLO 30$ MOV #MEM,R1 ; -F-insufficient memory JMP FATAL 30$: MOV #INCHAN,IGDCHN ; Store address of channel in arg blk TSTB GIV.R ; a SUBSET list? BPL 40$ MOV #-1,SEC1LN ; Fake 1-vol-only section, MOV #1,VOLNUM ; on volume 1 MOVB #200,GIV.S ; Force /SAVESET code JMP DOSUBS ; go do that. ; Perform Non-File-Structured LOOKUP on the input device 40$: .SERR MOV INFIL,DEVSPC ; Get device name for nfs lookup .LOOKUP #EMTARE,INCHAN,#DEVSPC ; Open channel to device BCC 50$ ; Branch if no error ; Process LOOKUP ERRORs TSTB @#$ERRBY ; Which class of errors? BMI DIRIOE ; .SERR in effect. .HERR MOV #LO2,R1 ; -F-Channel in use JMP FATAL 50$: .HERR 60$: CLRB SSLST ; Assume doing normal listing CALL GSIZE ; get device size in R1 BCC 70$ DIRIOE: .PURGE INCHAN MOV #RE1,R1 ;<-F-Directory input error > JMP FATALD 70$: MOV R1,MEDIAZ ; Store media size SUB #RESBLK,R1 MOV R1,VOLSIZ ; save useable size of this volume MOV R1,RETCOD ; initialize FREE BLOCK count MOV INCHAN,R1 ; On input channel, CALL CHKVID ; Check if is a backup volume BCC 100$ ; Yes, branch TSTB NOTBAK ; Is it a backup volume? BPL 80$ ; Branch if so. CLRB NOTBAK ; Clear flag MOV #BAK,R1 ;<-F-NOT A BACKUP VOLUME> JMP FATAL 80$: MOV INFIL,R0 ; R0 = dev to be converted MOV #DEVICE,R1 ; R1 -> area to store dev spec CALL $R50ASC ; convert R50 to ASCII 90$: CALL PROM1 ; Prompt/Get answer BCC 60$ RETURN ; CHKVID leaves R2 pointing to homeblock buffer... ; Check now to see whether the disk is an older BUP disk backup volume, ; or a newer BUQ (multi-saveset) disk backup volume. 100$: CLRB QDISK ; assume old BUP disk. MOV DK.VOL(R2),VOLNUM ; save volume number CMPB (R2),#'Q ; is this a newer 'BUQ' disk? BEQ 150$ ; if so, branch ; Get homeblock information from OLD BUP disk CMPB (R2),#40 ; 1st char blank? BNE 110$ ; branch if not. MOV #1,VOLNUM ; handle inited disk anomoly 110$: ADD #DK.VOL,R2 ; Point to volume number ; .ASSUME DK.TOT EQ DK.VOL+2 ; .ASSUME DK.SIZ EQ DK.TOT+2 ; .ASSUME DK.TSZ EQ DK.SIZ+2 MOV (R2)+,SECNUM ; get volume number MOV (R2)+,NOVOLS ; and number of volumes MOV (R2)+,SECSIZ ; get "small" size MOV VOLSIZ,R2 ; old-BUP format usable media size MOV R2,SEC1LN ; save as 1st section length, MOV R2,INTMLN ; and as intermediate section length. ; Calculate total saveset size (it's not represented in the homeblock) CLR R0 ; Init accumulator MOV NOVOLS,R1 120$: DEC R1 BEQ 130$ ADD R2,R0 ; Accumulate non-last volume lengths BR 120$ 130$: ADD SECSIZ,R0 ; Add in the "small" volume length MOV R0,TOTLLN ; save total size here. CMP SECNUM,NOVOLS ; is it the last volume of set? BEQ 140$ ; branch if so. MOV R2,SECSIZ ; otherwise, display full vol size 140$: BR DODIR ; Print directory of old BUP disk. ; Disk is a NEW BUP (BUQ multi-saveset) disk. Flag it so and proceed. 150$: INCB QDISK ; Indicate new 'Q' style disk. MOV #LBLBUF,R1 ; Read 1st dir block .READW #EMTARE,INCHAN,R1,#256.,#6 BCS DIRIOE MOV (R1),R0 ; number of segments ASL R0 ; number of dir blocks ADD #6,R0 ; number of blocks not available MOV MEDIAZ,R1 ; get media size SUB R0,R1 ; subtract out what's not available, MOV R1,RETCOD ; Use this for FREE BLOCKS count, MOV R1,VOLSIZ ; and volume size. .BR DODIR ; Do directory of BUQ disk. .DSABL LSB .SBTTL DODIR - Do the directory ;+ ; Do the directory. Begin by setting up a wildcard search with IGTDIR. ; Do a header, the entries, and finally the end message. ;- .ENABL LSB DODIR: TSTB GIV.S ; /SAVESET list? BPL 10$ ; branch if so. JMP DOSSDR ; Do SAVESET dir ; Do a list of all saveset sections on the mounted volume 10$: MOV #6,DIRBLK ; Directory is in block 6, CALL IGTDLO ; Call IGTDIR through local routine 20$: CALL HEADER ; Do the header CLR NFTRAN ; Init number of files CLR SAVINB ; Use this for total no. of blocks CLR BLKVER ; Clear high-order total blocks 30$: CALL DOENT ; Do an entry BCC 30$ ; And repeat until no more. .RCTRLO CALL ENDMES ; Do the trailer RETURN ; Do a directory entry DOENT: CLRB INVIS ; Assume entry is visible. MOV #IGEBLK,R5 ; Point to argument block CALL IGTENT ; get directory entry TSTB GIV.P ; /EXCLUDE in effect? BPL 35$ CMP R0,#E.NOMA ; Yes. a NO_MATCH entry? BEQ 50$ ; then use it. TST R0 ; entry found or no more entries? BPL 38$ ; make matches invisible BR 100$ ; no more (or error). 35$: CMP R0,#E.NOMA ; a NO_MATCH entry? BNE 40$ ; branch if not 38$: INCB INVIS BR 50$ ; let this go through so that ; free blocks can be counted 40$: TST R0 ; check return code BMI 100$ ; if negative, no more (or error). 50$: MOV #DIRENT,R2 ; point to directory entry BIT E.STAT(R2),#E.PERM ; entry PERMANENT? BEQ 90$ ; Branch if not. 60$: MOV E.DATE(R2),DDATE ; get the entry's date TSTB GIV.S ; doing a /SAVESET list? BPL 70$ ; branch if not. MOV E.LENG(R2),SECSIZ ; get file entry size CALL GETVNS ; get volume number info BR 80$ ; go on and print entry. 70$: CLR TOTLL2 ; clear 2nd word of accumulator TSTB QDISK ; Does saveset have a PREFIX block? BEQ 80$ ; If not, print what we got from HB. MOV INCHAN,R1 ; (get input channel no.) CALL GETPFX ; If so, get the PREFIX block info ; Common code for both OLD and NEW BUP formats 80$: MOV SECSIZ,R0 ; Get section size SUB R0,RETCOD ; adjust FREE BLOCK count TSTB INVIS ; is this a requested entry? BNE 90$ ; branch if not. ADD R0,SAVINB ; Add up total blocks used ADC BLKVER INC NFTRAN ; add the file to file count CALL FMTENT ; Print the entry line 90$: CLC ; Indicate success. RETURN 100$: SEC ; Indicate no available entry. RETURN .DSABL LSB .SBTTL MTLIST - Magtape List ; This code is entered after successfully locating and reading ; the directory blocks from a magtape saveset in BUPMT2. ; Those blocks are now stored in the temporary file (BUPTMP.TMP) ; and the magtape is in its final resting place. ; ; BUPMT2 has already fetched all necessary handlers (including ; that for the list device), and has allocated magtape buffers, ; now pointed to by BUFADD. Convert the first magtape buffer, ; which is no longer needed, to buffers for IGTDIR and IGTENT. ; ; On entry, R0 contains the saveset date .ENABL LSB MTLIST::MOV R0,SSDATE ; Store date away INCB MTLIS ; Set flag indicating MAGTAPE MOV #TMPCHA,IGDCHN ; Store address of channel in arg blk MOV #6,DIRBLK ; Directory is in block 6, MOV #-1,SEC1LN ; Fake 1-vol-only section, MOV #1,VOLNUM ; on volume 1 JMP MTSS01 ; Jump into middle of disk dir code. .DSABL LSB .SBTTL IGTDLO - Call IGTDIR from local routine .ENABL LSB IGTDLO: MOV #NODEVC,IGDDEV ; Use (0,6,1) IGTDIR mode MOV #IGDBLK,R5 ; Point to argument block CALL IGTDIR ; Setup a wildcard dir search TST R0 ; test return code BMI 10$ RETURN ; Process errors from IGTDIR 10$: MOV #IND,R1 ; Assume <-F-Invalid directory > CMP R0,#E.IVDF ; Invalid directory? BEQ 20$ ; branch if yes. MOV #RE1,R1 ;<-F-Directory input error > 20$: .PURGE INCHAN JMP FATALI .DSABL LSB .SBTTL GETPFX - Get PREFIX block ; Special BUQ (new format) code. Read the section's prefix block ; and get data from there. ; ; R1 should hold the channel number ; R2 should be pointing to the directory entry of the saveset ; in question. .ENABL LSB GETPFX: MOV E.LENG(R2),SECSIZ ; Get section size from dir seg MOV PREFXB,R3 ; use allocated PREFIX buffer .READW #EMTARE,R1,R3,#256.,FILBLK ; Read prefix block BCC 10$ .PURGE R1 MOV #RE2,R1 ; <-F-Input error dev:> JMP FATALI 10$: CMP BQ.ID(R3),#^RBUP ; Is it a BUQ prefix? BNE 50$ ; branch if not MOV BQ.SECN(R3),SECNUM ; Get section number MOV BQ.S1LN(R3),SEC1LN ; get 1st section length MOV BQ.SILN(R3),INTMLN ; get intermediate section length MOV BQ.SLLN(R3),R0 ; get final volume size BEQ 20$ ; branch if only 1 volume INC R0 ; account for last section's prefix 20$: ADD BQ.S1LN(R3),R0 ; add 1st section size INC R0 ; account for 1st section's prefix MOV BQ.NOSC(R3),R1 ; get no. of volumes in saveset MOV R1,NOVOLS ; save it for later DEC R1 ; account for 1st and last 30$: DEC R1 ; more intermediate volumes? BLE 40$ ; branch if not ADD BQ.SILN(R3),R0 ; add an intermediate volume's worth ADC TOTLL2 ; keep carry bit in 2nd accum. ADD #1,R0 ; account for this section's prefix ADC TOTLL2 ; keep carry bit in 2nd accum. BR 30$ 40$: MOV R0,TOTLLN ; use this for total size MOV BQ.DATE(R3),SSDATE ; get saveset date word MOV R3,R1 ADD #BQ.TIME,R1 ; point to time values MOV (R1)+,DHOURS ; get hour, MOV (R1)+,DMINUT ; minute, MOV (R1)+,DSECND ; second CLC ; indicate SUCCESS RETURN 50$: MOV #1,SECNUM ; if prefix not valid, use dir info MOV #1,NOVOLS ; 1 volume only MOV E.LENG(R2),TOTLLN ; entry's size SEC RETURN .DSABL LSB .SBTTL GETVNS - Get volume number info for file entry ;+ ; ; This routine determines the volumes on which a file starts and begins. ; ;- .ENABL LSB GETVNS: MOV FILBLK,R0 ; Get starting block number CALL VOLN ; determine volume no. of 1st blk MOV R0,V1 ; save it MOV FILBLK,R0 ; Get starting block number ADD SECSIZ,R0 ; determine ending block DEC R0 ; that's it. CALL VOLN ; determine vol no. of final block MOV R0,V2 ; save it too. RETURN ; Given a file block number in R0, return the volume number that that ; block number resides in (also in R0). VOLN: MOV R1,-(SP) ; save registers MOV R2,-(SP) MOV R3,-(SP) MOV VOLNUM,R1 ; get disk volume number MOV SEC1LN,R2 ; at first, use 1st section length MOV R2,R3 ; volume's last block 20$: CMP R0,R3 ; is it on this volume? BLO 30$ ; branch if so. INC R1 ; next volume number MOV INTMLN,R2 ; after 1st, use intermediate length ADD R2,R3 ; next volume's last block BCC 20$ ; loop unless ADD overflowed 30$: MOV R1,R0 ; result - volume number MOV (SP)+,R3 MOV (SP)+,R2 MOV (SP)+,R1 RETURN .DSABL LSB .SBTTL DOSSDR - Do /SAVESET directory ; ; This subroutine prints a directory of files within a /DEVICE saveset ; on disk backup. ; ; 1. LOOKUP the named saveset section ; 2. Read and verify valid PREFIX block, and SECTION = 1 ; 3. Setup wildcard match IGTDIR ; 4. Print header ; 5. Format and print matching entries ; 6. Print trailer ; 7. Exit. ; .ENABL LSB DOSSDR: .PURGE INCHAN ; close NFS lookup ; 1. LOOKUP the named saveset section in FILE mode DOSUBS: MOV #,R0 ; prevent NFS mode TST NONAME ; input filename specified? BPL 10$ ; branch if so. MOV #DEFNAM,R1 ; if not, use BACKUP.BUP .REPT 3 MOV (R1)+,(R0)+ .ENDR 10$: .SERR ; trap monitor errors .LOOKUP #EMTARE,INCHAN,#INFIL ; lookup saveset BCC 20$ MOV #LO1,R1 ; File not found xxxxxx JMP FATALI 20$: .HERR ; 2. Read and verify valid PREFIX block, and SECTION = 1 MOV #6,DIRBLK ; assume directory in block 6 TSTB GIV.R ; is this a /SUBSET list? BMI 30$ ; if so, go directly below. TSTB QDISK ; is this a BUQ disk? BNE 24$ ; branch if so CMP SECNUM,#1 ; Old BUP disk. 1st section? BNE 90$ ; branch if not BR 30$ ; Otherwise it's ok. 24$: MOV INCHAN,R1 ; on input channel, CLR FILBLK ; from block zero, CALL GETPFX ; Get Prefix Block Info BCS 30$ ; Branch if not BUQ prefix CMP SECNUM,#1 ; 1st section? BNE 90$ INC DIRBLK ; Directory in block 7 (rem PREFIX) ; 3. Setup wildcard match IGTDIR ; Do a list of all matching files on the specified saveset section. ; If doing saveset list from magtape, continue here. MTSS01: 30$: CALL IGTDLO ; Call IGTDIR through local routine ; 4. Print header 40$: CALL HEADER ; Do the header CLR NFTRAN ; Init number of files CLR SAVINB ; Init low-order total blocks used CLR BLKVER ; Init high-order blocks used ; 5. Format and print matching entries 50$: CALL DOENT ; Do an entry BCC 50$ ; And repeat until no more. ; 6. Print trailer .RCTRLO CALL ENDMES ; Do the trailer RETURN ; Wrong volume - not section 1 90$: MOV #VOL,R1 JMP FATAL RETURN .DSABL LSB .SBTTL HEADER - Format the directory output ;+ ; HEADER prints a directory header, ; FMTENT prints an entry line, ; ENDMES prints the final message. ;- .ENABL LSB .PSECT DIRECT,I HEADER: TSTB NEEDOP ; Need open? BEQ 5$ CALL DOOPEN ; Open list file now. CLRB NEEDOP 5$: CALL RTNICE ; Print first part of header TSTB GIV.S ; /SAVESET? BPL 50$ ; branch if not. MOV #INFIL,R0 MOV #SSNAME,R1 CALL $FNASC ; Convert saveset name to ASCII MOVB #200,(R1) ; 200-terminate ssname MOV #SAVMSG,R0 ; Assume "Saveset: " TSTB GIV.R ; /SUBSET? BPL 10$ MOV #SUBMSG,R0 ; If so, use "Subset: " 10$: CALL DOLINE ; ' Saveset: SSNAME.EXT' 20$: .PFILE #SSNAME .PFILE #CRLF ; terminate this line, TSTB MTLIS ; from MAGTAPE? BNE 30$ ; then do "created" TSTB GIV.R ; If /SUBSET, skip "created" BMI 60$ TSTB QDISK ; If it's a BUQ disk, BEQ 60$ 30$: .PFILE #CREATD ; print "Created: " MOV SSDATE,R0 ; for saveset creation date, CALL DAYDAT ; day-of-week dd-mmm-yy TSTB MTLIS ; for MAGTAPE? BNE 40$ ; skip time if so. CALL BLANKO CALL TIMED ; format the saveset creation time 40$: .PFILE #CRLF ; terminate line BR 60$ ; finish up. 50$: .PFILE #DMESS1 ; Volume.. MOV VOLNUM,R2 CALL DECIMF ; nnn .PFILE #SKIP1 ; Skip a line .PFILE #MTDHED ; Print directory header BR 80$ ; ............ 60$: .PFILE #CRLF ; skip one line MOV #HEAD1,R0 ; assume /SUBSET header TSTB GIV.R ; Is this from a /SUBSET? BMI 70$ ; if so, skip VOLUME info. TSTB MTLIS ; Is this a MAGTAPE listing? BNE 70$ ; if so, skip VOLUME info. MOV #HEAD2,R0 ; Disk /SAVESET; use 2nd header 70$: CALL DOLINE 80$: .PFILE #CRLF RETURN .DSABL LSB .SBTTL FMTENT - Do a one-line directory entry. .ENABL LSB FMTENT: MOV #1,LPOINT ; Init the location counter MOV #LFILE,R2 ; Location counter for SSNAME CALL PSPACE ; Put spaces CALL PRNAME ; Print filename ADD #10.,LPOINT ; Update location counter TSTB GIV.S ; /SAVESET? BMI SSENT ; branch if so. MOV #LSECT,R2 ; Location counter for message CALL PSPACE ; Put spaces MOV SECNUM,R2 ; Get section number CALL DECIMF ; Print it (r4 = no of digits printed) ADD R4,LPOINT ; Update location counter MOV #'/,R0 ; Print slash .COUT INC LPOINT MOV NOVOLS,R2 ; Get total number of sections CALL DECIMF ; Print it ADD R4,LPOINT MOV #LBLOCK,R2 ; Location counter for message CALL PSPACE ; Put spaces MOV SECSIZ,R2 ; Get size of file CALL DECIMF ; Print it ADD R4,LPOINT ; Update location counter MOV #'/,R0 .COUT INC LPOINT MOV TOTLLN,R2 MOV TOTLL2,R3 CALL DEC2MA ; Print double-precision value MOV #LDATE,R2 ; Location counter for message CALL PSPACE ; Put spaces MOV DDATE,R0 ; Get file date CALL DATE2 ; Print it 20$: .PFILE #CRLF ; do CRLF RETURN .DSABL LSB .SBTTL SSENT - SAVESET entry ; Do size value for file entry in saveset .ENABL LSB SSENT: MOV #LBLOC2,R2 ; Location of BLOCKS message CALL PSPACE ; Put spaces MOV SECSIZ,R2 ; Get size of file CALL DECIMF ; Print it ADD R4,LPOINT ; Update location counter ; Do volume information TSTB GIV.R ; Is this from a /SUBSET? BMI 20$ ; if so, skip VOLUME info. TSTB MTLIS ; Is this a MAGTAPE listing? BNE 20$ ; if so, skip VOLUME info. MOV #LVINFO,R2 ; Location of VOLUME info CALL PSPACE ; Fill in with spaces MOV V1,R2 ; Get vol num of start of file CALL DECIMF ; print it ADD R4,LPOINT CMP V1,V2 ; is vol2 the same? BEQ 10$ ; branch if so MOV #'-,R0 .COUT INC LPOINT ; count the hyphen, MOV V2,R2 ; get vol of end of file CALL DECIMF ; print it ADD R4,LPOINT ; count chars printed ; Do day-of-week and date of entry 10$: MOV #LDAYNM,R2 ; Location of day-of-week BR 30$ ; ............ 20$: MOV #LDAYN2,R2 ; Location of day for MAGTAPE 30$: CALL PSPACE ; Insert spaces MOV DDATE,R0 ; For file date, CALL DAYDAT ; Do day-of-week and dd-mmm-yy 40$: .PFILE #CRLF ; do CRLF RETURN .DSABL LSB .SBTTL DAYDAT - Display day of week AND dd-mmm-yy ; Display day of week AND dd-mmm-yy .ENABL LSB DAYDAT: MOV R0,DATWRD ; save date word BIC #^C,R0 ; clear out all but month bits BEQ 30$ ; branch down if month = 0 CMP R0,#<12.*2000> ; month > 12? BHI 30$ ; that's bad too. MOV #IDTBLK,R5 MOV #4,(R5) ; let arg count = 4 CALL IDATE ; get MONTH, DAY, YEAR MOV #IDTBLK,R5 MOV #3,(R5) ; let arg count = 3 CALL IWEEKD ; get day of week CMP R0,#7 ; check for legal BLOS 10$ ; branch if so. CLR R0 ; index the blank day name 10$: MOV R0,-(SP) ASL R0 ; *2 ASL R0 ; 4-char offset ADD (SP)+,R0 ; *5 ASL R0 ; *10. ADD #DAYNAM,R0 ; point to entry MOV R0,R1 MOV #10.,R2 20$: MOVB (R1)+,R0 .COUT INC LPOINT ; account for character DEC R2 BGT 20$ CALL BLANKO ; print an extra blank, MOV DATWRD,R0 ; Get date word CALL DATE2 ; Format and print it RETURN 30$: .PFILE #NODATB RETURN .DSABL LSB .SBTTL PRNAME - Print the filename ;+ ; The following routine prints the filename of the Backup file on ; the directory display. It appends the period before the extension. ;- ; .ENABL LSB PRNAME: MOV #ASCNAM,R2 ; Point to filename 10$: MOVB (R2)+,R0 BEQ 20$ .COUT BR 10$ 20$: RETURN .DSABL LSB .SBTTL PATDIR - Patch space ;+ ; Patch space for module BUPDIR ;- .PSECT PATCH,RW,I PATDIR::.BLKW 32. .END