1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 1 F 0 2 3 INPUT SOURCE.OPSYS:PROP 1 2 3 4 5 6 7 8 9 10 * ......... BBBBBBBBBBBBBBBBBB TTTTTTTTTTTTTTTTTTTTTTTT IIIIIIIIIIII 11 * ................. BBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTTTTTTTTTTTTTT IIIIIIIIIIII 12 * ..........##......... BBBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTTTTTTTTTTTTTT IIIIIIIIIIII 13 * ............##........... BBBBBB BBBBBB TTTTTT TTTTTT TTTTTT IIIIII 14 * .............##............ BBBBBB BBBBBB TTTTT TTTTTT TTTTT IIIIII 15 * .............##............ BBBBBB BBBBBBB TTTT TTTTTT TTTT IIIIII 16 * ..............##............. BBBBBBBBBBBBBBBBBBB TTTTTT IIIIII 17 * ..............##............. BBBBBBBBBBBBBBBBB TTTTTT IIIIII 18 * ..............##............. BBBBBBBBBBBBBBBBBBB TTTTTT IIIIII 19 * .............##.............. BBBBBB BBBBBB TTTTTT IIIIII 20 * ...........##.............. BBBBBB BBBBBB TTTTTT IIIIII 21 * ..........##............... BBBBBB BBBBBB TTTTTT IIIIII 22 * ........##............... BBBBBB BBBBBBB TTTTTT IIIIII 23 * .....##.............. BBBBBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTT IIIIIIIIIIII 24 * ................. BBBBBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTT IIIIIIIIIIII 25 * ......... BBBBBBBBBBBBBBBBBBBB TTTTTTTTTTTT IIIIIIIIIIII 26 * 27 * 28 * ****** Copyright 1982, 1983, 1984, 1985, 1986, 1987, 1988, 29 * 1989, 1990, 1991, 1992 BTI Computer Systems ****** 30 * 31 * This document and the program it describes are the exclusive property 32 * of and proprietary to BTI Computer Systems. No use, reproduction or 33 * disclosure of this document or its contents, either in full or in part, 34 * by any means whatsoever regardless of purpose may be made without the 35 * prior written consent of BTI Computer Systems. 36 * 37 * BTI Computer Systems 38 * Sunnyvale, California 94086 4 5 6 7 * TTTTT A PPPP EEEEE RRRR EEEEE CCC OOO V V EEEEE RRRR 8 * T A A P P E R R E C C O O V V E R R 9 * T A A P P E R R E C O O V V E R R 10 * T A A PPP EEEE RRRR EEEE C O O V V EEEE RRRR 11 * T AAAAA P E R R E C O O V V E R R 12 * T A A P E R R E C C O O V V E R R 13 * T A A P EEEEE R R EEEEE CCC OOO V EEEEE R R 14 15 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 2 F 0 17 18 ********************************************************************************** 19 * * 20 * Revisions Date * 21 * --------- ---- * 22 * 1.5 A8501 07 Jan 85 * 23 * Put tape definitions in separate * 24 * file (TRTAPEDEFS). * 25 * 1.6 A8502 12 Feb 85 * 26 * Zero end position pointers for SAFs in * 27 * the FDE. Put last change date in FBIs. * 28 * Fix bug causing SAF FDE entries to * 29 * have the size wrong. * 30 * 1.7 A8502a 19 Feb 85 * 31 * Changes for new backup format. * 32 * A8503 13 Mar 85 * 33 * More format changes. * 34 * A8503a 13 Mar 85 * 35 * More format changes. * 36 * A8505 28 May 85 (9C release version) * 37 * Fix relative block numbers for minor * 38 * access blocks. Bug fix for backwards * 39 * compatibility. * 40 * A8511 19 Nov 85 * 41 * Added message to inform user of normal * 42 * completion and put the standard * 43 * sleep message in the lights. * 44 * A8601 21 Jan 86 * 45 * Changes for tiny RAFs. * 46 * A8602 19 Feb 86 * 47 * Set NOSUB flag in FBI of substitution * 48 * block. Changed FDSAFEPP and FDSAFEND * 49 * to FDEPP and FDEND. Removed unnecessary * 50 * load in ASKDISK. Changed offset between * 51 * security blocks. * 52 * A8603 12 Mar 86 * 53 * More changes for RAFs. Change volume * 54 * revision code for recovered volumes. * 55 * A8605 15 May 86 * 56 * Fix to decryption algorithm to handle blocks * 57 * larger than 8K words. Checks revision level of * 58 * backed up volume to ensure we can recover it. * 59 * Added retry count for the number of attempts we * 60 * will make at writing the substitution block. * 61 * Added better recovery on tape errors in the tape * 62 * management section. IDX manager halts on disk * 63 * errors. Bug fixes and better error recovery * 64 * throughout IDX manager. Changes throughout to * 65 * deal with errors logically, and recover from them * 66 * whenever possible. If unrecoverable errors are * 67 * encountered the recovery is terminated in an * 68 * orderly fashion to preserve what has already * 69 * been recovered. Will create a dummy account or * 70 * file if it is determined that the start of one * 71 * was lost. Bug fixes in directory manager to * 72 * properly add in additional UDIR2 blocks. * 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 3 F 0 73 * A8605a xx May 86 * 74 * Turn off ghost flag for PATHs, TERMs, etc. * 75 * A8606 xx June 86 * 76 * Fix in directory searcher to find the proper * 77 * insertion point if only the extensions differ. * 78 * Multiple fixes to allow boot on memory filled * 79 * with parity errors. Clean up in code to * 80 * convert tiny RAF directly to large RAF. * 81 * A8607 xx July 86 * 82 * Misc fixes to allow recovery when memory is * 83 * full of uninitialized words (parity errors). * 84 * Misc bug fixes. Eliminated local stack, now * 85 * uses stack passed in from TOPL. Added some * 86 * additional error messages. Moved FBILCD * 87 * setting to PAGEOUT and eliminated it from * 88 * various other places. * 89 * A8608 28 Aug 86 * 90 * Misc bug fixes. RC * 91 * A8611 10 Nov 86 * 92 * Fix to clear ghost flag on SAFs. Now sets * 93 * nosub and write check bits for security * 94 * blocks. * 95 * A8612 22 Dec 86 * 96 * Modified to use standard OPENDISK routine * 97 * to open output disk. * 98 * A8703 30 Mar 87 (11C release version) * 99 * Changed DISPLAY calls to not alarm. RC * 100 * A8707 23 Jul 87 * 101 * Mods to NXTPHYSREC to allow for manual * 102 * handling of tape errors. RC * 103 * Added rewind at end of intermediate tapes. RC * 104 * A8709 02 Sep 87 * 105 * Reorganization of file recovery code to * 106 * simplify and facilitate addition of proper * 107 * ghost file handling. RC * 108 * A8710 06 Oct 87 * 109 * Bug fixes in MRKBLKS, SPLITIDX and related * 110 * routines. RC * 111 * A8712 08 Dec 87 * 112 * Addition of checksum code and revamp of * 113 * error handling. *.!* accounts now must * 114 * come from encrypted record. Other minor * 115 * fixes. RC * 116 * A8801 27 Jan 88 * 117 * Fix to bug introduced in A8712 in file share * 118 * list recovery. Major revamp to IDX manager. * 119 * Now includes proper relative block number * 120 * in IDX blocks. RC * 121 * A8803 08 Mar 88 * 122 * Bug fix in error message for checksum * 123 * error. RC * 124 * A8805 27 May 88 * 125 * Allowed for new VOPENDISK errors. DH * 126 * A8808 26 Aug 88 * 127 * Initialized SECMNTDATE. RC * 128 * A8811 02 Nov 88 * 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 4 F 0 129 * Minor changes. RC * 130 * A8903 02 Mar 89 * 131 * Added check in tape driver to ensure that * 132 * at least a minimum size record was read. RC * 133 * * 134 ********************************************************************************** 135 136 137 BLOCK TAPERECOVER 138 139 START2 BEGINNING 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 5 F 0 141 142 ********************************************************************************** 143 * * 144 * Includes, and global declarations * 145 * * 146 ********************************************************************************** 147 148 NOLIST CREF 149 INPUT .SYS:MACROS 1 * Including MACROS.ASSEM Version A8607. 150 INPUT SOURCE.OPSYS:MACHDEFS 151 INPUT SOURCE.OPSYS:IODEFS 152 INPUT OPSYS.SCSIDR:SCSIDEFS 153 INPUT SOURCE.OPSYS:DISKDEFS 154 INPUT SOURCE.OPSYS:HALTDEFS 155 INPUT SOURCE.OPSYS:PAGEDEFS 156 INPUT SOURCE.OPSYS:IBLOCK 157 INPUT SOURCE.OPSYS:OPRQINFOMACS 158 LIST CREF 159 INPUT BOOT.OPSYS:OPLVECTORS 160 INPUT BOOT.OPSYS:TAPEVECT 161 INPUT BOOT.OPSYS:DISKCB 162 INPUT BOOT.OPSYS:TAPECB 163 164 BKUPINFORD LIST 164 ********************************************************************************** 164 * * 164 * Definition of system header made in backup. * 164 * * 164 ********************************************************************************** 164 00000400 164 HDRPROTO BASE R0 00160800 0 BASE 164 BKUPHDRW1 BSS 1 first word of header 000000F0 BYTE 164 FILEINFOT EQU BITS 0:14 type of backup information 00000000 ABS 164 FILEINFOTV EQU 0 volume information 00000001 ABS 164 FILEINFOTA EQU 1 account information 00000002 ABS 164 FILEINFOTF EQU 2 file information 00000003 ABS 164 FILEINFOTD EQU 3 file page information 00000004 ABS 164 FILEINFOTM EQU 4 mapped file page information 00001F10 BYTE 164 BKUPREV EQU BITS 15:31 revision number 00160801 0 BASE 164 BKUPHDRW2 BSS 1 second word of header 000000F0 BYTE 164 FSTBKUPLEN EQU BITS 0:14 first optional length 00001F10 BYTE 164 SNDBKUPLEN EQU BITS 15:31 second optional length 164 DRCT 00000002 ABS 164 BKUPHDRLEN EQU DISPW HDRPROTO length of header 164 ORG HDRPROTO reclaim space 165 166 INPUT TRTAPEDEFS 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 6 (TRTAPEDEFS) F 16 Backup Format Definitions 3 4 ********************************************************************************** 5 * * 6 * This file defines the format for the backup tapes. * 7 * Note that the +BACKUP program uses its own definitions * 8 * file and these definitions must match. * 9 * The backup program is written so that it is * 10 * independant of the internal format of the data manipulated * 11 * by the operating system backup/recover requests. In order * 12 * to keep order among the various accounts and things, it * 13 * adds a considerable amount of format, identifying, and * 14 * other header information to each logical record that the * 15 * system returns. This information is pretty much duplicated * 16 * within the OS created logical records, so much of what the * 17 * backup program adds is ignored by TAPERECOVER. However * 18 * DISKTOTAPE must put in all the same information that * 19 * +BACKUP does in order to keep compatibility. * 20 * TAPERECOVER does need to know what 'type' of logical * 21 * record it is recovering, so it uses the record type * 22 * (RTYPExxx) that the backup program added. This is the * 23 * only datum, available for each logical record, that * 24 * determines how much header information needs to be skipped * 25 * before getting to the actual data contained in the logical * 26 * record. There is a record type provided with the OS * 27 * information but we must know what type of backup record we * 28 * have before we can find the OS record. * 29 * * 30 ********************************************************************************** 31 32 ********************************************************************************** 33 * * 34 * This is the format for the physical record header. * 35 * Each physical record is made up of a header followed by * 36 * logical record(s). There is no limit to the number of * 37 * logical records contained by a physical record and a * 38 * logical record may stretch over many physical records. * 39 * The physical record is encrypted as a whole (except for * 40 * the first part of the header) if any of the logical * 41 * record(s) contained within must be encrypted. The * 42 * physical record is assigned a sequence number and is * 43 * written on the tape as a single record in the proper * 44 * sequence. * 45 * * 46 ********************************************************************************** 47 00000400 48 PHSRECHDR BASE R0 00160800 0 BASE 49 PHSSEQNUM BSS 1 sequence number in this "file set" 00160801 0 BASE 50 OPHSREQCNT BSS 1 PHSREQCNT in versions 5 and below... 51 * unused in versions 6 and above 00160802 0 BASE 52 PHSFLAGWRD BSS 1 00080012 0 ZBM 53 PHSNCRYPTD EQU PHSFLAGWRD/BIT 0 on sez physical record encrypted 00080212 0 ZBM 54 PHSFILEDO EQU PHSFLAGWRD/BIT 1 on sez no critical info here 55 * (just file data) 00000003 ABS 56 PHSNOESIZE EQU DISPW PHSSEQNUM size of part never encrypted 57 * ****** record beyond here may be encrypted 00001000 ABS 58 MAXENCRSIZ EQU 4*WPP maximum block size that can be encrypted 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 7 (TRTAPEDEFS) F 16 Backup Format Definitions 00160803 0 BASE 59 PHSENCSTRT BSS 0 beginning of encrypted area 00160803 0 BASE 60 PHSDSEQNUM BSS 1 duplicate sequence number 61 * (used to verify decrypt) 00160804 0 BASE 62 PHSCKSUM BSS 1 checksum of physical record, before 63 * encrypt and after decrypt 00160805 0 BASE 64 PHSREQCNT BSS 1 number of words at the beginning of ... 65 * ... this physical record continued ... 66 * ... from last logical record 00000001 ABS 67 PHSFILLSIZ EQU 1 size of filler in physical record 00160806 0 BASE 68 PHSFILLER BSS PHSFILLSIZ filler to ensure minimum encrypt size 69 * (must be zero filled) 00000004 ABS 70 PHSEHDRSIZ EQU DISPW PHSDSEQNUM size of encrypted header 00160807 0 BASE 71 PHSLOGDATA BSS 0 start of logical data 72 DRCT 00000007 ABS 73 PHSHDRLEN EQU DISPW PHSRECHDR length of physical record header 74 ORG PHSRECHDR 75 76 77 ********************************************************************************** 78 * This is the format of the header for each logical * 79 * record. Other information is appended to this header for * 80 * different types of logical records. * 81 ********************************************************************************** 82 00000400 83 LOGRECHDR BASE R0 00160800 0 BASE 84 LOGRECCWD BSS 1 +BACKUP made logical record header word 00080010 0 ZBM 85 LOGRECOSQ EQU LOGRECCWD/BIT 0 flag to say that backup info. is out of order 00080210 0 ZBM 86 LOGRECBZY EQU LOGRECCWD/BIT 1 flag to say backup info. missing 00081650 0 ZBM 87 LOGRECTYP EQU LOGRECCWD/BITS 11:15 logical record type 00000000 ABS 88 RTYPESET EQU 0 file set header 00000001 ABS 89 RTYPEESET EQU 1 end of file set 00000002 ABS 90 RTYPESWCH EQU 2 end of tape or tape track 00000003 ABS 91 RTYPEVOL EQU 3 volume information record 00000004 ABS 92 RTYPEACC EQU 4 account information record 00000005 ABS 93 RTYPEFIL EQU 5 file information record 00000006 ABS 94 RTYPEFP EQU 6 file data information record 00000007 ABS 95 RTYPEERR EQU 7 error was encountered in backup 00000008 ABS 96 RTYPEFLR EQU 8 filler record type 00000008 ABS 97 MAXRECTYP EQU 8 maximum for logical record types 00082100 0 ZBM 98 LOGRECIFL EQU LOGRECCWD/BITS 16:31 length of this logical record 99 DRCT 00000001 ABS 100 LOGHDRLEN EQU DISPW LOGRECHDR length of logical record header 101 ORG LOGRECHDR 102 103 104 105 ********************************************************************************** 106 * * 107 * 'Tape Strings' are used to record character strings in * 108 * logical record headers. They are variable length thus making * 109 * any logical record header containing them variable and adding * 110 * a degree of complexity to our record unpacking algorithms. * 111 * Tape Strings are used to aid in recovering from errors when a * 112 * file name or account name is needed. * 113 * Tape strings are variable length but will always be an * 114 * integral number of words. The length of a tape string is * 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 8 (TRTAPEDEFS) F 16 Backup Format Definitions 115 * found in its first character. * 116 * * 117 ********************************************************************************** 118 00000000 ABS 119 TS EQU 0 marker used in logical record 120 headers for a tapestring 121 00000400 122 TAPSTRDEF BASE R0 00160000 0 CACH 123 TAPSTRCHS BSSC 1 the first character is the length 124 DRCT 125 ORG TAPSTRDEF 126 127 128 ********************************************************************************** 129 * * 130 * Following the rest of a logical record header is the * 131 * actual data that was returned to BACKUP by the relevant * 132 * operating system backup request. This buffer is preceeded * 133 * by a single word that indicates its length. * 134 * * 135 ********************************************************************************** 136 00000400 137 TAPHDR1000 BASE R0 00160800 0 BASE 138 OSINFOSIZ BSS 1 length of OS returned information 00160801 0 BASE 139 OSINFO BSS 0 where this stuff starts 140 DRCT 00000001 ABS 141 TAPHDR1000L EQU DISPW TAPHDR1000 142 ORG TAPHDR1000 143 144 145 ********************************************************************************** 146 * * 147 * This is the format for the "file set" logical record. * 148 * AKA the 'tape label'. It is the first record to appear at * 149 * the beginning of the BACKUP info, and also is the first * 150 * record on each continued tape of BACKUP. * 151 * This record is really a special case in several ways. * 152 * It always appears alone in a physical record. Two copies of * 153 * this always appear together on separate physical records. It * 154 * is never encrypted. The sequence number of the physical * 155 * record is a duplicate of the immediately following physical * 156 * record. This is because the EOT status is not known at the * 157 * time that a record is constructed and encrypted. Therefore, * 158 * a tape header may need to be inserted at an arbitrary place. * 159 * We borrow the next expected sequence number and don't * 160 * increment the expected number. * 161 * Some misc notes.. Note that the time stamp for this * 162 * file set, while not secret, is used as an indicator in the * 163 * encryption (i.e. makes up part of the key). Backup can * 164 * get the maximum required buffer size from PHYSRECSZ. * 165 * * 166 ********************************************************************************** 167 00000400 168 HDRTYP0 BASE R0 169 BSS LOGHDRLEN logical record header 00160801 0 BASE 170 HDRTYPWRD1 BSS 1 holds revision numbers 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 9 (TRTAPEDEFS) F 16 Backup Format Definitions 00080101 0 ZBM 171 ENCTYP EQU HDRTYPWRD1/BITS 0:15 encryption algorithm used 00000001 ABS 172 SSENCRFN EQU 1 current encrypt format number 00082101 0 ZBM 173 SAVSETFMT EQU HDRTYPWRD1/BITS 16:31 tape format used 00000005 ABS 174 SSTAPEFN5 EQU 5 earliest format for DTT type seq num 00000006 ABS 175 SSTAPEFN6 EQU 6 earliest format with checksums 00000006 ABS 176 SSTAPEFN EQU 6 current form for writers 00160802 0 BASE 177 SETTAPNUM BSS 1 current tape number 00160803 0 BASE 178 SETTIMSTP BSS2 1 time stamp for this "file set" 00160805 0 BASE 179 BOOTINFO BSS 1 1 if boot info on this tape 00160806 0 BASE 180 PHYSRECSZ BSS 1 maximum words in a physical record 00160807 0 BASE 181 WHODONE BSS 1 1 sez DISKTOTAPE did this backup 182 * 0 sez +BACKUP is guilty 00160808 0 BASE 183 SSSSN BSS 1 fileset system's serial number 00160809 0 BASE 184 SSOWNER BSS2 1 account serial number of owner of this fileset 00000005 ABS 185 SSFILLEN EQU 5 length of filler 0016080B 0 BASE 186 SAVESETFIL BSS SSFILLEN filler (must always be zero) 00160810 0 BASE 187 SAVSETNAME BSS TS tape string - contains fileset's name 188 DRCT 00000010 ABS 189 SVSRECLEN EQU DISPW HDRTYP0 length of "file set" header 190 ORG HDRTYP0 191 192 193 ********************************************************************************** 194 * This is the format for the "end file set" logical * 195 * record. It indicates the end of the BACKUP info. A tape * 196 * mark appears before and after it, and it is not encrypted. * 197 ********************************************************************************** 198 00000400 199 HDRTYP1 BASE R0 00160800 0 BASE 200 ENDHEADER BSS LOGHDRLEN logical record header 00160801 0 BASE 201 ENDTIME BSS 2 copy of the beginning time stamp 00000004 ABS 202 ENDFILLEN EQU 4 length of this filler 00160803 0 BASE 203 ENDFILLER BSS ENDFILLEN filler 204 DRCT 00000007 ABS 205 SVERECLEN EQU DISPW HDRTYP1 length of "end file set" header 206 ORG HDRTYP1 207 208 209 ********************************************************************************** 210 * This is the format for the "tape end" logical record. * 211 * A tape mark appears before and after it, and it is * 212 * unencrypted. * 213 * As soon as the tape writing process detects the EOT, * 214 * it writes out a file mark, this record, and another file * 215 * mark. Note that the reading process must not use the EOT * 216 * status to substitute for this record... the EOT is * 217 * mechanically detected and might not appear in the same * 218 * relative position when the tape is read, especially on * 219 * another drive. * 220 ********************************************************************************** 221 00000400 222 HDRTYP2 BASE R0 00160800 0 BASE 223 TAPENDHDR BSS LOGHDRLEN logical record header 00160801 0 BASE 224 TAPENDNUM BSS 1 current tape number 00160802 0 BASE 225 TAPENDTIME BSS 2 beginning time stamp 00000004 ABS 226 TPENDFILLN EQU 4 length of this filler 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 10 (TRTAPEDEFS) F 16 Backup Format Definitions 00160804 0 BASE 227 TAPENDFIL BSS TPENDFILLN must be zero 228 DRCT 00000008 ABS 229 TPERECLEN EQU DISPW HDRTYP2 length of "tape end" header 230 ORG HDRTYP2 231 232 233 ********************************************************************************** 234 * This is the format for the "volume" logical record * 235 * header. The tapestring containing the volume name is * 236 * followed by the OS defined backup information block. * 237 ********************************************************************************** 238 00000400 239 HDRTYP3 BASE R0 240 BSS LOGHDRLEN logical record header 00000004 ABS 241 VOLFILLEN EQU 4 this record's filler length 00160801 0 BASE 242 VOLRECFILL BSS VOLFILLEN filler - must be zero 00160805 0 BASE 243 VOLRECNAME BSS TS tape string - volume name 244 DRCT 00000005 ABS 245 VOLRECLEN EQU DISPW HDRTYP3 length of "volume" header 246 ORG HDRTYP3 247 248 249 ********************************************************************************** 250 * This is the format for the "account" logical record * 251 * header. The account name tapestring is followed by the OS * 252 * defined backup information block. * 253 ********************************************************************************** 254 00000400 255 HDRTYP4 BASE R0 00160800 0 BASE 256 ACTHDR BSS LOGHDRLEN logical record header 00160801 0 BASE 257 ACTHDRSER BSS 2 account serial number 00160803 0 BASE 258 ACTHDRNOSL BSS 1 1 sez dump the account share list 00160804 0 BASE 259 ACTHDRFAST BSS 1 1 sez used fast encryption 00000004 ABS 260 ACTFILLEN EQU 4 this header's filler length 00160805 0 BASE 261 ACTHDRFILL BSS ACTFILLEN filler - must be zero 00160809 0 BASE 262 ACTHDRNAME BSS TS tapestring - full account name (including volume name) 263 DRCT 00000009 ABS 264 ACTRECLEN EQU DISPW HDRTYP4 length of "account" header 265 ORG HDRTYP4 266 267 268 ********************************************************************************** 269 * This is the format for the "file" logical record * 270 * header. The file name tapestring is followed by the OS * 271 * defined backup information block. * 272 ********************************************************************************** 273 00000400 274 HDRTYP5 BASE R0 00160800 0 BASE 275 FILHDR BSS LOGHDRLEN logical record header 00160801 0 BASE 276 FILHDRASER BSS 2 owner account serial number 00160803 0 BASE 277 FILHDRNOSL BSS 1 1 sez dump share list 00160804 0 BASE 278 FILHDRTYPE BSS 1 file hardware type 00160805 0 BASE 279 FILHDRSIZE BSS 1 size of file in blocks 00160806 0 BASE 280 FILHDRRDAT BSS 2 last read date 00160808 0 BASE 281 FILHDRWDAT BSS 2 last write date 0016080A 0 BASE 282 FILHDRCDAT BSS 2 create date 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 11 (TRTAPEDEFS) F 16 Backup Format Definitions 0016080C 0 BASE 283 FILHDRBDAT BSS 2 backup date 0016080E 0 BASE 284 FILHDRGOST BSS 1 1 sez ghost file 00000004 ABS 285 FILEFILLEN EQU 4 this filler length 0016080F 0 BASE 286 FILHDRFILL BSS FILEFILLEN filler - must be zero 00160813 0 BASE 287 FILHDRNAME BSS TS tapestring - ::) 288 DRCT 00000013 ABS 289 FILRECLEN EQU DISPW HDRTYP5 length of "file" header 290 ORG HDRTYP5 291 292 293 ********************************************************************************** 294 * * 295 * This is the format for the "file page" logical record * 296 * header. It is followed by the OS defined backup info * 297 * block. * 298 * Any number of file blocks may appear in this record. * 299 * When more than one is present the format is: * 300 * header * 301 * block 1 * 302 * block 2 * 303 * ... * 304 * block n * 305 * FBI 1 * 306 * ... * 307 * FBI n * 308 * * 309 * Note that to keep compatibility with older backups a * 310 * count of zero data blocks really means one. * 311 * Note that the file page logical records for a RAF or * 312 * code file may appear in any order. * 313 * * 314 ********************************************************************************** 315 00000400 316 HDRTYP6 BASE R0 00160800 0 BASE 317 DATAHDR BSS LOGHDRLEN logical record header 00160801 0 BASE 318 DATAACTSER BSS 2 account serial number 00160803 0 BASE 319 DATASEQNUM BSS 1 sequence number of this record in file 00160804 0 BASE 320 NUMBERWORD BSS 1 word for various sequence numbers 00080084 0 ZBM 321 NUMBPAGES EQU NUMBERWORD/CH0 number of file pages in this record 00081184 0 ZBM 322 DATAPAGESN EQU NUMBERWORD/BITS 8:31 sequence number of first file page 323 * within this logical record 00000003 ABS 324 DATAFILLEN EQU 3 this filler length 00160805 0 BASE 325 DATAFILL BSS DATAFILLEN filler - must be zero 326 DRCT 00000008 ABS 327 FIPRECLEN EQU DISPW HDRTYP6 length of "file page" header 328 ORG HDRTYP6 329 330 331 ********************************************************************************** 332 * This is the format for the "error" logical record * 333 * header. This record will occur at any spot in the BACKUP * 334 * that an error has occurred. It is assumed that it was a * 335 * non-fatal error, but if it was a fatal error the BACKUP * 336 * will end immediately. * 337 ********************************************************************************** 338 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 12 (TRTAPEDEFS) F 16 Backup Format Definitions 00000400 339 HDRTYP7 BASE R0 00160800 0 BASE 340 ERRHDR BSS LOGHDRLEN logical record header 341 DRCT 00000001 ABS 342 ERRRECLEN EQU DISPW HDRTYP7 length of "error" header 343 ORG HDRTYP7 344 345 ********************************************************************************** 346 * Backup has a filler record type which is just to take * 347 * up space. We only need to get the size from the header and * 348 * skip that many words to the next record. * 349 ********************************************************************************** 350 00000400 351 HDRTYP8 BASE R0 00160800 0 BASE 352 FILLERHDR BSS LOGHDRLEN logical record header 353 DRCT 00000001 ABS 354 FILLERRECL EQU DISPW HDRTYP8 length of "filler" header 355 ORG HDRTYP8 167 168 ********************************************************************************** 169 * * 170 * ASSERTEQ - Make sure two labels are equal * 171 * This macro will generate an assembly-time error if the * 172 * given expressions are not equal. Usage: * 173 * ASSERTEQ expr1,expr2 * 174 * * 175 ********************************************************************************** 176 177 ASSERTEQ MACRO 178 BSS $(1)-$(2) error if $(1) < $(2) 179 BSS $(2)-$(1) error if $(2) < $(1) 180 EMAC 181 0000000D ABS 182 CR EQU 0D carriage return 0000000A ABS 183 LF EQU 0A line feed 00000004 ABS 184 MAXTRAX EQU 4 maximum tracks on a cartridge tape 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 13 F 0 Backup Format Definitions 186 187 ********************************************************************************** 188 * * 189 * Disk block buffers for accounts, etc. Note that the * 190 * data pages must always reside on page boundaries. * 191 * * 192 ********************************************************************************** 193 194 ORG MA 04000 195 00004000 196 CURSECBUF BSS WPP buffer for security block 00004400 197 CURADTBUF BSS WPP buffer for ADT block 00004800 198 CURIDXBUF BSS WPP buffer for current IDX block 00004C00 199 CURACTBUF BSS WPP buffer for current UDIR 00005000 200 CURUD2BUF BSS WPP buffer for current UDIR2 00005400 201 CURFILBUF BSS WPP buffer for current file 00005800 202 TMPPAGBUF BSS WPP temporary disk buffer 00005C00 203 TMPPAGBUF2 BSS WPP temporary disk buffer 00006000 204 EXTRAPAGE BSS WPP an extra page to keep around 205 00006400 206 CURSECFBI BSS FBILNTH 0000640B 207 CURADTFBI BSS FBILNTH 00006416 208 CURIDXFBI BSS FBILNTH 00006421 209 CURACTFBI BSS FBILNTH 0000642C 210 CURUD2FBI BSS FBILNTH 00006437 211 CURFILFBI BSS FBILNTH 00006442 212 TMPPAGFBI BSS FBILNTH 0000644D 213 TMPPAGFBI2 BSS FBILNTH 214 00006458 215 SECBLKDA BSS 1 disk address of primary security block 00006459 216 SECBLK2DA BSS 1 disk address of secondary security block 217 218 ********************************************************************************** 219 * * 220 * Buffers etc. for passwords, and for decryption. * 221 * * 222 ********************************************************************************** 223 00000008 ABS 224 NVMPWDLEN EQU 8 0000645A 225 SYSKEY BSS2 0 key we will use in decryption 0200645A 226 SYSKEYCHR BSSC NVMPWDLEN char. buffer 0000645C 227 OURTIMSTMP BSS2 1 time stamp (serial #) of backup info. 0000645E 228 EXPECTENC BSS 1 non-zero sez we expect next phys 229 * record to be encrypted. 0000645F 230 TAPEFORM BSS 1 tape format number 231 232 ********************************************************************************** 233 * * 234 * Buffers etc. for talking to the user. * 235 * * 236 ********************************************************************************** 237 00000050 ABS 238 TRMBUFLEN EQU 80 00006460 239 TRMBUF LABEL 02006460 240 TRMCHRBUF BSSC TRMBUFLEN input buffer 241 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 14 F 0 Backup Format Definitions 242 ********************************************************************************** 243 * * 244 * IDX manager variables etc. * 245 * * 246 ********************************************************************************** 247 00006474 248 CURIDXADR BSS 1 ms address of current IDX bucket 00006475 249 TMPIDXADR BSS 1 address of current bucket during split 250 251 ********************************************************************************** 252 * * 253 * Variables used by the PAGIN and PAGOUT disk routines. * 254 * * 255 ********************************************************************************** 256 00006476 257 CURDSKADR BSS 1 address to hold current disk address 00006477 258 CURPAGADR BSS 1 address to read page into 00006478 259 CURFBIADR BSS 1 address to read FBI into 00006479 260 CURFBITYP BSS 1 type of FBI that we are expecting 0000647A 261 CURTIME BSS2 1 current time 262 263 ********************************************************************************** 264 * * 265 * Group of variables describing the record that we are recovering. * 266 * * 267 ********************************************************************************** 268 0000647C 269 TMPOSHDR BSS BKUPHDRLEN temp. to hold O.S. made header 0000647E 270 CURACTADR BSS 1 ms address of current account 0000647F 271 CURACCTASN BSS 2 account serial number we are recovering 00006481 272 TMPFDEBUF BSS FDLNTH temporary to hold FDE for a while 00006499 273 CURFDEPTR BSS 1 pointer to current FDE in the UDIR block 0000649A 274 CURUD1POS BSS 1 pointer to index in UDIR1 (if large dir) 0000649B 275 CURUD2BLK BSS 1 current UDIR2 block resident 0000649C 276 CURFILADR BSS 1 address of current file page 0000649D 277 CURFILSN BSS2 1 serial number of current file 0000649F 278 CURFILNAM BSS2 1 name of current file 000064A1 279 CURFILEXT BSS 1 extension of current file 000064A2 280 TAPSTRBUF LABEL 020064A2 281 TAPSTRCBUF BSSC 0200 buffer for tape string 00000200 ABS 282 TAPSTRBUFL EQU DISPC TAPSTRCBUF length of the buffer 00006522 283 CURHDRBUF BSS FILRECLEN largest record buffer for current record 00006535 284 HDR1000BUF BSS TAPHDR1000L buffer for this unused header 02006536 285 FILENAME BSSC 20 used to build a file name in 286 0000653B 287 BZFPROT BSS2 1 volume 288 BSS 1 system 289 BSS2 1 password 00006540 290 BZFACT BSS2 1 account name 00006542 291 BZFPRJ BSS 1 project name 292 BSS2 1 password 00006545 293 BZFFIL BSS2 1 file name 00006547 294 BZFEXT BSS 1 file extension 295 BSS2 1 password 296 297 ********************************************************************************** 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 15 F 0 Backup Format Definitions 298 * * 299 * Buffers and variables for the tape manager. * 300 * * 301 ********************************************************************************** 302 0000654A 303 CURRECPTR BSS 1 pointer into current record 0000654B 304 ENDRECPTR BSS 1 ptr. to first word after end of phs. record 0000654C 305 CURFPPTR BSS 1 pointer to current file page 0000654D 306 NUMBFP BSS 1 number of file pages 0000654E 307 CURRECTYP BSS 1 logical record type of current record 0000654F 308 NXTHDRPTR BSS 1 pointer to next logical record header 00006550 309 PHSRECWDS BSS 1 number of words left in physical record 00006551 310 NXTPHSNUM BSS 1 next physical record we expect 00006552 311 EXPTAPNUM BSS 1 holds tape number that we expect to find 00006553 312 BOOTFLAG BSS 1 flag sez boot info is on this tape 00006554 313 PAGEFLAG BSS 1 sez there is a good file page on EXTRAPAGE 00006555 314 HAVEPAGE BSS 1 sez already fetched data page and FBI 00006556 315 DATALOST BSS 1 one sez data has been lost 316 317 ********************************************************************************** 318 * * 319 * Misc. variables. * 320 * * 321 ********************************************************************************** 322 00006557 323 TMTEMP1 BSS 1 holds variable being passed to SR 00006558 324 ADDRESSTMP BSS 1 to pass MS address to PREPOUT 325 326 * We push this up against the end of a page so any file page records 327 * will have the file pages fall on page boundaries. 328 329 ORG (((DISPW MA 0)+PHSHDRLEN+FIPRECLEN) AND -WPP)+WPP-(PHSHDRLEN+FIPRECLEN+TAPHDR1000L) 000067F0 330 PHSTAPBUF BSS 12*WPP physical record buffer for tape 000097F0 331 XTRABUF BSS 12*WPP duplicate physical record buffer 000067F0 332 BUFFER EQU PHSTAPBUF buffer name for checksum routine 333 334 ********************************************************************************** 335 * * 336 * Disk free space manager variables etc. * 337 * A bit array exists with an entry for each available * 338 * page on the disk being recovered onto. A zero in this * 339 * array indicates the page is available for use. * 340 * The disk space manager marks all bad pages in the bit * 341 * array. It then marks any other pages that it knows are in * 342 * use. Pages are marked in the array when they are used, or * 343 * cleared from the array if they become available. The * 344 * normal allocation scheme is to INCL a counter, then check * 345 * to ensure that the block is not already in use for some * 346 * reason. * 347 * * 348 ********************************************************************************** 349 0000C7F0 350 DSKCTLBLK BSS DCBLEN disk control block 0000C7F5 351 MAXDSKADR EQU DSKCTLBLK/DCBVOLSIZE max disk block number on this pack 0000C7F8 352 DSKBLKNUM BSS 1 the last ms address that we gave out 0000C7F9 353 LSTDSKADR BSS 1 next ms address counter for ADT builder 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 16 F 0 Backup Format Definitions 0000C7FA 354 BTXDSKADR BSS 1 ms address of bad trax list 0000C7FB 355 CURADTLST BSS 1 number for current ADT list 00030D40 ABS 356 MAXBLK EQU 200000 maximum number of blocks on a volume 000061A8 ABS 357 ARYCHRLEN EQU MAXBLK/WORDLNTH*CPW length of bit map in chars. 0000C7FC 358 ARRAYW LABEL 0040C7FC 359 BITARRAY BSSB 1:MAXBLK bit array for blocks 360 BSS 0 361 362 ********************************************************************************** 363 * * 364 * As we encounter busy files we enter them into this * 365 * list. If we still haven't recovered them by the end, we * 366 * list them out for the user. * 367 * Note that this list grows toward high memory and does * 368 * not have any limit. This should not pose a problem in any * 369 * forseeable recovery, but be sure to remember that new * 370 * variables cannot be placed here! * 371 * * 372 ********************************************************************************** 373 0000E066 374 BZYLSTPTR BSS 1 pointer to end of following list 375 0000E067 376 BZYLSTPROT BASE R0 00160800 0 BASE 377 BZYLSTACT BSS2 1 place for account name 00160802 0 BASE 378 BZYLSTPRJ BSS 1 place for project name 00160803 0 BASE 379 BZYLSTFIL BSS2 1 place for file name 00160805 0 BASE 380 BZYLSTEXT BSS 1 place for file extension 381 DRCT 00000006 ABS 382 BZYLSTLEN EQU DISPW BZYLSTPROT length of one of these entries 383 ORG BZYLSTPROT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 17 F 0 Main logic 386 387 ********************************************************************************** 388 * * 389 * This is the main-line for the offline full disk * 390 * recovery program. We do all the set up here, and then loop * 391 * calling a routine which recovers accounts. When the end of * 392 * the file set is found we tell the user about any files that * 393 * were busy during backup and were not recovered, then build * 394 * the ADT lists, and mark the volume as valid. * 395 * As we progress with the recovery, we occasionally write * 396 * out the current security block, UDIR, etc so that even if the * 397 * recovery dies a horrible death we will be able to make the * 398 * volume usable. * 399 * Note that if a fatal error is detected while recovering * 400 * accounts the end of file set will be faked causing us to * 401 * finish up before having read all of the tape(s). * 402 * * 403 ********************************************************************************** 404 405 BLOCK MAINLINE 406 ENTRY BEGINNING 407 ENTRY TAPSTRPTR 408 ENTRY TRMBUFPTR 409 410 ORG MA 03000 TOPL will start us at this address 411 00003000 412 BEGINNING LABEL 03000 FE0E300A 413 JMP PROGSTART 414 * --- 415 03001 41383930 416 VERSION TEXTZ "A8903" 03003 20544150 417 VERSMSG TEXTZ " TAPERECOVER version \C1\." 418 0000300A 419 PROGSTART LABEL 0300A DC5013E3 @ 420 CALLNP @VDISPLAY put our name up in lights 0300B 54415045 421 ASCII 2,TAPERECO "TAPERECO" 0300D 16050000 422 VFD "VE " AND 03F3F0000 ensure beep bit off 423 0300E DC1013F9 @ 424 CALL @VPREPOUT tell the terminal who we are 0300F 41003001 425 PAR VERSION our version 03010 40003003 426 PARL VERSMSG and our name 427 03011 60440050 1 IMM 428 LD R1 TRMBUFLEN length of the input buffer 03012 60846460 2 IMM 429 LD R2 ADR TRMBUF point to the buffer 03013 FE580000 430 CFILL 000 clear to eliminate parity errors 431 03014 DC403965 432 CALLNP SETUPTAPE ask user to set up first tape 03015 FE0E3030 433 JMP ALLOVER jump if error setting up tape 434 03016 DC40304B 435 CALLNP SETUPDECRP set up the decryption passwords etc. 436 03017 DC5013FB @ 437 CALLNP @VGETDATE get the current time 03018 E680647A 23 438 ST2 R2 CURTIME save to put in FBIs 439 03019 DC403074 440 CALLNP FNDVOLREC find the volume info on tape 0301A FE0E3030 441 JMP ALLOVER jump if can't find volume info. 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 18 F 0 Main logic 442 0301B DC4030A4 443 CALLNP SETUPDSK do set up of disk to be recovered 0301C FE0E3030 444 JMP ALLOVER jump on fatal error 445 0301D DC403115 446 CALLNP RCVRVOL recover the volume info. 0301E FE0E3030 447 JMP ALLOVER jump on fatal error 448 0301F EC006554 449 STZ PAGEFLAG indicate nothing on the EXTRAPAGE yet 03020 EC006555 450 STZ HAVEPAGE we have not moved the page yet 03021 EE00647F 451 STZ2 CURACCTASN no current account 03022 3800E067 0 452 LEA R0 BZYLSTPROT point to beginning of busy list 03023 E400E066 0 453 ST R0 BZYLSTPTR and make this end of list 454 03024 DC4037BC 455 CALLNP NXTLOGREC get the next logical record 456 * \ / 457 00003025 458 ACCTLOOP LABEL 03025 64040001 0 IMM 459 CPR R0 RTYPEESET is this the last record? 03026 FE023029 460 JEQ ALLDONE if so, go build the ADT tables 03027 DC403216 461 CALLNP DOACCT recover the account 03028 FE0E3025 462 JMP ACCTLOOP go try again 463 * --- 464 00003029 465 ALLDONE LABEL 03029 DC403CC3 466 CALLNP PRTBZYFLS tell user about busy files 467 0302A DC4031DA 468 CALLNP FINISHOFF finish off the recovery process 0302B DC5013E3 @ 469 CALLNP @VDISPLAY pretend to be sleeping 0302C 5A5A5A5A 470 ASCII 2,ZZZZZZ.. "ZZZZZZ.." 0302E 2E200000 471 VFD ". " AND 03F3F0000 0302F 5C8013F0 472 LDPC VDONEEXIT go back to TOPL 473 * --- 474 00003030 475 ALLOVER LABEL 03030 DC1013F9 @ 476 CALL @VPREPOUT print out the aborted message 03031 40003033 477 PARL ABORTMSG this is it 03032 5C8013F0 478 LDPC VDONEEXIT and return to caller 479 * --- 480 03033 20546170 481 ABORTMSG TEXTZ " Taperecover aborted." 482 ABORTMSG 00003033 F 0 477a 481= ACCTLOOP 00003025 F 0 458= 462j ALLDONE 00003029 F 0 460j 465= ALLOVER 00003030 F 0 433j 441j 444j 447j 475= +BEGINNING 00003000 F 0 406 412= +BZYLSTPROT 0000E067 F 0 452a +BZYLSTPTR 0000E066 F 0 453s +CURACCTASN 0000647F F 0 451s +CURTIME 0000647A F 0 438s +DOACCT UUUUUUUU F 0 461 +FINISHOFF UUUUUUUU F 0 468 +FNDVOLREC UUUUUUUU F 0 440 +HAVEPAGE 00006555 F 0 450s +NXTLOGREC UUUUUUUU F 0 455 +PAGEFLAG 00006554 F 0 449s 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 19 F 0 Main logic PROGSTART 0000300A F 0 413j 419= +PRTBZYFLS UUUUUUUU F 0 466 +RCVRVOL UUUUUUUU F 0 446 +RTYPEESET 00000001 F 0 459 +SETUPDECRP UUUUUUUU F 0 435 +SETUPDSK UUUUUUUU F 0 443 +SETUPTAPE UUUUUUUU F 0 432 +TAPSTRPTR F 0 407 +TRMBUF 00006460 F 0 429a +TRMBUFLEN 00000050 F 0 428 +TRMBUFPTR F 0 408 +VDISPLAY 000013E3 F 0 420 469 +VDONEEXIT 000013F0 F 0 472 478 VERSION 00003001 F 0 416= 425a VERSMSG 00003003 F 0 417= 426a +VGETDATE 000013FB F 0 437 +VPREPOUT 000013F9 F 0 424 476 483 END of MAINLINE 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 20 F 0 Main logic 485 486 ********************************************************************************** 487 * * 488 * Global constants and pointers. * 489 * * 490 ********************************************************************************** 491 03039 00FFFFFF 492 MSBLKMASK VFD ONEBITS/MSBLKFIELD 0303A E1D48000 493 DOTBTI PAK6 ! first project reserved to BTI 0303B 420C64A2 494 TAPSTRPTR PTR TAPSTRCBUF(1) pointer to start of file name 0303C 020C6460 495 TRMBUFPTR PTR TRMCHRBUF pointer to terminal buffer 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 21 F 0 Main logic 497 498 ********************************************************************************** 499 * * 500 * SETUPDECRP * 501 * * 502 * This routine will read the password from the NVM, and * 503 * will XOR in any secondary keys that the user wants. * 504 * * 505 * Call: * 506 * CALLNP SETUPDECRP * 507 * * 508 * Eats R0:R3. * 509 * * 510 ********************************************************************************** 511 512 BLOCK SETUPDECRP 513 ENTRY SETUPDECRP 514 0303D 2A456E74 515 KEYMSG TEXTZ "*Enter secondary encryption keys (CR when done) " 516 517 BEGFRAME 518 ENDFRAME 519 0304A 020C645A 520 SYSKEYPTR PTR SYSKEYCHR pointer to buffer for password 521 0304B DD5F8001 6 STAK 522 SETUPDECRP ENTRNP PUSH 0304C 60C40086 3 IMM 523 LD PFPTR PNCIX page number for SSU 0304D 60800310 2 524 LD R2 SSUPF get regular map value 0304E 18840001 2 IMM 525 ADD R2 (SSUNVM-SSUCOFFSET)/WPP move to NVM location 0304F 00D28000 2 REG 526 LDPF R2 map in the SSU 03050 EE00645A 527 STZ2 SYSKEY clear to eliminate parity errors 03051 60440007 1 IMM 528 LD R1 NVMPWDLEN-1 chars in the password 00003052 529 LOOKLOOP LABEL 03052 60221822 0 1 530 LD R0 CIX(NVMTAPEPW)(R1) system backup password 03053 E432304A 0 1 @ 531 ST R0 @SYSKEYPTR(R1) and put in our buffer 03054 FA663052 1 532 JDR R1 LOOKLOOP loop for all bytes 533 * \ / 03055 80D2C000 3 REG 534 PFRC PFPTR un-map the SSU 535 00003056 536 ASKKEY LABEL 03056 DC1013F9 @ 537 CALL @VPREPOUT ask the guy about extra keys 03057 4000303D 538 PARL KEYMSG 539 03058 60440050 1 IMM 540 LD R1 TRMBUFLEN length of the input buffer 03059 60846460 2 IMM 541 LD R2 ADR TRMBUF point to the buffer 0305A DC5013F3 @ 542 CALLNP @VREADLINE read a line from the terminal 543 0305B 30440050 1 IMM 544 RSB R1 TRMBUFLEN get length of the input line 0305C FA4A3065 1 545 JLEZ R1 NOMORE done if empty line 0305D EC32303C 1 @ 546 STZ @TRMBUFPTR(R1) terminate the buffer 547 * \ / 0305E 61046460 4 IMM 548 LD R4 ADR TRMBUF point to the buffer 0305F DC5013F8 @ 549 CALLNP @VFETCHITMH fetch up the key 03060 64440002 1 IMM 550 CPR R1 1*TALPH is it a symbol that was packed? 03061 FE0C3066 551 JNE BADKEY jump if not 552 * \ / 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 22 F 0 Main logic 03062 7680645A 23 553 XOR2 R2 SYSKEY XOR in the key 03063 E680645A 23 554 ST2 R2 SYSKEY and make it the new key 03064 FE0E3056 555 JMP ASKKEY go prompt the guy again 556 * --- 557 00003065 558 NOMORE LABEL 03065 5D1F8001 6 STAK 559 LEAVE POP 560 * --- 561 562 * The key started in a number, and this is bad, so tell the guy. 00003066 563 BADKEY LABEL 03066 DC1013F9 @ 564 CALL @VPREPOUT tell the guy 03067 40003069 565 PARL BADKEYMSG 03068 FE0E3056 566 JMP ASKKEY 567 * --- 03069 20456E63 568 BADKEYMSG TEXTZ " Encryption keys must start with a letter!" 569 ASKKEY 00003056 F 0 536= 555j 566j BADKEY 00003066 F 0 551j 563= BADKEYMSG 00003069 F 0 565a 568= KEYMSG 0000303D F 0 515= 538a LOOKLOOP 00003052 F 0 529= 532j NOMORE 00003065 F 0 545j 558= +NVMPWDLEN 00000008 F 0 528 +SETUPDECRP 0000304B F 0 513 522= +SYSKEY 0000645A F 0 527s 553 554s +SYSKEYCHR 0200645A F 0 520a SYSKEYPTR 0000304A F 0 520= 531s +TALPH 00003C10 F 0 550 +TRMBUF 00006460 F 0 541a 548a +TRMBUFLEN 00000050 F 0 540 544 +TRMBUFPTR 0000303C F 0 546s +VFETCHITMH 000013F8 F 0 549 +VPREPOUT 000013F9 F 0 537 564 +VREADLINE 000013F3 F 0 542 570 END of SETUPDECRP 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 23 F 0 Main logic 572 573 ********************************************************************************** 574 * * 575 * FNDVOLREC * 576 * * 577 * This routine will attempt to find the record with the * 578 * backed up volume information on the tape. * 579 * * 580 * Call: * 581 * CALLNP FNDVOLREC * 582 * JMP * 583 * * 584 * Eats R0:R4. * 585 * * 586 ********************************************************************************** 587 588 BLOCK FNDVOLREC 589 ENTRY FNDVOLREC 590 591 BEGFRAME 592 ENDFRAME 593 03074 DD5F8001 6 STAK 594 FNDVOLREC ENTRNP PUSH 03075 5C006553 595 CMZ BOOTFLAG should we skip over tape boot info? 03076 FE02307C 596 JEQ SKIPBOOT jump if not a system volume 597 * \ / 598 03077 611013D0 4 @ 599 LD R4 @VTAPECB point to our tape control block 03078 DC5013D5 @ 600 CALLNP @VSEFF search eof forward 03079 FA0C3081 0 601 JNEZ R0 BADFILMRK jump on any error 602 * \ / 0307A DC5013D5 @ 603 CALLNP @VSEFF and find next one 0307B FA0C3081 0 604 JNEZ R0 BADFILMRK jump on any error 605 * \ / 0000307C 606 SKIPBOOT LABEL 0307C DC4037BC 607 CALLNP NXTLOGREC get the one with volume info. 608 * current record type returned in R0 0307D 64040003 0 IMM 609 CPR R0 RTYPEVOL is this volume info? 0307E FE0C308E 610 JNE BADREC jump if not 611 * \ / 0307F 19C40001 7 IMM 612 ADD R7 1 return to P+2 00003080 613 BADRTN LABEL 03080 5D1F8001 6 STAK 614 LEAVE POP return with volume info present 615 * --- 616 617 * If we got an error trying to find the initial file mark we come here. 00003081 618 BADFILMRK LABEL 03081 DC1013F9 @ 619 CALL @VPREPOUT print an error message 03082 40003084 620 PARL FILMRKMSG 03083 FE0E3080 621 JMP BADRTN go to error return 622 * --- 03084 20457272 623 FILMRKMSG TEXTZ " Error looking for initial file mark." 624 625 * If the first record isn't "volume" info. we will come here. 0000308E 626 BADREC LABEL 0308E DC1013F9 @ 627 CALL @VPREPOUT say we got a bad record 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 24 F 0 Main logic 0308F 40003091 628 PARL BADMSG 03090 FE0E3080 629 JMP BADRTN we can't find the volume info. 630 * --- 03091 2043616E 631 BADMSG TEXTZ " Can't find volume info." 632 BADFILMRK 00003081 F 0 601j 604j 618= BADMSG 00003091 F 0 628a 631= BADREC 0000308E F 0 610j 626= BADRTN 00003080 F 0 613= 621j 629j +BOOTFLAG 00006553 F 0 595 FILMRKMSG 00003084 F 0 620a 623= +FNDVOLREC 00003074 F 0 589 594= +NXTLOGREC UUUUUUUU F 0 607 +RTYPEVOL 00000003 F 0 609 SKIPBOOT 0000307C F 0 596j 606= +VPREPOUT 000013F9 F 0 619 627 +VSEFF 000013D5 F 0 600 603 +VTAPECB 000013D0 F 0 599 633 END of FNDVOLREC 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 25 F 0 Main logic 635 636 ********************************************************************************** 637 * * 638 * SETUPDSK * 639 * This routine will prompt for, and try to open the disk * 640 * that the user wants to recover onto. It will do all the * 641 * processing to initialize the disk so a logical volume can * 642 * be recovered onto it. * 643 * Call: * 644 * CALLNP SETUPDSK * 645 * JMP * 646 * R4 => DCB pointer * 647 * Eats R0:R3, sets R4 * 648 * * 649 ********************************************************************************** 650 651 BLOCK SETUPDSK 652 ENTRY SETUPDSK 653 654 BEGFRAME 655 ENDFRAME 656 657 * table of OPENDISK errors that are structural (i.e. drive IS usable) 03098 00483099 658 OPNERRCP PTR OPNERREH/BIT 0 03099 0F000000 659 OPNERREH VFD (1*BIT ODBADPL)+(1*BIT ODBADVL)+(1*BIT ODBADSB)+(1*BIT ODSUBBIG) 660 0309A 2A456E74 661 USRMSG TEXTZ "*Enter disk to recover onto (DSKscu) " 662 030A4 DD5F8001 6 STAK 663 SETUPDSK ENTRNP PUSH 000030A5 664 AGAIN LABEL 030A5 DC1013F9 @ 665 CALL @VPREPOUT ask the guy a question 030A6 4000309A 666 PARL USRMSG 667 030A7 60440050 1 IMM 668 LD R1 TRMBUFLEN length of input buffer 030A8 38806460 2 669 LEA R2 TRMBUF address of term. input buffer 030A9 DC5013F3 @ 670 CALLNP @VREADLINE get the input line 030AA 30440050 1 IMM 671 RSB R1 TRMBUFLEN calculate the input line length 030AB FA4A30A5 1 672 JLEZ R1 AGAIN zero length lines give prompt again 673 * \ / 030AC EC32303C 1 @ 674 STZ @TRMBUFPTR(R1) place terminator at the end 030AD 39006460 4 675 LEA R4 TRMBUF pointer to the buffer 030AE DC5013F5 @ 676 CALLNP @VFETCHITEM get the parameter 030AF F27C30D5 1 677 JBF R1/TALPH BADNAME jump off if not a symbol 678 030B0 60128000 0 2 REG 679 LD R0 R2 copy the pak6 disk name 030B1 6104C7F0 4 IMM 680 LD R4 ADR DSKCTLBLK point to new control block for disk 030B2 60440000 1 IMM 681 LD R1 0 indicate no special subs list area 030B3 DC5013EB @ 682 CALLNP @VOPENDISK call routine to set up DCB 030B4 FA0230C0 0 683 JEQZ R0 GOODDISK jump if all is well 030B5 64040001 0 IMM 684 CPR R0 ODBADNAME bad name? 030B6 FE0230D5 685 JEQ BADNAME jump if so 030B7 64040002 0 IMM 686 CPR R0 ODNOTDISK requested device is not a disk 030B8 FE0230DF 687 JEQ BADDISK jump if not a disk there 030B9 64040003 0 IMM 688 CPR R0 ODOFFLINE disk is offline 030BA FE0230ED 689 JEQ OFFLINE jump if disk not ready 030BB 64040004 0 IMM 690 CPR R0 ODBADPL error reading pack label 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 26 F 0 Main logic 030BC FE0230F7 691 JEQ BADPL could not read pack label 030BD 5C303098 0 @ 692 CMZ @OPNERRCP(R0) is drive usable at all? 030BE FE0C30C0 693 JNE GOODDISK jump if so 030BF FE0E30D5 694 JMP BADNAME default 695 * --- 696 000030C0 697 GOODDISK LABEL 030C0 EC170804 4 BASE 698 STZ R4,DCBSUBLIST destroy the substitution list 699 030C1 DC003CE1 700 CALL PAGIN read the pack label 030C2 41005800 701 PAR TMPPAGBUF address of page 030C3 41006442 702 PAR TMPPAGFBI address of FBI 030C4 41440001 IMM 703 PARV FBITPL type of FBI 030C5 40440000 IMM 704 PARVL PLDA ms addresss 030C6 FE0E30F7 705 JMP BADPL error return 706 030C7 60005818 0 707 LD R0 TMPPAGBUF(PLBDTRXDA) get bad trax address 030C8 E400C7FA 0 708 ST R0 BTXDSKADR and remember it 030C9 E400C7F8 0 709 ST R0 DSKBLKNUM initialize our space allocator 710 711 * Mark bad blocks so we won't use them as free blocks. 712 030CA DC003CE1 713 CALL PAGIN read in the bad trax list 030CB 41005800 714 PAR TMPPAGBUF address of page 030CC 41006442 715 PAR TMPPAGFBI address of FBI 030CD 41440002 IMM 716 PARV FBITBTRX type of FBI 030CE 4040C7FA 717 PARVL BTXDSKADR ms address 030CF FE0E3101 718 JMP BADBTX jump on error 719 030D0 5C005BFE 720 CMZ TMPPAGBUF((BTRXECNT-1)*BTRXLNTH) is it all full up? 030D1 FE0C310C 721 JNE BTXFUL jump if it is all full 722 * \ / 030D2 DC403B0B 723 CALLNP MRKBLKS mark "used" blocks 724 030D3 19C40001 7 IMM 725 ADD R7 1 return address will be P+2 000030D4 726 BADRTN LABEL 030D4 5D1F8001 6 STAK 727 LEAVE POP 728 * --- 729 730 * If the name of the disk was in an incorrect format we will come here. 000030D5 731 BADNAME LABEL 030D5 DC1013F9 @ 732 CALL @VPREPOUT write out a message 030D6 400030D8 733 PARL NAMMSG 030D7 FE0E30A5 734 JMP AGAIN ask the guy for a disk name 735 * --- 736 030D8 20426164 737 NAMMSG TEXTZ " Bad format for disk name." 738 739 * If there is no disk at the hardware address we will come here. 000030DF 740 BADDISK LABEL 030DF DC1013F9 @ 741 CALL @VPREPOUT write out a message 030E0 400030E2 742 PARL DSKMSG 030E1 FE0E30A5 743 JMP AGAIN ask the guy for a disk name 744 * --- 745 030E2 20546865 746 DSKMSG TEXTZ " There is no disk at that hardware address." 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 27 F 0 Main logic 747 748 * Come here if disk not ready. 000030ED 749 OFFLINE LABEL 030ED DC1013F9 @ 750 CALL @VPREPOUT write out a message 030EE 400030F0 751 PARL OFFMSG saying disk not ready 030EF FE0E30A5 752 JMP AGAIN and ask operator again 753 * --- 754 030F0 20546861 755 OFFMSG TEXTZ " That disk is not ready." 756 757 * We come here if we get an error reading the pack label. 000030F7 758 BADPL LABEL 030F7 DC1013F9 @ 759 CALL @VPREPOUT write out a message 030F8 400030FA 760 PARL BADPLMSG 030F9 FE0E30D4 761 JMP BADRTN 762 * --- 763 030FA 20457272 764 BADPLMSG TEXTZ " Error reading pack label." 765 766 * We come here if we get an error reading the bad trax list. 00003101 767 BADBTX LABEL 03101 DC1013F9 @ 768 CALL @VPREPOUT write out a message 03102 40003104 769 PARL BADBTXMSG 03103 FE0E30D4 770 JMP BADRTN 771 * --- 772 03104 20457272 773 BADBTXMSG TEXTZ " Error reading bad trax list." 774 775 * We come here if the bad trax list is full. 0000310C 776 BTXFUL LABEL 0310C DC1013F9 @ 777 CALL @VPREPOUT write out a message 0310D 4000310F 778 PARL FULMSG 0310E FE0E30D4 779 JMP BADRTN 780 * --- 781 0310F 20426164 782 FULMSG TEXTZ " Bad trax list is full." 783 AGAIN 000030A5 F 0 664= 672j 734j 743j 752j BADBTX 00003101 F 0 718j 767= BADBTXMSG 00003104 F 0 769a 773= BADDISK 000030DF F 0 687j 740= BADNAME 000030D5 F 0 677j 685j 694j 731= BADPL 000030F7 F 0 691j 705j 758= BADPLMSG 000030FA F 0 760a 764= BADRTN 000030D4 F 0 726= 761j 770j 779j +BTXDSKADR 0000C7FA F 0 708s 717 BTXFUL 0000310C F 0 721j 776= +DCBSUBLIST 00160804 F 0 698s +DSKBLKNUM 0000C7F8 F 0 709s +DSKCTLBLK 0000C7F0 F 0 680a DSKMSG 000030E2 F 0 742a 746= FULMSG 0000310F F 0 778a 782= GOODDISK 000030C0 F 0 683j 693j 697= +MRKBLKS UUUUUUUU F 0 723 NAMMSG 000030D8 F 0 733a 737= +ODBADNAME 00000001 F 0 684 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 28 F 0 Main logic +ODBADPL 00000004 F 0 659x 690 +ODBADSB 00000006 F 0 659x +ODBADVL 00000005 F 0 659x +ODNOTDISK 00000002 F 0 686 +ODOFFLINE 00000003 F 0 688 +ODSUBBIG 00000007 F 0 659x OFFLINE 000030ED F 0 689j 749= OFFMSG 000030F0 F 0 751a 755= OPNERRCP 00003098 F 0 658= 692 OPNERREH 00003099 F 0 658a 659= +PAGIN UUUUUUUU F 0 700 713 +SETUPDSK 000030A4 F 0 652 663= +TALPH 00003C10 F 0 677j +TMPPAGBUF 00005800 F 0 701a 707 714a 720 +TMPPAGFBI 00006442 F 0 702a 715a +TRMBUF 00006460 F 0 669a 675a +TRMBUFLEN 00000050 F 0 668 671 +TRMBUFPTR 0000303C F 0 674s USRMSG 0000309A F 0 661= 666a +VFETCHITEM 000013F5 F 0 676 +VOPENDISK 000013EB F 0 682 +VPREPOUT 000013F9 F 0 665 732 741 750 759 768 777 +VREADLINE 000013F3 F 0 670 784 END SETUPDSK 785 INPUT TRVOLREC section that recovers the volume 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 29 (TRVOLREC) F 17 Volume recovery logic 3 4 ********************************************************************************** 5 * * 6 * RCVRVOL * 7 * * 8 * This routine will do the necessary stuff to recover * 9 * the volume information from the tape. * 10 * * 11 * Call: * 12 * Current logical record must be volume information record. * 13 * CALLNP RCVRVOL * 14 * JMP * 15 * * 16 * Eats R0:R4. * 17 * * 18 ********************************************************************************** 19 20 BLOCK RCVRVOL 21 ENTRY RCVRVOL 22 23 BEGFRAME 00178801 6 BASE 24 ERRCOUNT BSS 1 counter for error retries 25 ENDFRAME 26 00000004 ABS 27 MAXTRY EQU 4 number of times to retry writing subs block 28 03115 DD5F8002 6 STAK 29 RCVRVOL ENTRNP PUSH 30 * Current logical record is volume information. 03116 DC00375B 31 CALL MOVLOGREC move the OS made header 03117 4100647C 32 PAR TMPOSHDR buffer 03118 40440002 IMM 33 PARVL BKUPHDRLEN length in words 03119 FE0E3165 34 JMP OUTOFVOL jump on error 35 0311A DC40319A 36 CALLNP UPDBOTBLK update the boot block 37 38 * Fix up a volume label, and recover it. 39 0311B 60441000 1 IMM 40 LD R1 CPP number of chars. to do 0311C 60845800 2 IMM 41 LD R2 ADR TMPPAGBUF address of destination 0311D FE580000 42 CFILL 0 zero out the page 0311E 6044002C 1 IMM 43 LD R1 FBILNTH*CPW number of chars. to do 0311F 60846442 2 IMM 44 LD R2 ADR TMPPAGFBI address of destination 03120 FE580000 45 CFILL 0 zero out the FBI 03121 60446442 1 IMM 46 LD R1 ADR TMPPAGFBI point to the FBI 03122 60040004 0 IMM 47 LD R0 FBITVL code for volume label 03123 E4084080 0 1 ZBM 48 ST R0 R1,FBITYPE and fix up FBI 03124 60040001 0 IMM 49 LD R0 VOLLABELDA ms address 03125 E4085181 0 1 ZBM 50 ST R0 R1,FBIDA and fix up our address 03126 EDC84211 1 ZBM 51 STW R1,FBIWCHK say to write check this block 03127 EDC84411 1 ZBM 52 STW R1,FBINOSUB can not substitute the volume label 53 03128 DC00375B 54 CALL MOVLOGREC move backed up info. to volume label 03129 41005800 55 PAR TMPPAGBUF destination for move 0312A 40440040 IMM 56 PARVL VLBKUPE size of move 0312B FE0E3165 57 JMP OUTOFVOL jump if we ran out of record 58 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 30 (TRVOLREC) F 17 Volume recovery logic 59 * Allocate a new substitution block for the volume 60 * \ / 0312C 60040004 0 IMM 61 LD R0 MAXTRY get the number of retries to attempt 0312D E4178801 0 6 BASE 62 ST R0 SP,ERRCOUNT and set on the stack 0000312E 63 SUBAGN LABEL 0312E D0578801 6 BASE 64 DEC SP,ERRCOUNT one more attempt at writing the sub block 0312F FE08317E 65 JLT SUBERR give up 66 03130 DC003AD8 67 CALL GETFREBLK get a free block address 03131 41005C00 68 PAR TMPPAGBUF2 address of page 03132 4100644D 69 PAR TMPPAGFBI2 address of FBI 03133 40440005 IMM 70 PARVL FBITSUBS we want substitution block 03134 00023100 71 HALT HALTB3100 we shouldn't run out of space here 03135 E4C05810 3 72 ST R3 TMPPAGBUF(VLSUBSDA) store disk address in volume label 03136 6004644D 0 IMM 73 LD R0 ADR TMPPAGFBI2 R0 -> FBI for subs block 03137 EDC80211 0 ZBM 74 STW R0,FBIWCHK say to write check this block 03138 EDC80411 0 ZBM 75 STW R0,FBINOSUB can not substitute the subs block 03139 DC003CF9 76 CALL PAGOUT write out the subs block 0313A 41005C00 77 PAR TMPPAGBUF2 address of page 0313B 4000644D 78 PARL TMPPAGFBI2 address of FBI 0313C FE0E312E 79 JMP SUBAGN do over if error 80 * \ / 81 82 ********************************************************************************** 83 * Note that the volume has now been altered. The * 84 * 'invalid volume' flag is not set until somewhat later * 85 * in this routine. * 86 * Now we allocate primary and secondary security blocks. * 87 ********************************************************************************** 88 89 * \ / 0313D DC003AD8 90 CALL GETFREBLK get a free block address 0313E 41004000 91 PAR CURSECBUF address of page 0313F 41006400 92 PAR CURSECFBI address of FBI 03140 40440006 IMM 93 PARVL FBITSEC type we want 03141 00023101 94 HALT HALTB3101 we shouldn't run out of space here 03142 E4C05812 3 95 ST R3 TMPPAGBUF(VLSECBDA) and put into volume label 03143 60046400 0 IMM 96 LD R0 ADR CURSECFBI R0 -> FBI for sec block 03144 EDC80211 0 ZBM 97 STW R0,FBIWCHK say to write check this block 03145 EDC80411 0 ZBM 98 STW R0,FBINOSUB can not substitute the subs block 03146 E4C06458 3 99 ST R3 SECBLKDA save this for later reference 100 03147 DC00375B 101 CALL MOVLOGREC move the security block stuff 03148 41004226 102 PAR CURSECBUF(SECTZONE) destination address 03149 40440018 IMM 103 PARVL SECNUMMTU+1-SECTZONE length in words 0314A FE0E3165 104 JMP OUTOFVOL jump if error getting record 105 0314B 60040008 0 IMM 106 LD R0 8 offset to separate secondary sec block 0314C 9800C7F8 0 107 ADDM R0 DSKBLKNUM move up next attempt 0314D DC403AEA 108 CALLNP GETFREADR get a free block address 0314E 00023102 109 HALT HALTB3102 we shouldn't run out of space here 0314F E4C05813 3 110 ST R3 TMPPAGBUF(VLSECB2DA) and put in volume label 03150 E4C06459 3 111 ST R3 SECBLK2DA save this for later reference 03151 EDC0C7F8 112 STW DSKBLKNUM go back and fetch blocks that were skipped 03152 EDC04028 113 STW CURSECBUF(SECIDXSIZ) fix up so divide won't die later 114 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 31 (TRVOLREC) F 17 Volume recovery logic 115 * Ensure the volume is of a revision we can cope with. 03153 60023000 0 IMM 116 LD R0 REVMNTVOL pick up the volume revision code 03154 7800580D 0 117 AND R0 TMPPAGBUF(VLVREV) combine with backed up volume's 03155 FA0C3159 0 118 JNEZ R0 GOODREV jump if we can recover this volume 03156 60023000 0 IMM 119 LD R0 REVMNTVOL pick up the volume revision code 03157 7800580C 0 120 AND R0 TMPPAGBUF(VLAVREV) combine with backed up volume's 03158 FA02318C 0 121 JEQZ R0 BADREV cannot recover this rev level 122 * \ / 123 124 * Mark the volume as invalid, and force it out. 00003159 125 GOODREV LABEL 03159 6000580B 0 126 LD R0 TMPPAGBUF(VLFLAGS) get the flags word 0315A EDCA0210 0 CBM 127 STW R0/VLFLAGINV and mark as invalid 0315B E400580B 0 128 ST R0 TMPPAGBUF(VLFLAGS) and return updated flags 129 * \ / 130 131 ********************************************************************************** 132 * * 133 * The volume we will build might be a different format * 134 * than was backed up. We will write the current rev level * 135 * into the volume label just to be safe. Also note that * 136 * since the FDLRAF field is no longer used we zero it out for * 137 * all files. If this field is ever changed then the file * 138 * recovery code will need to change. * 139 * * 140 ********************************************************************************** 141 142 * \ / 0315C 60021000 0 IMM 143 LD R0 REVVOLUME pick up the volume revision code 0315D E400580C 0 144 ST R0 TMPPAGBUF(VLAVREV) and set as type able to load this 0315E E400580D 0 145 ST R0 TMPPAGBUF(VLVREV) and the current type 146 0315F DC003CF9 147 CALL PAGOUT write out the volume label 03160 41005800 148 PAR TMPPAGBUF address of page 03161 40006442 149 PARL TMPPAGFBI address of FBI 03162 FE0E3171 150 JMP BADVOL jump on error 151 * \ / 03163 19C40001 7 IMM 152 ADD R7 1 return address is P+2 00003164 153 BADRTN LABEL 03164 5D1F8002 6 STAK 154 LEAVE POP 155 * --- 156 157 * We come here if we don't have enough volume info. in the record. 00003165 158 OUTOFVOL LABEL 03165 DC1013F9 @ 159 CALL @VPREPOUT write out a message 03166 40003168 160 PARL VOLRECMSG 03167 FE0E3164 161 JMP BADRTN 162 * --- 03168 20457272 163 VOLRECMSG TEXTZ " Error, volume record too short." 164 165 * We come here when we get an error writing out the volume label. 00003171 166 BADVOL LABEL 03171 DC1013F9 @ 167 CALL @VPREPOUT write out a message 03172 40003174 168 PARL BADVOLMSG 03173 FE0E3164 169 JMP BADRTN 170 * --- 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 32 (TRVOLREC) F 17 Volume recovery logic 03174 20457272 171 BADVOLMSG TEXTZ " Error trying to write volume label." 172 173 * We come here when we get errors writing out the substitution block. 0000317E 174 SUBERR LABEL 0317E DC1013F9 @ 175 CALL @VPREPOUT write out a message 0317F 40003181 176 PARL SUBERRMSG 03180 FE0E3164 177 JMP BADRTN 178 * --- 03181 20457272 179 SUBERRMSG TEXTZ " Error trying to write substitution block." 180 181 * The backed up volume revision level is incompatible with us. 0000318C 182 BADREV LABEL 0318C DC1013F9 @ 183 CALL @VPREPOUT write out a message 0318D 4000318F 184 PARL BADREVMSG 0318E FE0E3164 185 JMP BADRTN 186 * --- 0318F 2043616E 187 BADREVMSG TEXTZ " Cannot recover this revision level volume." 188 BADREV 0000318C F 17 121j 182= BADREVMSG 0000318F F 17 184a 187= BADRTN 00003164 F 17 153= 161j 169j 177j 185j BADVOL 00003171 F 17 150j 166= BADVOLMSG 00003174 F 17 168a 171= +BKUPHDRLEN 00000002 F 17 33 +CURSECBUF 00004000 F 17 91a 102a 113s +CURSECFBI 00006400 F 17 92a 96a +DSKBLKNUM 0000C7F8 F 17 107s 112s ERRCOUNT 00178801 F 17 24= 62s 64s +GETFREADR UUUUUUUU F 17 108 +GETFREBLK UUUUUUUU F 17 67 90 GOODREV 00003159 F 17 118j 125= MAXTRY 00000004 F 17 27= 61 +MOVLOGREC UUUUUUUU F 17 31 54 101 OUTOFVOL 00003165 F 17 34j 57j 104j 158= +PAGOUT UUUUUUUU F 17 76 147 +RCVRVOL 00003115 F 17 21 29= +SECBLK2DA 00006459 F 17 111s +SECBLKDA 00006458 F 17 99s SUBAGN 0000312E F 17 63= 79j SUBERR 0000317E F 17 65j 174= SUBERRMSG 00003181 F 17 176a 179= +TMPOSHDR 0000647C F 17 32a +TMPPAGBUF 00005800 F 17 41a 55a 72s 95s 110s 117 120 126 128s 144s 145s 148a +TMPPAGBUF2 00005C00 F 17 68a 77a +TMPPAGFBI 00006442 F 17 44a 46a 149a +TMPPAGFBI2 0000644D F 17 69a 73a 78a +UPDBOTBLK UUUUUUUU F 17 36 VOLRECMSG 00003168 F 17 160a 163= +VPREPOUT 000013F9 F 17 159 167 175 183 189 END of RCVRVOL 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 33 (TRVOLREC) F 17 Volume recovery logic 191 192 ********************************************************************************** 193 * * 194 * UPDBOTBLK * 195 * * 196 * Update the boot block on this volume. * 197 * * 198 * Call: * 199 * CALLNP UPDBOTBLK * 200 * * 201 * Eats R0:R4. * 202 * * 203 ********************************************************************************** 204 205 BLOCK UPDBOTBLK 206 ENTRY UPDBOTBLK 207 208 BEGFRAME 209 ENDFRAME 210 0319A DD5F8001 6 STAK 211 UPDBOTBLK ENTRNP PUSH 0319B DC00375B 212 CALL MOVLOGREC move the boot info. 0319C 41005800 213 PAR TMPPAGBUF destination address 0319D 40440400 IMM 214 PARVL WPP number of words to move 0319E FE0E31B1 215 JMP BADREC jump if out of record 216 0319F DC00375B 217 CALL MOVLOGREC move the FBI for the boot block 031A0 41006442 218 PAR TMPPAGFBI destination address 031A1 4044000B IMM 219 PARVL FBILNTH number of words to move 031A2 FE0E31B1 220 JMP BADREC jump if out of record 221 031A3 DC003CE1 222 CALL PAGIN read in the boot block 031A4 41005C00 223 PAR TMPPAGBUF2 address of page 031A5 4100644D 224 PAR TMPPAGFBI2 address of FBI 031A6 41440003 IMM 225 PARV FBITBOOT FBI type we expect 031A7 40440002 IMM 226 PARVL BOOTDA ms address to read in 031A8 FE0E31AC 227 JMP DOPLACE jump if can't read boot block 228 * \ / got a good boot block from disk 229 031A9 62005801 01 230 LD2 R0 TMPPAGBUF(BOOTREV) get backed up revision 031AA 6A005C01 01 231 UCPR2 R0 TMPPAGBUF2(BOOTREV) do we need to update this? 031AB FE0A31B0 232 JLE DNTUPD jump if we don't need to 233 * \ / 234 * We have old info. in the boot block, so update it. 000031AC 235 DOPLACE LABEL 031AC DC003CF9 236 CALL PAGOUT write new block 031AD 41005800 237 PAR TMPPAGBUF address of page 031AE 40006442 238 PARL TMPPAGFBI address of FBI 031AF FE0E31BE 239 JMP BADBOT jump on disk error 240 000031B0 241 DNTUPD LABEL 000031B0 242 BADRTN LABEL 031B0 5D1F8001 6 STAK 243 LEAVE POP 244 * --- 245 246 * If we run out of logical record we come here. 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 34 (TRVOLREC) F 17 Volume recovery logic 000031B1 247 BADREC LABEL 031B1 DC1013F9 @ 248 CALL @VPREPOUT write a nasty message 031B2 400031B4 249 PARL BADRECMSG 031B3 FE0E31B0 250 JMP BADRTN 251 * --- 031B4 2052616E 252 BADRECMSG TEXTZ " Ran out of record getting boot info." 253 254 * If we get an error writing the boot block we come here. 000031BE 255 BADBOT LABEL 031BE DC1013F9 @ 256 CALL @VPREPOUT write a nasty message 031BF 400031C1 257 PARL BADBOTMSG 031C0 FE0E31B0 258 JMP BADRTN 259 * --- 031C1 20446973 260 BADBOTMSG TEXTZ " Disk error writing boot block." 261 BADBOT 000031BE F 17 239j 255= BADBOTMSG 000031C1 F 17 257a 260= BADREC 000031B1 F 17 215j 220j 247= BADRECMSG 000031B4 F 17 249a 252= BADRTN 000031B0 F 17 242= 250j 258j DNTUPD 000031B0 F 17 232j 241= DOPLACE 000031AC F 17 227j 235= +MOVLOGREC UUUUUUUU F 17 212 217 +PAGIN UUUUUUUU F 17 222 +PAGOUT UUUUUUUU F 17 236 +TMPPAGBUF 00005800 F 17 213a 230 237a +TMPPAGBUF2 00005C00 F 17 223a 231 +TMPPAGFBI 00006442 F 17 218a 238a +TMPPAGFBI2 0000644D F 17 224a +UPDBOTBLK 0000319A F 17 206 211= +VPREPOUT 000013F9 F 17 248 256 262 END of UPDBOTBLK 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 35 (TRVOLREC) F 17 Volume recovery logic 264 265 ********************************************************************************** 266 * * 267 * FINISHOFF * 268 * * 269 * Once all the accounts and files have been fully * 270 * recovered from the tape this routine will build the new * 271 * ADT tables for the volume, and mark the volume as valid. * 272 * * 273 * Call: * 274 * CALLNP FINISHOFF * 275 * * 276 * Eats R0:R5. * 277 * * 278 ********************************************************************************** 279 280 BLOCK FINISHOFF 281 ENTRY FINISHOFF 282 283 BEGFRAME 284 ENDFRAME 285 031C9 20537461 286 FINMSG TEXTZ " Starting final processing for disk." 031D3 20546170 287 DONEMSG TEXTZ " Taperecover has completed." 288 031DA DD5F8001 6 STAK 289 FINISHOFF ENTRNP PUSH 031DB DC1013F9 @ 290 CALL @VPREPOUT tell the user where we are now 031DC 400031C9 291 PARL FINMSG 292 031DD DC403B3F 293 CALLNP CRTADTOUT create the ADT tables 294 031DE 6200647A 01 295 LD2 R0 CURTIME get the current 44 bit time 031DF E6004229 01 296 ST2 R0 CURSECBUF(SECLASTDT) and put in last known date field 031E0 E6004002 01 297 ST2 R0 CURSECBUF(SECMNTDAT) and put in last mount date field 298 031E1 DC4031FE 299 CALLNP WRITESEC write the security blocks 300 031E2 DC003CE1 301 CALL PAGIN read in the volume label 031E3 41005800 302 PAR TMPPAGBUF address of page 031E4 41006442 303 PAR TMPPAGFBI address of FBI 031E5 41440004 IMM 304 PARV FBITVL type we expect 031E6 40440001 IMM 305 PARVL VOLLABELDA ms address 031E7 FE0E31F1 306 JMP BADVOL jump on disk error 307 031E8 6004580B 0 IMM 308 LD R0 ADR TMPPAGBUF(VLFLAGS) get the flags word 031E9 EC080210 0 ZBM 309 STZ R0,0/VLFLAGINV and clear invalid flag 031EA DC003CF9 310 CALL PAGOUT write out the volume label 031EB 41005800 311 PAR TMPPAGBUF address of page 031EC 40006442 312 PARL TMPPAGFBI address of FBI 031ED FE0E31F1 313 JMP BADVOL jump on disk error 314 031EE DC1013F9 @ 315 CALL @VPREPOUT tell the user we are done 031EF 400031D3 316 PARL DONEMSG 000031F0 317 RETURN LABEL 031F0 5D1F8001 6 STAK 318 LEAVE POP 319 * --- 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 36 (TRVOLREC) F 17 Volume recovery logic 320 321 * We come here if we get an error on the volume label. 000031F1 322 BADVOL LABEL 031F1 DC1013F9 @ 323 CALL @VPREPOUT write out a message 031F2 400031F4 324 PARL BADVOLMSG 031F3 FE0E31F0 325 JMP RETURN return to caller 326 * --- 031F4 20446973 327 BADVOLMSG TEXTZ " Disk error marking volume as valid." 328 BADVOL 000031F1 F 17 306j 313j 322= BADVOLMSG 000031F4 F 17 324a 327= +CRTADTOUT UUUUUUUU F 17 293 +CURSECBUF 00004000 F 17 296s 297s +CURTIME 0000647A F 17 295 DONEMSG 000031D3 F 17 287= 316a +FINISHOFF 000031DA F 17 281 289= FINMSG 000031C9 F 17 286= 291a +PAGIN UUUUUUUU F 17 301 +PAGOUT UUUUUUUU F 17 310 RETURN 000031F0 F 17 317= 325j +TMPPAGBUF 00005800 F 17 302a 308a 311a +TMPPAGFBI 00006442 F 17 303a 312a +VPREPOUT 000013F9 F 17 290 315 323 +WRITESEC UUUUUUUU F 17 299 329 END of FINISHOFF 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 37 (TRVOLREC) F 17 Volume recovery logic 331 332 ********************************************************************************** 333 * * 334 * WRITESEC * 335 * * 336 * Subroutine which writes out both security blocks. * 337 * Call: * 338 * CALLNP WRITESEC * 339 * * 340 * Eats R0:R4 * 341 * * 342 ********************************************************************************** 343 344 BLOCK WRITESEC subroutine 345 346 ENTRY WRITESEC 347 348 BEGFRAME 349 ENDFRAME 350 031FE DD5F8001 6 STAK 351 WRITESEC ENTRNP PUSH 031FF 60046400 0 IMM 352 LD R0 ADR CURSECFBI address of FBI 03200 60406458 1 353 LD R1 SECBLKDA address of primary sec. block 03201 E4481181 1 0 ZBM 354 ST R1 R0,FBIDA and fix disk address in page 03202 DC003CF9 355 CALL PAGOUT write out the security block 03203 41004000 356 PAR CURSECBUF address of page 03204 40006400 357 PARL CURSECFBI address of FBI 03205 FEC00000 358 NOP 0 ignore error 359 03206 60046400 0 IMM 360 LD R0 ADR CURSECFBI address of FBI 03207 60406459 1 361 LD R1 SECBLK2DA address of secondary sec. block 03208 E4481181 1 0 ZBM 362 ST R1 R0,FBIDA and fix disk address in page 03209 DC003CF9 363 CALL PAGOUT write out secondary block 0320A 41004000 364 PAR CURSECBUF address of page 0320B 40006400 365 PARL CURSECFBI address of FBI 0320C FEC00000 366 NOP 0 ignore error 0320D 5D1F8001 6 STAK 367 LEAVE POP 368 * --- 369 +CURSECBUF 00004000 F 17 356a 364a +CURSECFBI 00006400 F 17 352a 357a 360a 365a +PAGOUT UUUUUUUU F 17 355 363 +SECBLK2DA 00006459 F 17 361 +SECBLKDA 00006458 F 17 353 +WRITESEC 000031FE F 17 346 351= 370 END of WRITESEC subroutine 786 INPUT TRACCOUNTREC include the account recover code 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 38 (TRACCOUNTREC) F 18 Account recovery routines 3 4 ********************************************************************************** 5 * * 6 * DOACCT * 7 * * 8 * When we get here we have +BACKUP defined account backup * 9 * info. We will try to recover the account. If the account * 10 * was recovered we will then recover all of his files. * 11 * After we have recovered all of the files we will force * 12 * out the accounts directory structure. When we return we * 13 * will have a new logical record. * 14 * Given that the current record from the tape is account * 15 * recovery info this will recover the account onto the disk. * 16 * Many of the errors that may be encountered recovering the * 17 * account are passed up here. * 18 * If we have found information from another account we will * 19 * build a fake UDIR and recover information into it. * 20 * Note the possible error if a file is backed up with the * 21 * wrong account name. We will create the fake account, then * 22 * later STOP with the duplicate account error. * 23 * * 24 * Call: * 25 * R0 = next logical record type * 26 * CALLNP DOACCT * 27 * R0 = next logical record type * 28 * * 29 * Eats R0:R5. * 30 * * 31 ********************************************************************************** 32 33 BLOCK DOACCT 34 ENTRY DOACCT 35 0320E 20526563 36 ACTMSG TEXTZ " Recovering account \S1\.\R2\" 37 38 BEGFRAME 00178801 6 BASE 39 NXTWRITSIZ BSS 1 size directory must reach before next write 40 ENDFRAME 41 00000064 ABS 42 WRITEINC EQU 100 every 100 blocks write directory 43 03216 DD5F8002 6 STAK 44 DOACCT ENTRNP PUSH 03217 64040004 0 IMM 45 CPR R0 RTYPEACC is this account information? 03218 FE0C3264 46 JNE FAKEACCT make a fake account if not 47 * \ / 48 03219 60046522 0 IMM 49 LD R0 ADR CURHDRBUF point to the current record header 0321A 62160801 010 BASE 50 LD2 R0 R0,ACTHDRSER pick up the serial number 0321B E600647F 01 51 ST2 R0 CURACCTASN and save for all to find 52 0321C DC003AD8 53 CALL GETFREBLK get a free block 0321D 41004C00 54 PAR CURACTBUF address of buffer 0321E 41006421 55 PAR CURACTFBI address of FBI buffer 0321F 40440009 IMM 56 PARVL FBITUDIR1 FBI type we want 03220 FE0E326C 57 JMP OOSACT jump if out of disk space 03221 E4C0647E 3 58 ST R3 CURACTADR remember the UDIR block number 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 39 (TRACCOUNTREC) F 18 Account recovery routines 59 03222 DC00375B 60 CALL MOVLOGREC move the O.S. made header 03223 4100647C 61 PAR TMPOSHDR destination address 03224 40440002 IMM 62 PARVL BKUPHDRLEN length in words 03225 FE0E327F 63 JMP BADREC 64 03226 DC00375B 65 CALL MOVLOGREC move part of the logical record 03227 41004C00 66 PAR CURACTBUF destination for move 03228 40440060 IMM 67 PARVL (UDFDLIST DISPW UD) number of words to move 03229 FE0E327F 68 JMP BADREC jump if not enough logical record 69 0322A 60004C02 0 70 LD R0 CURACTBUF(UDPROJ) pick up extension 0322B 6800303A 0 71 UCPR R0 DOTBTI is this a BTI reserved account? 0322C FE083230 72 JLT NOTBTI jump if not 0322D 600467F0 0 IMM 73 LD R0 ADR PHSTAPBUF get pointer to tape buffer 0322E 5C080012 0 ZBM 74 CMZ R0,PHSNCRYPTD was this record encrypted? 0322F FE02327F 75 JEQ BADREC if not, treat as bad record 00003230 76 NOTBTI LABEL 77 03230 DC1013F9 @ 78 CALL @VPREPOUT tell that we are here 03231 41004C00 79 PAR CURACTBUF(UDACCT) account name 03232 41004C02 80 PAR CURACTBUF(UDPROJ) and extension 03233 4000320E 81 PARL ACTMSG 82 03234 60046421 0 IMM 83 LD R0 ADR CURACTFBI point to the FBI 03235 62404C00 12 84 LD2 R1 CURACTBUF(UDACCT) get the account 03236 E6560805 120 BASE 85 ST2 R1 R0,FBIACCT and put in FBI 03237 60404C02 1 86 LD R1 CURACTBUF(UDPROJ) get the project 03238 E4560807 1 0 BASE 87 ST R1 R0,FBIPROJ and put in FBI 03239 62404C20 12 88 LD2 R1 CURACTBUF(UDSERNO) get the serial number 0323A E6560808 120 BASE 89 ST2 R1 R0,FBISERNO and put in FBI 90 0323B 60044C2B 0 IMM 91 LD R0 ADR CURACTBUF(UDLIMITS) point to the limit block 0323C EDC81188 0 ZBM 92 STW R0,DSKUSD say he has one used disk block 93 0323D EC004C40 94 STZ CURACTBUF(UDAUTHLIST) make sure no pointer left over 0323E 60044C3C 0 IMM 95 LD R0 ADR CURACTBUF(UDSHLLIST) point to share list part 0323F EC080010 0 ZBM 96 STZ R0,0/SHLDSKFLGB make sure no pointer here either 97 03240 60044C00 0 IMM 98 LD R0 ADR CURACTBUF point to the directory 03241 EC08001A 0 ZBM 99 STZ R0,UDTYPE make sure it's small 100 03242 DC403BBB 101 CALLNP ADDACT add the account to this volume 03243 FE0E32A5 102 JMP TABFUL jump if table is full 03244 FE0E3291 103 JMP DUPACT error, duplicate account 03245 FE0E326C 104 JMP OOSACT jump on out of disk space 105 03246 DC4032B4 106 CALLNP RCVRSHL recover a large share list, if one 03247 FE0E326C 107 JMP OOSACT jump on out of disk space 03248 FE0E327F 108 JMP BADREC jump on bad logical record 109 03249 DC4032DB 110 CALLNP RCVRAUTL recover the auth list, if one 0324A FE0E326C 111 JMP OOSACT jump on out of disk space 0324B FE0E327F 112 JMP BADREC jump on bad logical record 113 * \ / 114 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 40 (TRACCOUNTREC) F 18 Account recovery routines 115 * Set expectation to the encrypted flag of the account. 0000324C 116 ERCONTINUE LABEL 0324C 60C04C1F 3 117 LD R3 CURACTBUF/UDSFLAGS get flags word 0324D 5C0AC010 3 CBM 118 CMZ R3/UDENCRFLG test account encrypt flag 119 * (note that 1 sez NOT encrypted) 0324E EC40645E 120 STLEQ EXPECTENC and set the local variable 121 0000324F 122 PRESSON LABEL 0324F DC4037BC 123 CALLNP NXTLOGREC get the next logical record 03250 64040004 0 IMM 124 CPR R0 RTYPEACC is the current record account info? 03251 FE0A3261 125 JLE UPDUDR if so then done here 126 * \ / 127 00003252 128 HAVEACCT LABEL 03252 60040064 0 IMM 129 LD R0 WRITEINC determine when to write the directory 03253 E4178801 0 6 BASE 130 ST R0 SP,NXTWRITSIZ save for later checking 03254 FE0E325C 131 JMP DONTWRITE 132 * --- 133 00003255 134 HAVEFILE LABEL 03255 60044C2B 0 IMM 135 LD R0 ADR CURACTBUF(UDLIMITS) R0 -> limit information 03256 60081188 0 0 ZBM 136 LD R0 R0,DSKUSD get amount of disk space used 03257 64178801 0 6 BASE 137 CPR R0 SP,NXTWRITSIZ time to write the directory? 03258 FE08325C 138 JLT DONTWRITE jump if not 139 * \ / 140 03259 18040064 0 IMM 141 ADD R0 WRITEINC determine when to write next 0325A E4178801 0 6 BASE 142 ST R0 SP,NXTWRITSIZ save for later checking 0325B DC40374E 143 CALLNP WRITEUDIR write the directory 0000325C 144 DONTWRITE LABEL 0325C 6000654E 0 145 LD R0 CURRECTYP get the current record type 0325D DC403356 146 CALLNP DOFILE recover the file 0325E FE0E3264 147 JMP FAKEACCT fake an account 0325F 64040005 0 IMM 148 CPR R0 RTYPEFIL is the current record file info? 03260 FE063255 149 JGE HAVEFILE if so then keep going 150 * \ / 151 152 * All of the current account is recovered. Force out the dir. info. 00003261 153 UPDUDR LABEL 03261 DC40374E 154 CALLNP WRITEUDIR write the directory blocks 00003262 155 NOCLNUP LABEL 03262 6000654E 0 156 LD R0 CURRECTYP get type for record we just got 03263 5D1F8002 6 STAK 157 LEAVE POP 158 * --- 159 160 * We should be recovering an account but do not have an account logical 161 * record. Build a fake account from the available information. 00003264 162 FAKEACCT LABEL 03264 5E00647F 163 CMZ2 CURACCTASN is there a current account? 03265 FE023267 164 JEQ NOCURACCT jump if not 03266 DC40374E 165 CALLNP WRITEUDIR write the current UDIR 00003267 166 NOCURACCT LABEL 03267 DC40330C 167 CALLNP DUMMYACCT build a fake account 03268 FE0E32A5 168 JMP TABFUL IDX is full 03269 FE0E326C 169 JMP OOSACT out of space 0326A FE0E327F 170 JMP BADREC bad record 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 41 (TRACCOUNTREC) F 18 Account recovery routines 0326B FE0E3252 171 JMP HAVEACCT join in with the real guys 172 * --- 173 174 * If we run out of space trying to get a free block we will come here. 0000326C 175 OOSACT LABEL 0326C DC1013F9 @ 176 CALL @VPREPOUT write out a message 0326D 41004C00 177 PAR CURACTBUF(UDACCT) pass the account name 0326E 41004C02 178 PAR CURACTBUF(UDPROJ) and the extension 0326F 40003272 179 PARL OOSACTMSG 03270 DC403A36 180 CALLNP FAKEEND end of this recovery 03271 FE0E3261 181 JMP UPDUDR 182 * --- 03272 204F7574 183 OOSACTMSG TEXTZ " Out of disk space, recovering account \S1\.\R2\." 184 185 * If part of the logical record goes bad we will come here. 0000327F 186 BADREC LABEL 0327F DC1013F9 @ 187 CALL @VPREPOUT tell the guy what happened 03280 41004C00 188 PAR CURACTBUF(UDACCT) pass the account name 03281 41004C02 189 PAR CURACTBUF(UDPROJ) and the extension 03282 40003284 190 PARL BADRECMSG 03283 FE0E324C 191 JMP ERCONTINUE continue after error 192 * --- 03284 20426164 193 BADRECMSG TEXTZ " Bad logical record, recovering account \S1\.\R2\." 194 195 * If the account already exists we will come here and tell the guy. 00003291 196 DUPACT LABEL 03291 DC1013F9 @ 197 CALL @VPREPOUT tell the guy what happened 03292 41004C00 198 PAR CURACTBUF(UDACCT) pass the account name 03293 41004C02 199 PAR CURACTBUF(UDPROJ) and the extension 03294 4000329C 200 PARL DUPACTMSG 03295 00823109 201 STOP HALTB3109 duplicate account found 202 * \ / 203 204 * This code is here in case we want to continue after finding a 205 * duplicate account. 206 * \ / 03296 6000647E 0 207 LD R0 CURACTADR get address we were using 03297 DC403B04 208 CALLNP PUTFREBLK and return the disk space 03298 62804C00 23 209 LD2 R2 CURACTBUF(UDACCT) get the account name 03299 61004C02 4 210 LD R4 CURACTBUF(UDPROJ) and the project 0329A DC403C76 211 CALLNP SETUPACT fetch the UDIR block 0329B FE0E324F 212 JMP PRESSON continue after error 213 * --- 0329C 20416363 214 DUPACTMSG TEXTZ " Account \S1\.\R2\ already exists." 215 216 * If the IDX was full we will come here and print a message. 000032A5 217 TABFUL LABEL 032A5 DC1013F9 @ 218 CALL @VPREPOUT tell the guy what happened 032A6 41004C00 219 PAR CURACTBUF(UDACCT) pass the account name 032A7 41004C02 220 PAR CURACTBUF(UDPROJ) and the extension 032A8 400032AB 221 PARL FULMSG 032A9 DC403A36 222 CALLNP FAKEEND can't add more accounts 032AA FE0E3262 223 JMP NOCLNUP 224 * --- 032AB 20494458 225 FULMSG TEXTZ " IDX full adding account \S1\.\R2\." 226 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 42 (TRACCOUNTREC) F 18 Account recovery routines +ACTHDRSER 00160801 F 18 50 ACTMSG 0000320E F 18 36= 81a +ADDACT UUUUUUUU F 18 101 BADREC 0000327F F 18 63j 68j 75j 108j 112j 170j 186= BADRECMSG 00003284 F 18 190a 193= +BKUPHDRLEN 00000002 F 18 62 +CURACCTASN 0000647F F 18 51s 163 +CURACTADR 0000647E F 18 58s 207 +CURACTBUF 00004C00 F 18 54a 66a 70 79a 80a 84 86 88 91a 94s 95a 98a 117 135a 177a 178a 188a 189a 198a 199a 209 210 219a 220a +CURACTFBI 00006421 F 18 55a 83a +CURHDRBUF 00006522 F 18 49a +CURRECTYP 0000654E F 18 145 156 +DOACCT 00003216 F 18 34 44= +DOFILE UUUUUUUU F 18 146 DONTWRITE 0000325C F 18 131j 138j 144= +DOTBTI 0000303A F 18 71 +DUMMYACCT UUUUUUUU F 18 167 DUPACT 00003291 F 18 103j 196= DUPACTMSG 0000329C F 18 200a 214= ERCONTINUE 0000324C F 18 116= 191j +EXPECTENC 0000645E F 18 120s FAKEACCT 00003264 F 18 46j 147j 162= +FAKEEND UUUUUUUU F 18 180 222 FULMSG 000032AB F 18 221a 225= +GETFREBLK UUUUUUUU F 18 53 HAVEACCT 00003252 F 18 128= 171j HAVEFILE 00003255 F 18 134= 149j +MOVLOGREC UUUUUUUU F 18 60 65 NOCLNUP 00003262 F 18 155= 223j NOCURACCT 00003267 F 18 164j 166= NOTBTI 00003230 F 18 72j 76= +NXTLOGREC UUUUUUUU F 18 123 NXTWRITSIZ 00178801 F 18 39= 130s 137 142s OOSACT 0000326C F 18 57j 104j 107j 111j 169j 175= OOSACTMSG 00003272 F 18 179a 183= +PHSNCRYPTD 00080012 F 18 74 +PHSTAPBUF 000067F0 F 18 73a PRESSON 0000324F F 18 122= 212j +PUTFREBLK UUUUUUUU F 18 208 +RCVRAUTL UUUUUUUU F 18 110 +RCVRSHL UUUUUUUU F 18 106 +RTYPEACC 00000004 F 18 45 124 +RTYPEFIL 00000005 F 18 148 +SETUPACT UUUUUUUU F 18 211 TABFUL 000032A5 F 18 102j 168j 217= +TMPOSHDR 0000647C F 18 61a UPDUDR 00003261 F 18 125j 153= 181j +VPREPOUT 000013F9 F 18 78 176 187 197 218 WRITEINC 00000064 F 18 42= 129 141 +WRITEUDIR UUUUUUUU F 18 143 154 165 227 END of DOACCT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 43 (TRACCOUNTREC) F 18 Account recovery routines 229 230 ********************************************************************************** 231 * * 232 * RCVRSHL * 233 * * 234 * If the O.S. made header said we had an account share * 235 * list that needed a disk block, this will take care of the * 236 * necessary processing to recover the share list. * 237 * * 238 * Call: * 239 * CALLNP RCVRSHL * 240 * JMP * 241 * JMP * 242 * * 243 * Eats R0:R4 * 244 * * 245 ********************************************************************************** 246 247 BLOCK RCVRSHL 248 ENTRY RCVRSHL 249 250 BEGFRAME 00178801 6 BASE 251 TMPDSKADR BSS 1 temp. to remember disk block number 252 ENDFRAME 253 032B4 DD5F8002 6 STAK 254 RCVRSHL ENTRNP PUSH 032B5 6104647C 4 IMM 255 LD R4 ADR TMPOSHDR point to the header 032B6 610900F1 4 4 ZBM 256 LD R4 R4,BKUPHDRW2/FSTBKUPLEN and extract length, if any 032B7 FB0232D3 4 257 JEQZ R4 NOSHL jump if no large list 258 * \ / 032B8 DC003AD8 259 CALL GETFREBLK get a free block address 032B9 41005800 260 PAR TMPPAGBUF address of buffer 032BA 41006442 261 PAR TMPPAGFBI address of FBI 032BB 40440011 IMM 262 PARVL FBITASLB FBI type we want 032BC FE0E32D5 263 JMP OOSRTN jump if out of disk space 032BD E4D78801 3 6 BASE 264 ST R3 SP,TMPDSKADR remember block we just allocated 265 032BE 15040004 4 IMM 266 DIV R4 CPW convert share list length to words 032BF DC00375B 267 CALL MOVLOGREC move the share list to the buffer 032C0 41005800 268 PAR TMPPAGBUF destination address for move 032C1 40530000 4 REG 269 PARVL R4 number of words to move 032C2 FE0E32D4 270 JMP BADREC jump if bad logical record 271 032C3 60046442 0 IMM 272 LD R0 ADR TMPPAGFBI point to new FBI 032C4 62404C00 12 273 LD2 R1 CURACTBUF(UDACCT) get user account 032C5 E6560805 120 BASE 274 ST2 R1 R0,FBIACCT and put in FBI 032C6 60404C02 1 275 LD R1 CURACTBUF(UDPROJ) get user project-division 032C7 E4560807 1 0 BASE 276 ST R1 R0,FBIPROJ and put in FBI 032C8 62404C20 12 277 LD2 R1 CURACTBUF(UDSERNO) get the account serial number 032C9 E6560808 120 BASE 278 ST2 R1 R0,FBISERNO and put in FBI 279 000032CA 280 OUTITAGAIN LABEL 032CA DC003CF9 281 CALL PAGOUT write out the share list 032CB 41005800 282 PAR TMPPAGBUF address of page 032CC 40006442 283 PARL TMPPAGFBI address of FBI 032CD FE0E32D6 284 JMP BADDSK jump on disk error 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 44 (TRACCOUNTREC) F 18 Account recovery routines 285 032CE 60D78801 3 6 BASE 286 LD R3 SP,TMPDSKADR get our new block 032CF EDCAC010 3 CBM 287 STW R3/SHLDSKFLGB say this is a pointer 032D0 E4C04C3C 3 288 ST R3 CURACTBUF(UDSHLLIST) and fix up the UDIR 289 032D1 60044C2B 0 IMM 290 LD R0 ADR CURACTBUF(UDLIMITS) point to the guy's limits 032D2 D0081188 0 ZBM 291 INC R0,DSKUSD and up his disk used by one 292 000032D3 293 NOSHL LABEL 032D3 19C40001 7 IMM 294 ADD R7 1 return to P+2 000032D4 295 BADREC LABEL 032D4 19C40001 7 IMM 296 ADD R7 1 return to P+1 000032D5 297 OOSRTN LABEL 032D5 5D1F8002 6 STAK 298 LEAVE POP 299 * --- 300 000032D6 301 BADDSK LABEL 032D6 DC403AEA 302 CALLNP GETFREADR get a different address to use 032D7 E4D78801 3 6 BASE 303 ST R3 SP,TMPDSKADR save for later 032D8 60046442 0 IMM 304 LD R0 ADR TMPPAGFBI R0 -> FBI 032D9 E4C81181 3 0 ZBM 305 ST R3 R0,FBIDA set address in the FBI 032DA FE0E32CA 306 JMP OUTITAGAIN out it again 307 * --- 308 BADDSK 000032D6 F 18 284j 301= BADREC 000032D4 F 18 270j 295= +BKUPHDRW2 00160801 F 18 256 +CURACTBUF 00004C00 F 18 273 275 277 288s 290a +FSTBKUPLEN 000000F0 F 18 256 +GETFREADR UUUUUUUU F 18 302 +GETFREBLK UUUUUUUU F 18 259 +MOVLOGREC UUUUUUUU F 18 267 NOSHL 000032D3 F 18 257j 293= OOSRTN 000032D5 F 18 263j 297= OUTITAGAIN 000032CA F 18 280= 306j +PAGOUT UUUUUUUU F 18 281 +RCVRSHL 000032B4 F 18 248 254= TMPDSKADR 00178801 F 18 251= 264s 286 303s +TMPOSHDR 0000647C F 18 255a +TMPPAGBUF 00005800 F 18 260a 268a 282a +TMPPAGFBI 00006442 F 18 261a 272a 283a 304a 309 END of RCVRSHL 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 45 (TRACCOUNTREC) F 18 Account recovery routines 311 312 ********************************************************************************** 313 * * 314 * RCVRAUTL * 315 * * 316 * If the current account we are recovering has an auth. * 317 * list this routine will take care of its recovery. * 318 * * 319 * Call: * 320 * CALLNP RCVRAUTL * 321 * JMP * 322 * JMP * 323 * * 324 * Eats R0:R4. * 325 * * 326 ********************************************************************************** 327 328 BLOCK RCVRAUTL 329 ENTRY RCVRAUTL 330 331 BEGFRAME 00178801 6 BASE 332 TMPDSKADR BSS 1 temp. to hold our new block number 333 ENDFRAME 334 032DB DD5F8002 6 STAK 335 RCVRAUTL ENTRNP PUSH 032DC 6104647C 4 IMM 336 LD R4 ADR TMPOSHDR point to the header 032DD 61091F11 4 4 ZBM 337 LD R4 R4,BKUPHDRW2/SNDBKUPLEN extract length, if any 032DE FB0232F9 4 338 JEQZ R4 NOAUT jump if no large list 339 * \ / 340 032DF DC003AD8 341 CALL GETFREBLK get a free block 032E0 41005800 342 PAR TMPPAGBUF address for free page 032E1 41006442 343 PAR TMPPAGFBI address for FBI 032E2 40440015 IMM 344 PARVL FBITAUTLB FBI type we want 032E3 FE0E32FB 345 JMP OOSRTN jump if out of disk space 346 032E4 E4D78801 3 6 BASE 347 ST R3 SP,TMPDSKADR remember the block we allocated 348 032E5 15040004 4 IMM 349 DIV R4 CPW convert auth list length to words 032E6 DC00375B 350 CALL MOVLOGREC move part of logical record 032E7 41005800 351 PAR TMPPAGBUF address of destination 032E8 40530000 4 REG 352 PARVL R4 number of words to move 032E9 FE0E32FA 353 JMP BADREC jump if ran out of logical record 354 032EA 60046442 0 IMM 355 LD R0 ADR TMPPAGFBI point to new FBI 032EB 62404C00 12 356 LD2 R1 CURACTBUF(UDACCT) get user account 032EC E6560805 120 BASE 357 ST2 R1 R0,FBIACCT and put in FBI 032ED 60404C02 1 358 LD R1 CURACTBUF(UDPROJ) get user project-division 032EE E4560807 1 0 BASE 359 ST R1 R0,FBIPROJ and put in FBI 032EF 62404C20 12 360 LD2 R1 CURACTBUF(UDSERNO) get the account serial number 032F0 E6560808 120 BASE 361 ST2 R1 R0,FBISERNO and put in FBI 362 000032F1 363 OUTITAGAIN LABEL 032F1 DC003CF9 364 CALL PAGOUT write out the authlist 032F2 41005800 365 PAR TMPPAGBUF address of page 032F3 40006442 366 PARL TMPPAGFBI address of FBI 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 46 (TRACCOUNTREC) F 18 Account recovery routines 032F4 FE0E32FC 367 JMP BADDSK jump if disk error 368 032F5 60D78801 3 6 BASE 369 LD R3 SP,TMPDSKADR get the block that we allocated 032F6 E4C04C40 3 370 ST R3 CURACTBUF(UDAUTHLIST) and fix up UDIR 371 032F7 60044C2B 0 IMM 372 LD R0 ADR CURACTBUF(UDLIMITS) point to his limits 032F8 D0081188 0 ZBM 373 INC R0,DSKUSD and up his used by one 374 000032F9 375 NOAUT LABEL 032F9 19C40001 7 IMM 376 ADD R7 1 return will be P+2 000032FA 377 BADREC LABEL 032FA 19C40001 7 IMM 378 ADD R7 1 return will be P+1 000032FB 379 OOSRTN LABEL 032FB 5D1F8002 6 STAK 380 LEAVE POP 381 * --- 382 000032FC 383 BADDSK LABEL 032FC DC403AEA 384 CALLNP GETFREADR get a different address to use 032FD E4D78801 3 6 BASE 385 ST R3 SP,TMPDSKADR save for later 032FE 60046442 0 IMM 386 LD R0 ADR TMPPAGFBI R0 -> FBI 032FF E4C81181 3 0 ZBM 387 ST R3 R0,FBIDA set address in the FBI 03300 FE0E32F1 388 JMP OUTITAGAIN out it again 389 * --- 390 391 BADDSK 000032FC F 18 367j 383= BADREC 000032FA F 18 353j 377= +BKUPHDRW2 00160801 F 18 337 +CURACTBUF 00004C00 F 18 356 358 360 370s 372a +GETFREADR UUUUUUUU F 18 384 +GETFREBLK UUUUUUUU F 18 341 +MOVLOGREC UUUUUUUU F 18 350 NOAUT 000032F9 F 18 338j 375= OOSRTN 000032FB F 18 345j 379= OUTITAGAIN 000032F1 F 18 363= 388j +PAGOUT UUUUUUUU F 18 364 +RCVRAUTL 000032DB F 18 329 335= +SNDBKUPLEN 00001F10 F 18 337 TMPDSKADR 00178801 F 18 332= 347s 369 385s +TMPOSHDR 0000647C F 18 336a +TMPPAGBUF 00005800 F 18 342a 351a 365a +TMPPAGFBI 00006442 F 18 343a 355a 366a 386a 392 END RCVRAUTL 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 47 (TRACCOUNTREC) F 18 Account recovery routines 394 395 ********************************************************************************** 396 * * 397 * DUMMYACCT * 398 * * 399 * If we have determined that an account record got lost * 400 * this subroutine will take the current logical record and * 401 * build an account based upon its contents. * 402 * Call: * 403 * CALLNP DUMMYACCT * 404 * JMP IDX full * 405 * JMP out of space * 406 * JMP bad record * 407 * * 408 * Eats R0:R5 * 409 * * 410 ********************************************************************************** 411 412 BLOCK DUMMYACCT subroutine 413 414 ENTRY DUMMYACCT 415 416 BEGFRAME 417 ENDFRAME 418 03301 20416363 419 BADACTMSG TEXTZ " Account information lost for \S1\.\R2\." 420 0330C DD5F8001 6 STAK 421 DUMMYACCT ENTRNP PUSH 0330D DC003AD8 422 CALL GETFREBLK get a free block 0330E 41004C00 423 PAR CURACTBUF address of buffer 0330F 41006421 424 PAR CURACTFBI address of FBI buffer 03310 40440009 IMM 425 PARVL FBITUDIR1 FBI type we want 03311 FE0E334E 426 JMP OOSRTN jump if out of disk space 03312 E4C0647E 3 427 ST R3 CURACTADR remember the UDIR block number 428 03313 60846522 2 IMM 429 LD R2 ADR CURHDRBUF R2 -> current logical header 03314 60089650 0 2 ZBM 430 LD R0 R2,LOGRECTYP pick up the type of record 03315 64040005 0 IMM 431 CPR R0 RTYPEFIL is it a file type? 03316 FE02331A 432 JEQ HAVEFILE jump if so 03317 64040006 0 IMM 433 CPR R0 RTYPEFP is it file data pages? 03318 FE023327 434 JEQ HAVEDATA jump if so 03319 0002310B 435 HALT HALTB310B should not be here 436 * --- 437 438 * The current logical record is a file record so we have a 439 * tapestring from which we can extract the account name. 440 * (See, aren't tapestrings wonderful?!?!?!) 0000331A 441 HAVEFILE LABEL 0331A 6000303B 0 442 LD R0 TAPSTRPTR point to the beginning of the string 0331B 6044000D 1 IMM 443 LD R1 13 length of the string 0331C DA1C083A 0 1 444 SRCHI R0 R1 ":" move past the volume name 0331D FE0C334F 445 JNE BADREC jump if not found 446 * \ / 447 0331E 61120000 4 0 REG 448 LD R4 R0 copy the pointer 0331F D0930000 4 REG 449 INCP R4 point to the start of the account name 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 48 (TRACCOUNTREC) F 18 Account recovery routines 03320 60C40000 3 IMM 450 LD R3 0 say no default extension 03321 6144653B 5 IMM 451 LD R5 ADR BZFPROT and point to the result block 03322 DC5013F6 @ 452 CALLNP @VFETCHFNM pack up the file name 03323 FA08334F 0 453 JLTZ R0 BADREC jump on any error 03324 62006540 01 454 LD2 R0 BZFACT fetch up the account name 03325 60806542 2 455 LD R2 BZFPRJ and the project 03326 FE0E3335 456 JMP HAVENAME we now have the name 457 * --- 458 459 * The current logical record contains file data pages. We 460 * must pick up the first data page in order to extract the 461 * account name from the FBI. 00003327 462 HAVEDATA LABEL 03327 DC403481 463 CALLNP INITFPAGES do some initialization 03328 FE0E334F 464 JMP BADREC should not happen 03329 FE0E334F 465 JMP BADREC should not happen 0332A DC00378B 466 CALL MOVEFP move in the file page 0332B 40005400 467 PARL CURFILBUF move it here 0332C FE0E334F 468 JMP BADREC bad record 0332D DC00375B 469 CALL MOVLOGREC get the FBI 0332E 41006437 470 PAR CURFILFBI where we want it 0332F 4044000B IMM 471 PARVL FBILNTH amount to move 03330 FE0E334F 472 JMP BADREC 03331 EDC06555 473 STW HAVEPAGE mark that we have the page 03332 60C46437 3 IMM 474 LD R3 ADR CURFILFBI R3 -> current FBI 03333 6216C805 013 BASE 475 LD2 R0 R3,FBIACCT pick up the account 03334 6096C807 2 3 BASE 476 LD R2 R3,FBIPROJ get the project 477 * \ / 478 479 * R0,R1 = account name, R2 = project 00003335 480 HAVENAME LABEL 03335 E6004C00 01 481 ST2 R0 CURACTBUF(UDACCT) set the account name 03336 E4804C02 2 482 ST R2 CURACTBUF(UDPROJ) set the project 03337 60C46421 3 IMM 483 LD R3 ADR CURACTFBI R3 -> the FBI 03338 E616C805 013 BASE 484 ST2 R0 R3,FBIACCT set the account into the FBI 03339 E496C807 2 3 BASE 485 ST R2 R3,FBIPROJ and the project, too 0333A 60846522 2 IMM 486 LD R2 ADR CURHDRBUF point to the current header 0333B 62168801 012 BASE 487 LD2 R0 R2,FILHDRASER pick up the account serial number 488 * Note that both the file and data 489 * records have the ASN in the same location 0333C E616C808 013 BASE 490 ST2 R0 R3,FBISERNO FBI gets this 0333D E600647F 01 491 ST2 R0 CURACCTASN save the current account serial number 0333E EC004C03 492 STZ CURACTBUF(UDPASS) make first part of password zero 0333F D1404C04 493 STMW CURACTBUF(UDPASS)(1) and second half all ones 494 03340 DC403BBB 495 CALLNP ADDACT add account to this volume 03341 FE0E334D 496 JMP TABFUL 03342 FE0E3350 497 JMP DUPACT 03343 FE0E334E 498 JMP OOSRTN out of space 499 03344 DC1013F9 @ 500 CALL @VPREPOUT tell user what is happening 03345 41004C00 501 PAR CURACTBUF(UDACCT) account name 03346 41004C02 502 PAR CURACTBUF(UDPROJ) project 03347 40003301 503 PARL BADACTMSG the message 504 03348 60844C00 2 IMM 505 LD R2 ADR CURACTBUF R2 -> UDIR 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 49 (TRACCOUNTREC) F 18 Account recovery routines 03349 60030000 0 IMM 506 LD R0 1*UDENCRFLG flag to say not encrypted 0334A E4004C1F 0 507 ST R0 CURACTBUF(UDSFLAGS) 0334B EC00645E 508 STZ EXPECTENC say not expecting encryption 509 * note that this way we just rely on the 510 * encryption flag in the physical record. 511 * this means that it is just barely 512 * possible that someone could spoof 513 * the security checks. 0000334C 514 RETURN LABEL 0334C 19C40001 7 IMM 515 ADD R7 1 0000334D 516 TABFUL LABEL 0334D 19C40001 7 IMM 517 ADD R7 1 0000334E 518 OOSRTN LABEL 0334E 19C40001 7 IMM 519 ADD R7 1 0000334F 520 BADREC LABEL 0334F 5D1F8001 6 STAK 521 LEAVE POP 522 * --- 523 524 * The account we are here to fake already exists. Read its UDIR 525 * and continue recovering it. 00003350 526 DUPACT LABEL 03350 6000647E 0 527 LD R0 CURACTADR get address we were using 03351 DC403B04 528 CALLNP PUTFREBLK and return the disk space 03352 62804C00 23 529 LD2 R2 CURACTBUF(UDACCT) get the account name 03353 61004C02 4 530 LD R4 CURACTBUF(UDPROJ) and the project 03354 DC403C76 531 CALLNP SETUPACT fetch the UDIR block 03355 FE0E334C 532 JMP RETURN 533 * --- 534 +ADDACT UUUUUUUU F 18 495 BADACTMSG 00003301 F 18 419= 503a BADREC 0000334F F 18 445j 453j 464j 465j 468j 472j 520= +BZFACT 00006540 F 18 454 +BZFPRJ 00006542 F 18 455 +BZFPROT 0000653B F 18 451a +CURACCTASN 0000647F F 18 491s +CURACTADR 0000647E F 18 427s 527 +CURACTBUF 00004C00 F 18 423a 481s 482s 492s 493s 501a 502a 505a 507s 529 530 +CURACTFBI 00006421 F 18 424a 483a +CURFILBUF 00005400 F 18 467a +CURFILFBI 00006437 F 18 470a 474a +CURHDRBUF 00006522 F 18 429a 486a +DUMMYACCT 0000330C F 18 414 421= DUPACT 00003350 F 18 497j 526= +EXPECTENC 0000645E F 18 508s +FILHDRASER 00160801 F 18 487 +GETFREBLK UUUUUUUU F 18 422 HAVEDATA 00003327 F 18 434j 462= HAVEFILE 0000331A F 18 432j 441= HAVENAME 00003335 F 18 456j 480= +HAVEPAGE 00006555 F 18 473s +INITFPAGES UUUUUUUU F 18 463 +LOGRECTYP 00081650 F 18 430 +MOVEFP UUUUUUUU F 18 466 +MOVLOGREC UUUUUUUU F 18 469 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 50 (TRACCOUNTREC) F 18 Account recovery routines OOSRTN 0000334E F 18 426j 498j 518= +PUTFREBLK UUUUUUUU F 18 528 RETURN 0000334C F 18 514= 532j +RTYPEFIL 00000005 F 18 431 +RTYPEFP 00000006 F 18 433 +SETUPACT UUUUUUUU F 18 531 TABFUL 0000334D F 18 496j 516= +TAPSTRPTR 0000303B F 18 442 +VFETCHFNM 000013F6 F 18 452 +VPREPOUT 000013F9 F 18 500 535 END of DUMMYACCT subroutine 787 INPUT TRFILEREC get in file recovery processor 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 51 (TRFILEREC) F 19 File recovery routines 3 4 ********************************************************************************** 5 * * 6 * DOFILE * 7 * * 8 * When we get here we have file backup info to recover. * 9 * We will recover the file and do any of its data until we * 10 * come to a logical record other than this file's data. When * 11 * we return we will have a new logical record. * 12 * This routine will see if: * 13 * - The file is not out of sequence, and not busy, in * 14 * which case we will just recover the file. * 15 * - The file is busy, and not out of sequence, in which * 16 * case we will remember the name of it for later * 17 * - The file is not busy, and out of sequence, in which * 18 * case we will get the guy's UDIR1 block back in and * 19 * recover the file * 20 * - If we had any trouble recovering the file we will * 21 * mark the file as a ghost. * 22 * * 23 * Call: * 24 * CALLNP DOFILE * 25 * JMP * 26 * R0 = logical record type of next record * 27 * * 28 * Eats R0:R4. * 29 * * 30 ********************************************************************************** 31 32 BLOCK DOFILE 33 ENTRY DOFILE 34 35 BEGFRAME 36 ENDFRAME 37 03356 DD5F8001 6 STAK 38 DOFILE ENTRNP PUSH 03357 EC00654D 39 STZ NUMBFP indicate no file pages yet 03358 EC006556 40 STZ DATALOST no lost data 03359 64040005 0 IMM 41 CPR R0 RTYPEFIL is the next record a file record? 0335A FE043374 42 JGT FAKEFILE if greater than then fake file info 0335B FE08336D 43 JLT RETURN out of here if less than 44 * \ / 0335C EC006499 45 STZ CURFDEPTR say there is no current file 0335D EE00649F 46 STZ2 CURFILNAM say no name 0335E EC0064A1 47 STZ CURFILEXT and no extension 0335F 60046522 0 IMM 48 LD R0 ADR CURHDRBUF point to the logical record header 03360 5C080210 0 ZBM 49 CMZ R0,LOGRECBZY does the header say it was busy? 03361 FE0C3379 50 JNE BUSYFILE jump if so 51 * \ / 03362 5C080010 0 ZBM 52 CMZ R0,LOGRECOSQ does the header say it's out of sequence? 03363 FE0C337D 53 JNE OUTOFSEQ treat different if so 54 * \ / 03364 60846522 2 IMM 55 LD R2 ADR CURHDRBUF R2 -> current record header 03365 6200647F 01 56 LD2 R0 CURACCTASN pick up the current account serial number 03366 FA123370 01 57 JEQZ2 R0 SETACCTASN go set the serial number if none yet 03367 6A168801 012 BASE 58 UCPR2 R0 R2,FILHDRASER see if they match 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 52 (TRFILEREC) F 19 File recovery routines 03368 FE0C336E 59 JNE NEWACCT jump if need a new account 60 * \ / 61 00003369 62 RECOVERIT LABEL 03369 DC4033C2 63 CALLNP RCVRFIL recover the file 0336A FE0E3381 64 JMP OOSRETURN jump if out of disk space 0336B FE0E33A3 65 JMP LOSTAPREC jump on tape error 0336C FE0E33AF 66 JMP ADISKERR jump on disk error 67 * \ / 68 0000336D 69 RETURN LABEL 0336D 19C40001 7 IMM 70 ADD R7 1 go to the skip return 0000336E 71 NEWACCT LABEL 0336E 6000654E 0 72 LD R0 CURRECTYP get the current record type 0336F 5D1F8001 6 STAK 73 LEAVE POP 74 * --- 75 76 * We set up the current account serial number iff 77 * it was not previously set. 00003370 78 SETACCTASN LABEL 03370 62168801 012 BASE 79 LD2 R0 R2,FILHDRASER pick up the serial number 03371 E600647F 01 80 ST2 R0 CURACCTASN and set it 03372 E6004C20 01 81 ST2 R0 CURACTBUF(UDSERNO) set in the directory 03373 FE0E3369 82 JMP RECOVERIT 83 * --- 84 85 * We have found file pages without a leading file logical record. 00003374 86 FAKEFILE LABEL 03374 DC4035E0 87 CALLNP DUMMYFILE build a dummy file 03375 FE0E3381 88 JMP OOSRETURN out of disk space 03376 FE0E33A3 89 JMP LOSTAPREC bad record 03377 FE0E33AF 90 JMP ADISKERR bad disk 03378 FE0E336D 91 JMP RETURN 92 * --- 93 00003379 94 BUSYFILE LABEL 03379 DC403CAA 95 CALLNP ADDBZYLST add this busy file to our list 0337A FE0E33A3 96 JMP LOSTAPREC jump if error 0337B DC4037BC 97 CALLNP NXTLOGREC pick up the next logical record 0337C FE0E336D 98 JMP RETURN all done with this file 99 * --- 100 101 ********************************************************************************** 102 * * 103 * An out of sequence file has been found. Write out the * 104 * current directory, find the new directory, and then go to * 105 * the normal code to recover the file. * 106 * * 107 ********************************************************************************** 108 0000337D 109 OUTOFSEQ LABEL 0337D DC40374E 110 CALLNP WRITEUDIR write the current UDIR blocks 111 0337E DC403647 112 CALLNP LOOKUPACT get the guy's UDIR1 block back in 0337F FE0E33A3 113 JMP LOSTAPREC jump if tape error 03380 FE0E3369 114 JMP RECOVERIT now recover the file 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 53 (TRFILEREC) F 19 File recovery routines 115 * --- 116 117 118 * We come here if we run out of free disk space. 00003381 119 OOSRETURN LABEL 03381 DC1013F9 @ 120 CALL @VPREPOUT write a message 03382 41004C00 121 PAR CURACTBUF(UDACCT) pass account name 03383 41004C02 122 PAR CURACTBUF(UDPROJ) and extension 03384 4100649F 123 PAR CURFILNAM pass file name 03385 410064A1 124 PAR CURFILEXT and its extension 03386 40003389 125 PARL OOSMSG 03387 DC403A36 126 CALLNP FAKEEND nothing to recover files onto 03388 FE0E336D 127 JMP RETURN 128 * --- 03389 204F7574 129 OOSMSG TEXTZ " Out of free space recovering file \S1\.\R2\:\S3\.\R4\." 130 03397 20426164 131 BADRECMSG TEXTZ " Bad logical record, file \S1\.\R2\:\S3\.\R4\." 132 133 * We will come here if the logical record goes bad. 000033A3 134 LOSTAPREC LABEL 033A3 DC1013F9 @ 135 CALL @VPREPOUT write a message 033A4 41004C00 136 PAR CURACTBUF(UDACCT) pass account name 033A5 41004C02 137 PAR CURACTBUF(UDPROJ) and extension 033A6 4100649F 138 PAR CURFILNAM pass file name 033A7 410064A1 139 PAR CURFILEXT and its extension 033A8 40003397 140 PARL BADRECMSG 033A9 DC403916 141 CALLNP PRNTPHYS print physical record number 142 * \ / 143 000033AA 144 ERPROCDN LABEL get back in sync with tape data 033AA EC00654D 145 STZ NUMBFP no more file pages 000033AB 146 NXTONE LABEL 033AB DC4037BC 147 CALLNP NXTLOGREC get the next logical record 033AC 64040006 0 IMM 148 CPR R0 RTYPEFP is it file data? 033AD FE0C336D 149 JNE RETURN jump if not 033AE FE0E33AB 150 JMP NXTONE check the next record type 151 * --- 152 153 * We will come here if we get a disk error. 000033AF 154 ADISKERR LABEL 033AF DC1013F9 @ 155 CALL @VPREPOUT write out a message 033B0 41004C00 156 PAR CURACTBUF(UDACCT) pass account name 033B1 41004C02 157 PAR CURACTBUF(UDPROJ) and extension 033B2 4100649F 158 PAR CURFILNAM pass file name 033B3 410064A1 159 PAR CURFILEXT and its extension 033B4 400033B6 160 PARL BADDSKMSG 033B5 FE0E33AA 161 JMP ERPROCDN clean things up 162 * --- 033B6 20446973 163 BADDSKMSG TEXTZ " Disk error writing file \S1\.\R2\:\S3\.\R4\." 164 +ADDBZYLST UUUUUUUU F 19 95 ADISKERR 000033AF F 19 66j 90j 154= BADDSKMSG 000033B6 F 19 160a 163= BADRECMSG 00003397 F 19 131= 140a BUSYFILE 00003379 F 19 50j 94= +CURACCTASN 0000647F F 19 56 80s 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 54 (TRFILEREC) F 19 File recovery routines +CURACTBUF 00004C00 F 19 81s 121a 122a 136a 137a 156a 157a +CURFDEPTR 00006499 F 19 45s +CURFILEXT 000064A1 F 19 47s 124a 139a 159a +CURFILNAM 0000649F F 19 46s 123a 138a 158a +CURHDRBUF 00006522 F 19 48a 55a +CURRECTYP 0000654E F 19 72 +DATALOST 00006556 F 19 40s +DOFILE 00003356 F 19 33 38= +DUMMYFILE UUUUUUUU F 19 87 ERPROCDN 000033AA F 19 144= 161j +FAKEEND UUUUUUUU F 19 126 FAKEFILE 00003374 F 19 42j 86= +FILHDRASER 00160801 F 19 58 79 +LOGRECBZY 00080210 F 19 49 +LOGRECOSQ 00080010 F 19 52 +LOOKUPACT UUUUUUUU F 19 112 LOSTAPREC 000033A3 F 19 65j 89j 96j 113j 134= NEWACCT 0000336E F 19 59j 71= +NUMBFP 0000654D F 19 39s 145s +NXTLOGREC UUUUUUUU F 19 97 147 NXTONE 000033AB F 19 146= 150j OOSMSG 00003389 F 19 125a 129= OOSRETURN 00003381 F 19 64j 88j 119= OUTOFSEQ 0000337D F 19 53j 109= +PRNTPHYS UUUUUUUU F 19 141 +RCVRFIL UUUUUUUU F 19 63 RECOVERIT 00003369 F 19 62= 82j 114j RETURN 0000336D F 19 43j 69= 91j 98j 127j 149j +RTYPEFIL 00000005 F 19 41 +RTYPEFP 00000006 F 19 148 SETACCTASN 00003370 F 19 57j 78= +VPREPOUT 000013F9 F 19 120 135 155 +WRITEUDIR UUUUUUUU F 19 110 165 END of DOFILE 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 55 (TRFILEREC) F 19 File recovery routines 167 168 ********************************************************************************** 169 * * 170 * RCVRFIL * 171 * * 172 * Given that the current record from the tape is file * 173 * recovery information this routine will recover the file * 174 * directory entry, find its insert location in the directory * 175 * and recover any share list. * 176 * Here we allocate the first block for a CCB for a code * 177 * file and recover the CCB information. We also perform a * 178 * few other initialization tasks, then move the FDE into the * 179 * directory and call the appropriate routine to recover any * 180 * file pages. * 181 * * 182 * Call: * 183 * CALLNP RCVRFIL * 184 * * 185 * * 186 * * 187 * * 188 * * 189 * Eats R0:R5. * 190 * * 191 ********************************************************************************** 192 193 BLOCK RCVRFIL 194 ENTRY RCVRFIL 195 196 BEGFRAME 197 ENDFRAME 198 033C2 DD5F8001 6 STAK 199 RCVRFIL ENTRNP PUSH 033C3 DC00375B 200 CALL MOVLOGREC move the OS made header 033C4 4100647C 201 PAR TMPOSHDR destination address 033C5 40440002 IMM 202 PARVL BKUPHDRLEN words to move 033C6 FE0E340F 203 JMP LOGRECBAD jump if bad record 204 033C7 DC00375B 205 CALL MOVLOGREC move the FDE from the record 033C8 41006481 206 PAR TMPFDEBUF destination address 033C9 40440018 IMM 207 PARVL FDLNTH words to move 033CA FE0E340F 208 JMP LOGRECBAD jump if bad record 209 033CB 61046481 4 IMM 210 LD R4 ADR TMPFDEBUF point to the temporary FDE 033CC 60C92A60 3 4 ZBM 211 LD R3 R4,FDET get the type 033CD 68C40010 3 IMM 212 UCPR R3 HTYPELAST is it legal? 033CE FE04340F 213 JGT LOGRECBAD if not, give error 214 * \ / 033CF EDC93610 4 ZBM 215 STW R4,FDGHOST say no data recovered yet 033D0 EC092810 4 ZBM 216 STZ R4,FDLRAF not a large raf 033D1 EC093C20 4 ZBM 217 STZ R4,FDRAFTYPE start with an empty RAF 033D2 EC092210 4 ZBM 218 STZ R4,FDRFB say not recovered from backup 033D3 EC092610 4 ZBM 219 STZ R4,FDFWWSC clear WWC flag 033D4 EC091186 4 ZBM 220 STZ R4,FDLEN say it's empty 033D5 EC091185 4 ZBM 221 STZ R4,FDDA no disk address associated yet 033D6 6217080A 014 BASE 222 LD2 R0 R4,FDSERNO get the file serial number 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 56 (TRFILEREC) F 19 File recovery routines 033D7 E600649D 01 223 ST2 R0 CURFILSN and remember for later 033D8 62170802 014 BASE 224 LD2 R0 R4,FDNAME get the file name 033D9 E600649F 01 225 ST2 R0 CURFILNAM and remember for later 033DA 60970804 2 4 BASE 226 LD R2 R4,FDEXTEN and the extension 033DB E48064A1 2 227 ST R2 CURFILEXT and remember this also 228 033DC DC403439 229 CALLNP DOFILSHL recover large share list, if one 033DD FE0E3410 230 JMP OOSPRTN jump if no free disk space 033DE FE0E340F 231 JMP LOGRECBAD jump if logical record is bad 232 * \ / 033DF 61046481 4 IMM 233 LD R4 ADR TMPFDEBUF point to the temporary FDE 033E0 60C92A60 3 4 ZBM 234 LD R3 R4,FDET get the type 033E1 64C40003 3 IMM 235 CPR R3 HTYPECODE is it a CODE? 033E2 FE0C33FF 236 JNE COMMON jump if not 237 * \ / special processing here only for code 238 033E3 DC003AD8 239 CALL GETFREBLK get a free block 033E4 41005800 240 PAR TMPPAGBUF address of page 033E5 41006442 241 PAR TMPPAGFBI address of FBI 033E6 40440013 IMM 242 PARVL FBITCCB type we want 033E7 FE0E3410 243 JMP OOSPRTN jump on out of space 033E8 E4C0649C 3 244 ST R3 CURFILADR save block number fetched 245 033E9 60846442 2 IMM 246 LD R2 ADR TMPPAGFBI point to the new FBI 033EA 62004C00 01 247 LD2 R0 CURACTBUF(UDACCT) get the account name 033EB E6168805 012 BASE 248 ST2 R0 R2,FBIACCT and put in FBI 033EC 60004C02 0 249 LD R0 CURACTBUF(UDPROJ) get the division-project 033ED E4168807 0 2 BASE 250 ST R0 R2,FBIPROJ and put in FBI 033EE 6200649D 01 251 LD2 R0 CURFILSN get the file serial number 033EF E6168808 012 BASE 252 ST2 R0 R2,FBISERNO and fix up FBI 253 033F0 61046481 4 IMM 254 LD R4 ADR TMPFDEBUF point to the FDE 033F1 60040002 0 IMM 255 LD R0 RAFTSMALL 033F2 E4093C20 0 4 ZBM 256 ST R0 R4,FDRAFTYPE a code file is actually a small RAF 033F3 E4C91185 3 4 ZBM 257 ST R3 R4,FDDA make current addr start of the file 258 033F4 D0091186 4 ZBM 259 INC R4,FDLEN one more block used by this file 033F5 60844C2B 2 IMM 260 LD R2 ADR CURACTBUF(UDLIMITS) point to his limits 033F6 D0089188 2 ZBM 261 INC R2,DSKUSD and up disk used 262 033F7 DC00375B 263 CALL MOVLOGREC move the CCB 033F8 41005BE8 264 PAR TMPPAGBUF(CCBINFO) destination address 033F9 40440018 IMM 265 PARVL CCBINFOL words to move 033FA FE0E340F 266 JMP LOGRECBAD jump on error 267 033FB DC003CF9 268 CALL PAGOUT write out the new page 033FC 41005800 269 PAR TMPPAGBUF address of page 033FD 40006442 270 PARL TMPPAGFBI address of FBI 033FE FE0E340E 271 JMP BADDISK jump on disk error 272 * \ / 000033FF 273 COMMON LABEL 033FF DC403669 274 CALLNP FNDDIRENT look for the file in the directory 03400 FE0E340E 275 JMP BADDISK jump on disk error 03401 FE023423 276 JEQ EXISTS jump if file exists 277 * \ / 03402 DC40367D 278 CALLNP INSDIRENT insert the entry into the directory 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 57 (TRFILEREC) F 19 File recovery routines 03403 FE0E3410 279 JMP OOSPRTN jump if out of free disk space 03404 FE0E340E 280 JMP BADDISK jump if disk error 281 * \ / 00003405 282 ASIFNH LABEL 03405 61006499 4 283 LD R4 CURFDEPTR point to the FDE in the UDIR 03406 60092A60 0 4 ZBM 284 LD R0 R4,FDET pick up the file type 03407 64040004 0 IMM 285 CPR R0 TYPETABMAX check for maximum normal type 03408 FE063415 286 JGE DODIRENTRY jump if file type with no space 03409 5D603411 0 287 XCT TYPETAB(R0) go to the appropriate routine 0340A FE0E3410 288 JMP OOSPRTN out of space 0340B FE0E340F 289 JMP LOGRECBAD bad record 0340C FE0E340E 290 JMP BADDISK disk error 291 * \ / 0000340D 292 RETURN LABEL 0340D 19C40001 7 IMM 293 ADD R7 1 return address will be P+3 0000340E 294 BADDISK LABEL 0340E 19C40001 7 IMM 295 ADD R7 1 return address will be P+2 0000340F 296 LOGRECBAD LABEL 0340F 19C40001 7 IMM 297 ADD R7 1 return address will be P+1 00003410 298 OOSPRTN LABEL 03410 5D1F8001 6 STAK 299 LEAVE POP 300 * --- 301 00003411 302 TYPETAB LABEL 03411 FE0E340F 303 JMP LOGRECBAD illegal type 03412 DC403484 304 CALLNP RCVSAF 03413 DC4034E7 305 CALLNP RCVRAF 03414 DC403563 306 CALLNP RCVCODE 00000004 ABS 307 TYPETABMAX EQU DISPW TYPETAB 308 309 * This file type takes no disk space (.TERM, .PATH, etc.). 310 * We are now done with the recovery, so we clear the ghost 311 * flag and pick up the next record for our caller. 312 * R4 -> FDE 00003415 313 DODIRENTRY LABEL 03415 EC093610 4 ZBM 314 STZ R4,FDGHOST indicate not a ghost file 03416 DC4037BC 315 CALLNP NXTLOGREC get next logical record 03417 FE0E340D 316 JMP RETURN give normal return 317 * --- 318 319 * We come here if we found a second file by the same name in the directory. 03418 2046696C 320 EXSMSG TEXTZ " File \S1\.\R2\:\S3\.\R4\ already exists." 00003423 321 EXISTS LABEL 03423 5C097610 5 ZBM 322 CMZ R5,FDGHOST is the original a ghost? 03424 FE023431 323 JEQ GIVEDUPERR jump if not, error 03425 60095185 0 5 ZBM 324 LD R0 R5,FDDA get originals CCB address 03426 FA023428 0 325 JEQZ R0 NOFREECCB jump if not allocated 03427 DC403B04 326 CALLNP PUTFREBLK give back the space 00003428 327 NOFREECCB LABEL 03428 60174814 0 5 BASE 328 LD R0 R5,FDSHL check for a share list 03429 F200342C 0 329 JBF R0/SHLDSKFLGB NOFREESHL jump if none on disk 0342A 78003039 0 330 AND R0 MSBLKMASK mask off extra garbage 0342B DC403B04 331 CALLNP PUTFREBLK and give back space 0000342C 332 NOFREESHL LABEL 0342C 60046481 0 IMM 333 LD R0 ADR TMPFDEBUF get pointer to FDE 0342D 60440060 1 IMM 334 LD R1 FDLNTH*CPW length to move 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 58 (TRFILEREC) F 19 File recovery routines 0342E 60934000 2 5 REG 335 LD R2 R5 destination address in UDIR 0342F FE400000 336 CMOVE and lay new over old 03430 FE0E3405 337 JMP ASIFNH as if nothing happened 338 * --- 339 00003431 340 GIVEDUPERR LABEL 03431 DC1013F9 @ 341 CALL @VPREPOUT write out a message 03432 41004C00 342 PAR CURACTBUF(UDACCT) pass account name 03433 41004C02 343 PAR CURACTBUF(UDPROJ) and extension 03434 4100649F 344 PAR CURFILNAM pass file name 03435 410064A1 345 PAR CURFILEXT and its extension 03436 40003418 346 PARL EXSMSG 03437 0082310A 347 STOP HALTB310A duplicate file name found 348 * \ / 03438 FE0E340F 349 JMP LOGRECBAD in case we want to continue 350 * --- 351 ASIFNH 00003405 F 19 282= 337j BADDISK 0000340E F 19 271j 275j 280j 290j 294= +BKUPHDRLEN 00000002 F 19 202 COMMON 000033FF F 19 236j 273= +CURACTBUF 00004C00 F 19 247 249 260a 342a 343a +CURFDEPTR 00006499 F 19 283 +CURFILADR 0000649C F 19 244s +CURFILEXT 000064A1 F 19 227s 345a +CURFILNAM 0000649F F 19 225s 344a +CURFILSN 0000649D F 19 223s 251 DODIRENTRY 00003415 F 19 286j 313= +DOFILSHL UUUUUUUU F 19 229 EXISTS 00003423 F 19 276j 321= EXSMSG 00003418 F 19 320= 346a +FNDDIRENT UUUUUUUU F 19 274 +GETFREBLK UUUUUUUU F 19 239 GIVEDUPERR 00003431 F 19 323j 340= +INSDIRENT UUUUUUUU F 19 278 LOGRECBAD 0000340F F 19 203j 208j 213j 231j 266j 289j 296= 303j 349j +MOVLOGREC UUUUUUUU F 19 200 205 263 +MSBLKMASK 00003039 F 19 330 NOFREECCB 00003428 F 19 325j 327= NOFREESHL 0000342C F 19 329j 332= +NXTLOGREC UUUUUUUU F 19 315 OOSPRTN 00003410 F 19 230j 243j 279j 288j 298= +PAGOUT UUUUUUUU F 19 268 +PUTFREBLK UUUUUUUU F 19 326 331 +RCVCODE UUUUUUUU F 19 306 +RCVRAF UUUUUUUU F 19 305 +RCVRFIL 000033C2 F 19 194 199= +RCVSAF UUUUUUUU F 19 304 RETURN 0000340D F 19 292= 316j +TMPFDEBUF 00006481 F 19 206a 210a 233a 254a 333a +TMPOSHDR 0000647C F 19 201a +TMPPAGBUF 00005800 F 19 240a 264a 269a +TMPPAGFBI 00006442 F 19 241a 246a 270a TYPETAB 00003411 F 19 287 302= 307e TYPETABMAX 00000004 F 19 285 307= +VPREPOUT 000013F9 F 19 341 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 59 (TRFILEREC) F 19 File recovery routines 352 END of RCVRFIL 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 60 (TRFILEREC) F 19 File recovery routines 354 355 ********************************************************************************** 356 * * 357 * DOFILSHL * 358 * * 359 * If the file has a share list that takes a disk block this * 360 * routine will take care of recovering the share list. * 361 * * 362 * Calling sequence: * 363 * CALLNP DOFILSHL * 364 * JMP * 365 * JMP * 366 * * 367 * Eats: R0:R4. * 368 * * 369 ********************************************************************************** 370 371 BLOCK DOFILSHL 372 ENTRY DOFILSHL 373 374 BEGFRAME 00178801 6 BASE 375 TMPDSKADR BSS 1 temp. to remember disk block allocated 376 ENDFRAME 377 03439 DD5F8002 6 STAK 378 DOFILSHL ENTRNP PUSH 0343A 6104647C 4 IMM 379 LD R4 ADR TMPOSHDR point to the OS made header 0343B 610900F1 4 4 ZBM 380 LD R4 R4,BKUPHDRW2/FSTBKUPLEN get length, if large share list 0343C FB0C3441 4 381 JNEZ R4 MAKEBLOCK jump if data here for share list 382 * \ / header sez no disk block needed for SHL 0343D 60C46481 3 IMM 383 LD R3 ADR TMPFDEBUF point to the temporary FDE 0343E 6016C814 0 3 BASE 384 LD R0 R3,FDSHL pick up marker word 0343F F200345E 0 385 JBF R0/SHLDSKFLGB NOSHL jump if record okay 386 * OS header sez no share list, but 03440 FE0E345F 387 JMP BADLOGREC old FDE had one 388 * --- 389 00003441 390 MAKEBLOCK LABEL 03441 DC003AD8 391 CALL GETFREBLK get a free block from the disk 03442 41005800 392 PAR TMPPAGBUF address of disk buffer 03443 41006442 393 PAR TMPPAGFBI address of FBI buffer 03444 40440012 IMM 394 PARVL FBITFSLB FBI type that we want 03445 FE0E3460 395 JMP OOSRETRN jump if out of disk space 03446 E4D78801 3 6 BASE 396 ST R3 SP,TMPDSKADR save block number that we got 397 03447 60846442 2 IMM 398 LD R2 ADR TMPPAGFBI point to the new FBI 03448 62004C00 01 399 LD2 R0 CURACTBUF(UDACCT) get the account name 03449 E6168805 012 BASE 400 ST2 R0 R2,FBIACCT and put in FBI 0344A 60004C02 0 401 LD R0 CURACTBUF(UDPROJ) get the division-project 0344B E4168807 0 2 BASE 402 ST R0 R2,FBIPROJ and put in FBI 0344C 6200649D 01 403 LD2 R0 CURFILSN get the file serial number 0344D E6168808 012 BASE 404 ST2 R0 R2,FBISERNO and fix up FBI 405 0344E 15040004 4 IMM 406 DIV R4 CPW convert share list length to words 0344F DC00375B 407 CALL MOVLOGREC move part of current logical record 03450 41005800 408 PAR TMPPAGBUF address of destination 03451 40530000 4 REG 409 PARVL R4 number of words to move 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 61 (TRFILEREC) F 19 File recovery routines 03452 FE0E345F 410 JMP BADLOGREC jump if bad logical record 411 * \ / 412 00003453 413 OUTITAGAIN LABEL 03453 DC003CF9 414 CALL PAGOUT write out the new share list 03454 41005800 415 PAR TMPPAGBUF address of page 03455 40006442 416 PARL TMPPAGFBI address of FBI 03456 FE0E3461 417 JMP ADISKERROR jump if disk error 418 03457 60178801 0 6 BASE 419 LD R0 SP,TMPDSKADR get our new block number 03458 EDCA0010 0 CBM 420 STW R0/SHLDSKFLGB say this is an address on MS 03459 60C46481 3 IMM 421 LD R3 ADR TMPFDEBUF point to the temporary FDE 0345A E416C814 0 3 BASE 422 ST R0 R3,FDSHL and fix it up 423 0345B D008D186 3 ZBM 424 INC R3,FDLEN one more block used by this file 0345C 60844C2B 2 IMM 425 LD R2 ADR CURACTBUF(UDLIMITS) point to his limits 0345D D0089188 2 ZBM 426 INC R2,DSKUSD and up disk used 427 * \ / 428 0000345E 429 NOSHL LABEL 0345E 19C40001 7 IMM 430 ADD R7 1 P+3 return 0000345F 431 BADLOGREC LABEL 0345F 19C40001 7 IMM 432 ADD R7 1 P+2 return 00003460 433 OOSRETRN LABEL 03460 5D1F8002 6 STAK 434 LEAVE POP 435 * --- 436 00003461 437 ADISKERROR LABEL 03461 DC403AEA 438 CALLNP GETFREADR allocate the next available block 03462 FE0E3460 439 JMP OOSRETRN fail on no space remaining 03463 E4D78801 3 6 BASE 440 ST R3 SP,TMPDSKADR save for later 03464 60846442 2 IMM 441 LD R2 ADR TMPPAGFBI R2 -> FBI 03465 E4C89181 3 2 ZBM 442 ST R3 R2,FBIDA set address into the FBI 03466 FE0E3453 443 JMP OUTITAGAIN out it again 444 * --- 445 ADISKERROR 00003461 F 19 417j 437= BADLOGREC 0000345F F 19 387j 410j 431= +BKUPHDRW2 00160801 F 19 380 +CURACTBUF 00004C00 F 19 399 401 425a +CURFILSN 0000649D F 19 403 +DOFILSHL 00003439 F 19 372 378= +FSTBKUPLEN 000000F0 F 19 380 +GETFREADR UUUUUUUU F 19 438 +GETFREBLK UUUUUUUU F 19 391 MAKEBLOCK 00003441 F 19 381j 390= +MOVLOGREC UUUUUUUU F 19 407 NOSHL 0000345E F 19 385j 429= OOSRETRN 00003460 F 19 395j 433= 439j OUTITAGAIN 00003453 F 19 413= 443j +PAGOUT UUUUUUUU F 19 414 TMPDSKADR 00178801 F 19 375= 396s 419 440s +TMPFDEBUF 00006481 F 19 383a 421a +TMPOSHDR 0000647C F 19 379a +TMPPAGBUF 00005800 F 19 392a 408a 415a +TMPPAGFBI 00006442 F 19 393a 398a 416a 441a 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 62 (TRFILEREC) F 19 File recovery routines 446 END 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 63 (TRFILEREC) F 19 File data recovery routines 449 450 ********************************************************************************** 451 * * 452 * CHECK4MORE * 453 * * 454 * This subroutine checks for more file pages and, if * 455 * necessary, will call NXTLOGREC to read in the next chunk of * 456 * file pages. Also it will increment the FDE length and UDIR * 457 * limits each time called. Also the OS header is moved into * 458 * the appropriate buffer. * 459 * During file data processing we use CURFPPTR to point to * 460 * the position in the physical record of the next file page, * 461 * and CURRECPTR to point to the header if we are recovering a * 462 * multiple file page format backup. NUMBFP indicates the * 463 * number of file pages remaining in this logical record left * 464 * and is zero if we are recovering an old format backup or have * 465 * finished recovering the current logical record. * 466 * * 467 * Calling sequence: * 468 * CALLNP CHECK4MORE * 469 * JMP bad record * 470 * JMP no more file data pages * 471 * * 472 * Eats: R0:R4. * 473 * * 474 ********************************************************************************** 475 476 BLOCK CHECK4MORE 477 ENTRY CHECK4MORE 478 ENTRY INITFPAGES 479 480 BEGFRAME 481 ENDFRAME 482 03467 DD5F8001 6 STAK 483 CHECK4MORE ENTRNP PUSH 03468 D040654D 484 DEC NUMBFP taking another file page 03469 FE043478 485 JGT DOFP jump if there is one to take 486 * \ / 487 0346A DC4037BC 488 CALLNP NXTLOGREC get the next logical record 0000346B 489 JOININ LABEL 0346B 64040006 0 IMM 490 CPR R0 RTYPEFP is it file data? 0346C FE0C347F 491 JNE NOPAGES jump if not 492 * \ / 493 0346D 60046522 0 IMM 494 LD R0 ADR CURHDRBUF R0 -> current record header 0346E 60080084 0 0 ZBM 495 LD R0 R0,NUMBPAGES get the number of pages in this logical record 0346F E400654D 0 496 ST R0 NUMBFP keep track of how many there are 03470 FA023478 0 497 JEQZ R0 DOFP if the count is zero it is old format 498 * \ / 499 03471 1C040400 0 IMM 500 MUL R0 WPP count of file pages in words 03472 E000654A 0 501 EXCH R0 CURRECPTR get the current position in phys rec 03473 E400654C 0 502 ST R0 CURFPPTR that is the current file page pointer 03474 B800654A 0 503 ADDB R0 CURRECPTR now this points to trailing headers and FBIs 03475 6400654B 0 504 CPR R0 ENDRECPTR see if we are beyond physical record 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 64 (TRFILEREC) F 19 File data recovery routines 03476 FE083478 505 JLT DOFP if not then no problem 03477 D140654A 506 STMW CURRECPTR say there is no known position 507 * \ / 508 00003478 509 DOFP LABEL 03478 DC403775 510 CALLNP GETOSHDR get the OS made header 03479 FE0E3480 511 JMP BADREC 0347A 60406499 1 512 LD R1 CURFDEPTR point to the entry in directory 0347B D0085186 1 ZBM 513 INC R1,FDLEN and increase size 0347C 60044C2B 0 IMM 514 LD R0 ADR CURACTBUF(UDLIMITS) point to his limits 0347D D0081188 0 ZBM 515 INC R0,DSKUSD and increase space used 0347E 19C40001 7 IMM 516 ADD R7 1 return to P+2 517 * \ / 518 0000347F 519 NOPAGES LABEL 0347F 19C40001 7 IMM 520 ADD R7 1 00003480 521 BADREC LABEL 03480 5D1F8001 6 STAK 522 LEAVE POP 523 * --- 524 525 ********************************************************************************** 526 * * 527 * INITFPAGES * 528 * * 529 * This is an alternate entry to CHECK4MORE for when the * 530 * file page record is already the current logical record but * 531 * we need things initialized. * 532 * Call: * 533 * file page logical record is current one * 534 * CALLNP INITFPAGES * 535 * JMP bad record * 536 * JMP no file pages * 537 * * 538 ********************************************************************************** 539 03481 DD5F8001 6 STAK 540 INITFPAGES ENTRNP PUSH 03482 6000654E 0 541 LD R0 CURRECTYP 03483 FE0E346B 542 JMP JOININ 543 * --- 544 BADREC 00003480 F 19 511j 521= +CHECK4MORE 00003467 F 19 477 483= +CURACTBUF 00004C00 F 19 514a +CURFDEPTR 00006499 F 19 512 +CURFPPTR 0000654C F 19 502s +CURHDRBUF 00006522 F 19 494a +CURRECPTR 0000654A F 19 501s 503s 506s +CURRECTYP 0000654E F 19 541 DOFP 00003478 F 19 485j 497j 505j 509= +ENDRECPTR 0000654B F 19 504 +GETOSHDR UUUUUUUU F 19 510 +INITFPAGES 00003481 F 19 478 540= JOININ 0000346B F 19 489= 542j NOPAGES 0000347F F 19 491j 519= +NUMBFP 0000654D F 19 484s 496s +NUMBPAGES 00080084 F 19 495 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 65 (TRFILEREC) F 19 File data recovery routines +NXTLOGREC UUUUUUUU F 19 488 +RTYPEFP 00000006 F 19 490 545 END of CHECK4MORE 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 66 (TRFILEREC) F 19 File data recovery routines 547 548 ********************************************************************************** 549 * * 550 * RCVSAF * 551 * * 552 * Subroutine which recovers all of the file pages * 553 * associated with a saf. * 554 * Call: * 555 * CALLNP RCVSAF * 556 * JMP * 557 * JMP * 558 * JMP * 559 * Eats R0:R5. * 560 * * 561 ********************************************************************************** 562 563 BLOCK 564 ENTRY RCVSAF 565 ENTRY RCVSAFFAKE 566 567 BEGFRAME 00178801 6 BASE 568 NLOC BSS 1 block number on output disk 00178802 6 BASE 569 NPREV BSS 1 previous block number on output disk 570 ENDFRAME 571 03484 DD5F8003 6 STAK 572 RCVSAF ENTRNP PUSH 03485 DC403AEA 573 CALLNP GETFREADR allocate the next available block 03486 FE0E34BB 574 JMP OOSPRETRN out of disk space 03487 60806499 2 575 LD R2 CURFDEPTR R2 -> file directory entry 03488 E4C89185 3 2 ZBM 576 ST R3 R2,FDDA set the first block number 03489 E4D78801 3 6 BASE 577 ST R3 SP,NLOC first output block 0348A EC178802 6 BASE 578 STZ SP,NPREV previous block number is zero 579 0348B DC403467 580 CALLNP CHECK4MORE get some file pages 0348C FE0E34BA 581 JMP BADREC if a bad record popped up 0348D FE0E34AD 582 JMP RETURN skip this all if nothing is there 583 * \ / 0000348E 584 LOOP LABEL once for each data block 0348E DC00378B 585 CALL MOVEFP get a file page 0348F 40005400 586 PARL CURFILBUF where we want it 03490 FE0E34BA 587 JMP BADREC if we ran out of record 588 * \ / 03491 DC00375B 589 CALL MOVLOGREC pick up the FBI 03492 41006437 590 PAR CURFILFBI where to put it 03493 4044000B IMM 591 PARVL FBILNTH how much 03494 FE0E34BA 592 JMP BADREC out of record 593 * \ / 00003495 594 FAKEJOIN LABEL 03495 60C46437 3 IMM 595 LD R3 ADR CURFILFBI point to the FBI 03496 6004000C 0 IMM 596 LD R0 FBITSAF FBI type we want 03497 E408C080 0 3 ZBM 597 ST R0 R3,FBITYPE and put into FBI 03498 60178801 0 6 BASE 598 LD R0 SP,NLOC get this blocks address 03499 E408D181 0 3 ZBM 599 ST R0 R3,FBIDA and put into FBI 0349A 60178802 0 6 BASE 600 LD R0 SP,NPREV get previous blocks ms address 0349B E408D182 0 3 ZBM 601 ST R0 R3,FBIBLINK and put into FBI 602 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 67 (TRFILEREC) F 19 File data recovery routines 0349C 6200649D 01 603 LD2 R0 CURFILSN get the FSN 0349D E616C808 013 BASE 604 ST2 R0 R3,FBISERNO and put into FBI 605 0349E DC403467 606 CALLNP CHECK4MORE see if there is another file page 0349F FE0E34BA 607 JMP BADREC 034A0 FE0E34B3 608 JMP HAVELAST jump if not 609 * \ / 034A1 DC403AEA 610 CALLNP GETFREADR allocate the next available block 034A2 FE0E34BB 611 JMP OOSPRETRN out of disk space 612 * \ / 000034A3 613 WRITEPAGE LABEL 034A3 60046437 0 IMM 614 LD R0 ADR CURFILFBI get pointer to current FBI 034A4 E4C81180 3 0 ZBM 615 ST R3 R0,FBIFLINK set the forward link 034A5 E0D78801 3 6 BASE 616 EXCH R3 SP,NLOC save for next time around 034A6 E4D78802 3 6 BASE 617 ST R3 SP,NPREV save the current as the previous 000034A7 618 WRITEPAGEX LABEL 034A7 DC003CF9 619 CALL PAGOUT force out new page 034A8 41005400 620 PAR CURFILBUF address of page 034A9 40006437 621 PARL CURFILFBI address of FBI 034AA FE0E34C0 622 JMP BADDSK jump on disk error 623 034AB 5C178801 6 BASE 624 CMZ SP,NLOC is there another page to do? 034AC FE0C348E 625 JNE LOOP keep going if so 626 * \ / 000034AD 627 RETURN LABEL 034AD 19C40003 7 IMM 628 ADD R7 3 P+4 return 034AE 60806499 2 629 LD R2 CURFDEPTR R2 -> file directory entry 034AF D1806556 630 CLRT DATALOST any lost data? 034B0 FE0C34BC 631 JNE SETGHOSTR if so, diddle FDE to indicate so 034B1 EC08B610 2 ZBM 632 STZ R2,FDGHOST indicate good file 034B2 5D1F8003 6 STAK 633 LEAVE POP return happily 634 * --- 635 000034B3 636 HAVELAST LABEL 034B3 60C40000 3 IMM 637 LD R3 0 make forward pointer nil 034B4 60806499 2 638 LD R2 CURFDEPTR R2 -> file directory entry 034B5 5C168811 2 BASE 639 CMZ R2,FDEND was the end set previously? 034B6 FE0234A3 640 JEQ WRITEPAGE don't confuse the issue if not 034B7 60178801 0 6 BASE 641 LD R0 SP,NLOC pick up current block number 642 * (evidently the end of the file) 034B8 E4168811 0 2 BASE 643 ST R0 R2,FDEND and set new end pointer 034B9 FE0E34A3 644 JMP WRITEPAGE go write the current page 645 * --- 646 000034BA 647 BADREC LABEL 034BA 19C40001 7 IMM 648 ADD R7 1 P+2 return 000034BB 649 OOSPRETRN LABEL 034BB 60806499 2 650 LD R2 CURFDEPTR R2 -> file directory entry 000034BC 651 SETGHOSTR LABEL 034BC EC168810 2 BASE 652 STZ R2,FDEPP wipe out in case it is wrong 034BD EC168811 2 BASE 653 STZ R2,FDEND wipe out in case it is wrong 034BE EDC8B610 2 ZBM 654 STW R2,FDGHOST indicate data lost 034BF 5D1F8003 6 STAK 655 LEAVE POP return 656 * --- 657 000034C0 658 BADDSK LABEL 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 68 (TRFILEREC) F 19 File data recovery routines 034C0 DC403AEA 659 CALLNP GETFREADR allocate the next available block 034C1 FE0E34BB 660 JMP OOSPRETRN out of disk space 034C2 E4D78802 3 6 BASE 661 ST R3 SP,NPREV save on the stack 034C3 60446437 1 IMM 662 LD R1 ADR CURFILFBI R0 -> current FBI 034C4 E4C85181 3 1 ZBM 663 ST R3 R1,FBIDA set the new disk address 034C5 60885182 2 1 ZBM 664 LD R2 R1,FBIBLINK get the previous block 034C6 FA8234D6 2 665 JEQZ R2 HAVEFIRST jump if this is the first block 034C7 DC003CE1 666 CALL PAGIN read in the previous block 034C8 41005C00 667 PAR TMPPAGBUF2 read it in here 034C9 4100644D 668 PAR TMPPAGFBI2 put the FBI here 034CA 4144000C IMM 669 PARV FBITSAF expecting a SAF 034CB 40528000 2 REG 670 PARVL R2 the block we want 034CC FEC00000 671 NOP 0 ignore disk error 034CD 60178802 0 6 BASE 672 LD R0 SP,NPREV get the new forward link 034CE 6044644D 1 IMM 673 LD R1 ADR TMPPAGFBI2 point to the FBI 034CF E4085180 0 1 ZBM 674 ST R0 R1,FBIFLINK set the forward link 034D0 DC003CF9 675 CALL PAGOUT write the page 034D1 41005C00 676 PAR TMPPAGBUF2 read it in here 034D2 4000644D 677 PARL TMPPAGFBI2 put the FBI here 034D3 FEC00000 678 NOP 0 ignore disk error 034D4 60D78802 3 6 BASE 679 LD R3 SP,NPREV get the new disk address 034D5 FE0E34A7 680 JMP WRITEPAGEX write the block again 681 * --- 682 000034D6 683 HAVEFIRST LABEL 034D6 60006499 0 684 LD R0 CURFDEPTR point to the FDE 034D7 E4C81185 3 0 ZBM 685 ST R3 R0,FDDA set the new root address 034D8 FE0E34A7 686 JMP WRITEPAGEX write the block again 687 * --- 688 689 ********************************************************************************** 690 * * 691 * Entry into RCVSAF for coming from the file fake * 692 * subroutine. Since that subroutine has already fetched the * 693 * first block we must enter the original loop a little lower. * 694 * Call: * 695 * CURFILBUF = first data page * 696 * CURFILFBI = FBI of data page * 697 * CALLNP RCVSAFFAKE * 698 * * 699 ********************************************************************************** 700 034D9 DD5F8003 6 STAK 701 RCVSAFFAKE ENTRNP PUSH 034DA EC006555 702 STZ HAVEPAGE clear this flag 034DB DC403AEA 703 CALLNP GETFREADR allocate the next available block 034DC FE0E34BB 704 JMP OOSPRETRN out of disk space 034DD 60806499 2 705 LD R2 CURFDEPTR R2 -> file directory entry 034DE E4C89185 3 2 ZBM 706 ST R3 R2,FDDA save the root address 034DF E4D78801 3 6 BASE 707 ST R3 SP,NLOC first output block 034E0 EC168810 2 BASE 708 STZ R2,FDEPP wipe out in case it is wrong 034E1 EC168811 2 BASE 709 STZ R2,FDEND wipe out in case it is wrong 034E2 EC178802 6 BASE 710 STZ SP,NPREV output previous block is zero 034E3 D0089186 2 ZBM 711 INC R2,FDLEN count the first block 034E4 60044C2B 0 IMM 712 LD R0 ADR CURACTBUF(UDLIMITS) point to his limits 034E5 D0081188 0 ZBM 713 INC R0,DSKUSD and increase space used 034E6 FE0E3495 714 JMP FAKEJOIN 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 69 (TRFILEREC) F 19 File data recovery routines 715 * --- 716 BADDSK 000034C0 F 19 622j 658= BADREC 000034BA F 19 581j 587j 592j 607j 647= +CHECK4MORE 00003467 F 19 580 606 +CURACTBUF 00004C00 F 19 712a +CURFDEPTR 00006499 F 19 575 629 638 650 684 705 +CURFILBUF 00005400 F 19 586a 620a +CURFILFBI 00006437 F 19 590a 595a 614a 621a 662a +CURFILSN 0000649D F 19 603 +DATALOST 00006556 F 19 630s FAKEJOIN 00003495 F 19 594= 714j +GETFREADR UUUUUUUU F 19 573 610 659 703 HAVEFIRST 000034D6 F 19 665j 683= HAVELAST 000034B3 F 19 608j 636= +HAVEPAGE 00006555 F 19 702s LOOP 0000348E F 19 584= 625j +MOVEFP UUUUUUUU F 19 585 +MOVLOGREC UUUUUUUU F 19 589 NLOC 00178801 F 19 568= 577s 598 616s 624 641 707s NPREV 00178802 F 19 569= 578s 600 617s 661s 672 679 710s OOSPRETRN 000034BB F 19 574j 611j 649= 660j 704j +PAGIN UUUUUUUU F 19 666 +PAGOUT UUUUUUUU F 19 619 675 +RCVSAF 00003484 F 19 564 572= +RCVSAFFAKE 000034D9 F 19 565 701= RETURN 000034AD F 19 582j 627= SETGHOSTR 000034BC F 19 631j 651= +TMPPAGBUF2 00005C00 F 19 667a 676a +TMPPAGFBI2 0000644D F 19 668a 673a 677a WRITEPAGE 000034A3 F 19 613= 640j 644j WRITEPAGEX 000034A7 F 19 618= 680j 686j 717 END of RCVSAF subroutine 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 70 (TRFILEREC) F 19 File data recovery routines 719 720 ********************************************************************************** 721 * * 722 * RCVRAF * 723 * * 724 * This routine will completely recover a RAF. * 725 * * 726 * Call: * 727 * CALLNP RCVRAF * 728 * JMP * 729 * JMP * 730 * JMP * 731 * * 732 * Eats R0:R4. * 733 * * 734 ********************************************************************************** 735 736 BLOCK RCVRAF 737 ENTRY RCVRAF 738 ENTRY RCVRAFFAKE 739 740 BEGFRAME 00178801 6 BASE 741 CURPOS BSS 1 CPP for current block (from OSHEADER) 00178802 6 BASE 742 CURMINOR BSS 1 address of current resident minor AB 743 ENDFRAME 744 034E7 DD5F8003 6 STAK 745 RCVRAF ENTRNP PUSH 034E8 EC178802 6 BASE 746 STZ SP,CURMINOR say no minor access block in yet 000034E9 747 NEXTPAGE LABEL 034E9 DC403467 748 CALLNP CHECK4MORE see if there is a page to recover 034EA FE0E352F 749 JMP BADREC bad record found 034EB FE0E3524 750 JMP GOODDONE no more file pages 000034EC 751 FAKEJOIN LABEL 034EC 6004647C 0 IMM 752 LD R0 ADR TMPOSHDR point to the OS made header 034ED 60560801 1 0 BASE 753 LD R1 R0,BKUPHDRW2 get the second word 034EE E4578801 1 6 BASE 754 ST R1 SP,CURPOS save for later reference 034EF 60C06499 3 755 LD R3 CURFDEPTR point to the FDE 034F0 6008FC20 0 3 ZBM 756 LD R0 R3,FDRAFTYPE pick up the type of this RAF 034F1 5CA034F2 0 757 LDPC RAFJTAB(R0) and go to the right place 758 * --- 759 000034F2 760 RAFJTAB LABEL 034F2 00003531 761 VFD ADR EMPTYRAF 034F3 0000353F 762 VFD ADR MAKESMALL 034F4 00003517 763 VFD ADR SMALLRAF 034F5 000034F8 764 VFD ADR LARGERAF 765 000034F6 766 MAKELARGE LABEL 034F6 DC4035AC 767 CALLNP CVTRAFLRG convert to a large RAF 034F7 FE0E3530 768 JMP OOSPRETURN jump on out of disk space 769 * \ / 770 771 * The file is a large RAF so recover it. The major index block 772 * is in TMPPAGBUF2, and was created by CVTRAFLRG since we always 773 * start out with an empty RAF and expand upwards from there. 774 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 71 (TRFILEREC) F 19 File data recovery routines 000034F8 775 LARGERAF LABEL 034F8 604980A1 1 6 ZBM 776 LD R1 SP,CURPOS/RAFMAJINDX get the major index pointer 034F9 61225C00 4 1 777 LD R4 TMPPAGBUF2(R1) get pointer to minor if it exists 034FA 5C178802 6 BASE 778 CMZ SP,CURMINOR is any minor access block in? 034FB FE023502 779 JEQ NOMINRITE skip write if none 034FC 65178802 4 6 BASE 780 CPR R4 SP,CURMINOR see if this block is already in 034FD FE023519 781 JEQ COMMON if so do not read it 782 * \ / 034FE DC003CF9 783 CALL PAGOUT force out the old minor access block 034FF 41005800 784 PAR TMPPAGBUF address of page 03500 40006442 785 PARL TMPPAGFBI address of FBI 03501 FE0E352E 786 JMP GOTDISKERR jump on disk error 787 * \ / 00003502 788 NOMINRITE LABEL 03502 FB02350B 4 789 JEQZ R4 NEEDMINOR jump if minor AB does not exist 03503 E5178802 4 6 BASE 790 ST R4 SP,CURMINOR keep track of current minor 03504 DC003CE1 791 CALL PAGIN read in this minor index block 03505 41005800 792 PAR TMPPAGBUF address of page 03506 41006442 793 PAR TMPPAGFBI address of FBI 03507 4144000E IMM 794 PARV FBITSRAF FBI type we expect 03508 40530000 4 REG 795 PARVL R4 ms address 03509 FE0E352E 796 JMP GOTDISKERR jump on disk error 0350A FE0E3519 797 JMP COMMON and finish up 798 * --- 799 800 * We show up here when we must create a minor access 801 * block. We already have the major access block. 802 0000350B 803 NEEDMINOR LABEL 0350B 604980A1 1 6 ZBM 804 LD R1 SP,CURPOS/RAFMAJINDX get the major index pointer 0350C DC00354C 805 CALL MAKEMINOR make a minor access block 0350D 40524000 1 REG 806 PARVL R1 relative block number 0350E FE0E3530 807 JMP OOSPRETURN out of disk space 808 0350F 600980A1 0 6 ZBM 809 LD R0 SP,CURPOS/RAFMAJINDX get the relative block number 03510 E4E05C00 3 0 810 ST R3 TMPPAGBUF2(R0) store new address into the major 03511 E4D78802 3 6 BASE 811 ST R3 SP,CURMINOR keep track of current minor AB 812 03512 DC003CF9 813 CALL PAGOUT force out the major access block 03513 41005C00 814 PAR TMPPAGBUF2 address of page 03514 4000644D 815 PARL TMPPAGFBI2 address of FBI 03515 FE0E352E 816 JMP GOTDISKERR jump on disk error 03516 FE0E3519 817 JMP COMMON and finish up 818 * --- 819 820 * We show up here if our current structure is a small 821 * RAF. We check to see if we must make this file large. 822 00003517 823 SMALLRAF LABEL 03517 5C0980A1 6 ZBM 824 CMZ SP,CURPOS/RAFMAJINDX check the major index block number 03518 FE0C34F6 825 JNE MAKELARGE make large if we have to 826 * \ / 827 828 * When we get here we have a RAF with its 829 * current minor index block in TMPPAGBUF. 830 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 72 (TRFILEREC) F 19 File data recovery routines 00003519 831 COMMON LABEL 03519 600994A1 0 6 ZBM 832 LD R0 SP,CURPOS/RAFMININDX get the minor index offset 0351A 5C205800 0 833 CMZ TMPPAGBUF(R0) is there a page here already? 0351B FE0C352F 834 JNE BADREC jump if so 0351C DC00358E 835 CALL COMRAFPRC do lots of common processing 0351D 4044000F IMM 836 PARVL FBITRAFD type that we want 0351E FE0E3530 837 JMP OOSPRETURN jump on out of disk space 0351F FE0E352F 838 JMP BADREC 03520 FE0E352E 839 JMP GOTDISKERR jump if we had a disk error 840 * \ / 841 03521 600994A1 0 6 ZBM 842 LD R0 SP,CURPOS/RAFMININDX get the minor index offset 03522 E4A05800 2 0 843 ST R2 TMPPAGBUF(R0) fix up minor access block 03523 FE0E34E9 844 JMP NEXTPAGE get the next page 845 * --- 846 00003524 847 GOODDONE LABEL 03524 5C178802 6 BASE 848 CMZ SP,CURMINOR is any minor access block in? 03525 FE02352A 849 JEQ NONEEDTW skip write if not 03526 DC003CF9 850 CALL PAGOUT force out the current minor access block 03527 41005800 851 PAR TMPPAGBUF address of page 03528 40006442 852 PARL TMPPAGFBI address of FBI 03529 FE0E352E 853 JMP GOTDISKERR jump on disk error 854 * \ / 0000352A 855 NONEEDTW LABEL 0352A 60406499 1 856 LD R1 CURFDEPTR R1 -> FDE 0352B D1806556 857 CLRT DATALOST have we lost data? 0352C ED887610 1 ZBM 858 STLNE R1,FDGHOST set ghost flag 0352D 19C40001 7 IMM 859 ADD R7 1 P+4 return 0000352E 860 GOTDISKERR LABEL 0352E 19C40001 7 IMM 861 ADD R7 1 P+3 return 0000352F 862 BADREC LABEL 0352F 19C40001 7 IMM 863 ADD R7 1 P+2 return 00003530 864 OOSPRETURN LABEL 03530 5D1F8003 6 STAK 865 LEAVE POP 866 * --- 867 868 * Our current RAF structure is an empty RAF. 869 * We look at the address of the block being 870 * added to see what type of RAF to produce. 871 * We will create a tiny RAF iff the first block 872 * is at location zero. 873 00003531 874 EMPTYRAF LABEL 03531 5C0A40A0 1 CBM 875 CMZ R1/(RAFMAJINDX) is the first location out in the boonies? 03532 FE0C34F6 876 JNE MAKELARGE if so then make into a large RAF 03533 5C0A54A0 1 CBM 877 CMZ R1/(RAFMININDX) are we at location zero? 03534 FE0C353F 878 JNE MAKESMALL if not then we need a minor access block 879 * \ / 880 881 * Create a tiny RAF. 03535 DC00358E 882 CALL COMRAFPRC do lots of common processing 03536 4044000F IMM 883 PARVL FBITRAFD type that we want 03537 FE0E3530 884 JMP OOSPRETURN jump on out of disk space 03538 FE0E352F 885 JMP BADREC 03539 FE0E352E 886 JMP GOTDISKERR jump if we had a disk error 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 73 (TRFILEREC) F 19 File data recovery routines 887 * \ / 0353A 60C06499 3 888 LD R3 CURFDEPTR get pointer to directory entry 0353B E488D185 2 3 ZBM 889 ST R2 R3,FDDA set the new root block of the RAF 0353C 60040001 0 IMM 890 LD R0 RAFTTINY indicate this is a tiny RAF 0353D E408FC20 0 3 ZBM 891 ST R0 R3,FDRAFTYPE set in the FDE 0353E FE0E34E9 892 JMP NEXTPAGE 893 * --- 894 895 * We need to make either an empty or tiny RAF into a small RAF. 0000353F 896 MAKESMALL LABEL 0353F DC00354C 897 CALL MAKEMINOR make a minor access block 03540 40440000 IMM 898 PARVL 0 relative block number of zero 03541 FE0E3530 899 JMP OOSPRETURN 900 * \ / 03542 60806499 2 901 LD R2 CURFDEPTR get pointer to directory entry 03543 E4D78802 3 6 BASE 902 ST R3 SP,CURMINOR save the current minor access block 03544 E0C89185 3 2 ZBM 903 EXCH R3 R2,FDDA set the new root block of the RAF 03545 E4C05800 3 904 ST R3 TMPPAGBUF(0) the old root is the first data block 905 * (if any) 03546 60040002 0 IMM 906 LD R0 RAFTSMALL now a small RAF 03547 E408BC20 0 2 ZBM 907 ST R0 R2,FDRAFTYPE 03548 FE0E3517 908 JMP SMALLRAF now treat it like a small raf 909 * --- 910 911 ********************************************************************************** 912 * * 913 * This entry is for when we had to fake a RAF file start. * 914 * We do some initializing of things then join in with the * 915 * normal RAF recovery. * 916 * * 917 ********************************************************************************** 918 03549 DD5F8003 6 STAK 919 RCVRAFFAKE ENTRNP PUSH 0354A EDC06555 920 STW HAVEPAGE indicate we have the page already 0354B FE0E34EC 921 JMP FAKEJOIN 922 * --- 923 BADREC 0000352F F 19 749j 834j 838j 862= 885j +BKUPHDRW2 00160801 F 19 753 +CHECK4MORE 00003467 F 19 748 COMMON 00003519 F 19 781j 797j 817j 831= +COMRAFPRC UUUUUUUU F 19 835 882 +CURFDEPTR 00006499 F 19 755 856 888 901 CURMINOR 00178802 F 19 742= 746s 778 780 790s 811s 848 902s CURPOS 00178801 F 19 741= 754s 776 804 809 824 832 842 +CVTRAFLRG UUUUUUUU F 19 767 +DATALOST 00006556 F 19 857s EMPTYRAF 00003531 F 19 761a 874= FAKEJOIN 000034EC F 19 751= 921j GOODDONE 00003524 F 19 750j 847= GOTDISKERR 0000352E F 19 786j 796j 816j 839j 853j 860= 886j +HAVEPAGE 00006555 F 19 920s LARGERAF 000034F8 F 19 764a 775= MAKELARGE 000034F6 F 19 766= 825j 876j +MAKEMINOR UUUUUUUU F 19 805 897 MAKESMALL 0000353F F 19 762a 878j 896= 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 74 (TRFILEREC) F 19 File data recovery routines NEEDMINOR 0000350B F 19 789j 803= NEXTPAGE 000034E9 F 19 747= 844j 892j NOMINRITE 00003502 F 19 779j 788= NONEEDTW 0000352A F 19 849j 855= OOSPRETURN 00003530 F 19 768j 807j 837j 864= 884j 899j +PAGIN UUUUUUUU F 19 791 +PAGOUT UUUUUUUU F 19 783 813 850 RAFJTAB 000034F2 F 19 757 760= +RCVRAF 000034E7 F 19 737 745= +RCVRAFFAKE 00003549 F 19 738 919= SMALLRAF 00003517 F 19 763a 823= 908j +TMPOSHDR 0000647C F 19 752a +TMPPAGBUF 00005800 F 19 784a 792a 833 843s 851a 904s +TMPPAGBUF2 00005C00 F 19 777 810s 814a +TMPPAGFBI 00006442 F 19 785a 793a 852a +TMPPAGFBI2 0000644D F 19 815a 924 END of RCVRAF 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 75 (TRFILEREC) F 19 File data recovery routines 926 927 ********************************************************************************** 928 * * 929 * MAKEMINOR * 930 * * 931 * Pick up a block and make it into a minor access block. * 932 * The FBI is constructed and account and file sizes updated. * 933 * Call: * 934 * CALL MAKEMINOR * 935 * PARVL * 936 * JMP * 937 * R3 = new block number * 938 * * 939 * Eats R0:R4 * 940 * * 941 ********************************************************************************** 942 943 BLOCK MAKEMINOR subroutine 944 945 ENTRY MAKEMINOR 946 947 BEGFRAME 00178801 6 BASE 948 RELBLKNUM BSS 1 949 ENDFRAME 950 0354C DD1F8002 6 STAK 951 MAKEMINOR ENTR PUSH 0354D C0578801 6 BASE 952 STPVL SP,RELBLKNUM save the relative index number 953 0354E DC003AD8 954 CALL GETFREBLK get a new minor index block 0354F 41005800 955 PAR TMPPAGBUF address of page 03550 41006442 956 PAR TMPPAGFBI address of FBI 03551 4044000E IMM 957 PARVL FBITSRAF FBI type we expect 03552 FE0E3562 958 JMP OOSPRTURN jump if out of disk space 959 03553 E0D78801 3 6 BASE 960 EXCH R3 SP,RELBLKNUM get the relative block number and save 961 * the physical block number 03554 60846442 2 IMM 962 LD R2 ADR TMPPAGFBI point to the new FBI 03555 E4C89184 3 2 ZBM 963 ST R3 R2,FBIRELBLK put in the relative block number 03556 62004C00 01 964 LD2 R0 CURACTBUF(UDACCT) get the account name 03557 E6168805 012 BASE 965 ST2 R0 R2,FBIACCT and fix up FBI 03558 60004C02 0 966 LD R0 CURACTBUF(UDPROJ) get the division-project 03559 E4168807 0 2 BASE 967 ST R0 R2,FBIPROJ and fix up FBI 0355A 6200649D 01 968 LD2 R0 CURFILSN get the file serial number 0355B E6168808 012 BASE 969 ST2 R0 R2,FBISERNO and fix up FBI 970 0355C 60C06499 3 971 LD R3 CURFDEPTR point to the FDE 0355D D008D186 3 ZBM 972 INC R3,FDLEN up the file length by one 0355E 60044C2B 0 IMM 973 LD R0 ADR CURACTBUF(UDLIMITS) point to the limits 0355F D0081188 0 ZBM 974 INC R0,DSKUSD and up that also 975 03560 60D78801 3 6 BASE 976 LD R3 SP,RELBLKNUM get the disk block we got 03561 19C40001 7 IMM 977 ADD R7 1 00003562 978 OOSPRTURN LABEL 03562 5D1F8002 6 STAK 979 LEAVE POP 980 * --- 981 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 76 (TRFILEREC) F 19 File data recovery routines +CURACTBUF 00004C00 F 19 964 966 973a +CURFDEPTR 00006499 F 19 971 +CURFILSN 0000649D F 19 968 +GETFREBLK UUUUUUUU F 19 954 +MAKEMINOR 0000354C F 19 945 951= OOSPRTURN 00003562 F 19 958j 978= RELBLKNUM 00178801 F 19 948= 952s 960s 976 +TMPPAGBUF 00005800 F 19 955a +TMPPAGFBI 00006442 F 19 956a 962a 982 END of MAKEMINOR subroutine 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 77 (TRFILEREC) F 19 File data recovery routines 984 985 ********************************************************************************** 986 * * 987 * RCVCODE * 988 * * 989 * This routine will recover a code file page into the * 990 * current file. * 991 * * 992 * Calling sequence: * 993 * CALLNP RCVCODE * 994 * JMP * 995 * JMP * 996 * JMP * 997 * * 998 * Eats: R0:R4. * 999 * * 1000 ********************************************************************************** 1001 1002 BLOCK RCVCODE 1003 ENTRY RCVCODE 1004 ENTRY RCVCODEFAKE 1005 1006 BEGFRAME 1007 ENDFRAME 1008 03563 DD5F8001 6 STAK 1009 RCVCODE ENTRNP PUSH 00003564 1010 NEXTPAGE LABEL 03564 DC403467 1011 CALLNP CHECK4MORE see if more pages to recover 03565 FE0E357B 1012 JMP BADREC bad record 03566 FE0E3579 1013 JMP FINISHCODE finish things up 1014 00003567 1015 FAKEJOIN LABEL 03567 6004647C 0 IMM 1016 LD R0 ADR TMPOSHDR point to the OS made header 03568 600814A1 0 0 ZBM 1017 LD R0 R0,BKUPHDRW2/RAFMININDX so we can get the CCB index 03569 640403E8 0 IMM 1018 CPR R0 CCBMAXPAGE is it too big? 0356A FE04357B 1019 JGT BADREC jump if so 0356B 5C205800 0 1020 CMZ TMPPAGBUF(R0) is there a page here already? 0356C FE0C357B 1021 JNE BADREC jump if so 1022 * \ / 0356D DC00358E 1023 CALL COMRAFPRC do common processing 0356E 40440014 IMM 1024 PARVL FBITCODED type that we want 0356F FE0E357C 1025 JMP OOSRTN jump on out of disk space 03570 FE0E357B 1026 JMP BADREC 03571 FE0E357A 1027 JMP BADDSK jump on disk error 1028 03572 6004647C 0 IMM 1029 LD R0 ADR TMPOSHDR point to the OS made header 03573 60160801 0 0 BASE 1030 LD R0 R0,BKUPHDRW2 get the control word 03574 604A14A0 1 0 CBM 1031 LD R1 R0/RAFMININDX extract the minor index number 03575 78030000 0 IMM 1032 AND R0 1*CCBPROTECT extract the write protect bit 03576 7C920000 2 0 REG 1033 IOR R2 R0 and combine with pointer 03577 E4A25800 2 1 1034 ST R2 TMPPAGBUF(R1) fix up control block 03578 FE0E3564 1035 JMP NEXTPAGE get the next page 1036 * --- 1037 00003579 1038 FINISHCODE LABEL 03579 19C40001 7 IMM 1039 ADD R7 1 P+4 return 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 78 (TRFILEREC) F 19 File data recovery routines 0000357A 1040 BADDSK LABEL 0357A 19C40001 7 IMM 1041 ADD R7 1 P+3 return 0000357B 1042 BADREC LABEL 0357B 19C40001 7 IMM 1043 ADD R7 1 P+2 return 0000357C 1044 OOSRTN LABEL 0357C DC003CF9 1045 CALL PAGOUT force out the control block 0357D 41005800 1046 PAR TMPPAGBUF address of page 0357E 40006442 1047 PARL TMPPAGFBI address of FBI 0357F FE0E3583 1048 JMP RETURN leave this as a ghost 1049 * \ / 1050 03580 60406499 1 1051 LD R1 CURFDEPTR R1 -> FDE 03581 D1806556 1052 CLRT DATALOST have we lost some data? 03582 ED887610 1 ZBM 1053 STLNE R1,FDGHOST set ghost flag 00003583 1054 RETURN LABEL 03583 5D1F8001 6 STAK 1055 LEAVE POP 1056 * --- 1057 1058 ********************************************************************************** 1059 * * 1060 * Entry for when faking a file. This assumes the first * 1061 * data block and FBI have already been fetched and are in * 1062 * CURFILxxx. * 1063 * Call: * 1064 * CALLNP RCVCODEFAKE * 1065 * JMP * 1066 * JMP * 1067 * JMP * 1068 * * 1069 ********************************************************************************** 1070 03584 DD5F8001 6 STAK 1071 RCVCODEFAKE ENTRNP PUSH 03585 EDC06555 1072 STW HAVEPAGE 03586 DC003AD8 1073 CALL GETFREBLK pick up a block for the CCB 03587 41005800 1074 PAR TMPPAGBUF where to put it 03588 41006442 1075 PAR TMPPAGFBI the FBI goes here 03589 40440013 IMM 1076 PARVL FBITCCB FBI type 0358A FE0E357C 1077 JMP OOSRTN out of disk space 0358B 60006499 0 1078 LD R0 CURFDEPTR get pointer to the FDE 0358C E4C81185 3 0 ZBM 1079 ST R3 R0,FDDA set the root block address 0358D FE0E3567 1080 JMP FAKEJOIN 1081 * --- 1082 BADDSK 0000357A F 19 1027j 1040= BADREC 0000357B F 19 1012j 1019j 1021j 1026j 1042= +BKUPHDRW2 00160801 F 19 1017 1030 +CHECK4MORE 00003467 F 19 1011 +COMRAFPRC UUUUUUUU F 19 1023 +CURFDEPTR 00006499 F 19 1051 1078 +DATALOST 00006556 F 19 1052s FAKEJOIN 00003567 F 19 1015= 1080j FINISHCODE 00003579 F 19 1013j 1038= +GETFREBLK UUUUUUUU F 19 1073 +HAVEPAGE 00006555 F 19 1072s NEXTPAGE 00003564 F 19 1010= 1035j OOSRTN 0000357C F 19 1025j 1044= 1077j 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 79 (TRFILEREC) F 19 File data recovery routines +PAGOUT UUUUUUUU F 19 1045 +RCVCODE 00003563 F 19 1003 1009= +RCVCODEFAKE 00003584 F 19 1004 1071= RETURN 00003583 F 19 1048j 1054= +TMPOSHDR 0000647C F 19 1016a 1029a +TMPPAGBUF 00005800 F 19 1020 1034s 1046a 1074a +TMPPAGFBI 00006442 F 19 1047a 1075a 1083 END of RCVCODE 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 80 (TRFILEREC) F 19 File data recovery routines 1085 1086 ********************************************************************************** 1087 * * 1088 * COMRAFPRC * 1089 * * 1090 * Routine to do lots of common processing for RAF and * 1091 * CODE files. * 1092 * * 1093 * Calling sequence: * 1094 * index block in TMPPAGBUF * 1095 * CALLNP COMRAFPRC * 1096 * PARVL * 1097 * JMP * 1098 * JMP * 1099 * JMP * 1100 * R2 = ms address of new data page * 1101 * * 1102 * Eats: R0:R4. * 1103 * * 1104 ********************************************************************************** 1105 1106 BLOCK COMRAFPRC 1107 ENTRY COMRAFPRC 1108 1109 BEGFRAME 00178801 6 BASE 1110 TMPADR BSS 1 temp. to remember new ms address 00178802 6 BASE 1111 TMPFBITYP BSS 1 place to remember type 1112 ENDFRAME 1113 0358E DD1F8003 6 STAK 1114 COMRAFPRC ENTR PUSH 0358F C0578802 6 BASE 1115 STPVL SP,TMPFBITYP remember type for later 1116 * \ / 1117 03590 DC403AEA 1118 CALLNP GETFREADR allocate the next available block 03591 FE0E35AB 1119 JMP OOSRTN jump on out of space 03592 E4D78801 3 6 BASE 1120 ST R3 SP,TMPADR remember the ms address 1121 03593 D1806555 1122 CLRT HAVEPAGE see if we have the page already 03594 FE0C359C 1123 JNE HAVEIT jump if so 03595 DC00378B 1124 CALL MOVEFP recover the data 03596 40005400 1125 PARL CURFILBUF destination address 03597 FE0E35AA 1126 JMP BADREC jump if not enough record 1127 03598 DC00375B 1128 CALL MOVLOGREC recover the FBI 03599 41006437 1129 PAR CURFILFBI destination address 0359A 4044000B IMM 1130 PARVL FBILNTH words to move 0359B FE0E35AA 1131 JMP BADREC jump if not enough buffer 1132 * \ / 1133 0000359C 1134 HAVEIT LABEL 0359C 60C46437 3 IMM 1135 LD R3 ADR CURFILFBI point to the FBI 0359D 60178802 0 6 BASE 1136 LD R0 SP,TMPFBITYP get the type we want 0359E E408C080 0 3 ZBM 1137 ST R0 R3,FBITYPE and put into FBI 0359F 60178801 0 6 BASE 1138 LD R0 SP,TMPADR get this blocks address 035A0 E408D181 0 3 ZBM 1139 ST R0 R3,FBIDA and put into FBI 1140 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 81 (TRFILEREC) F 19 File data recovery routines 035A1 6200649D 01 1141 LD2 R0 CURFILSN get the file serial number 035A2 E616C808 013 BASE 1142 ST2 R0 R3,FBISERNO and put into FBI 1143 035A3 DC003CF9 1144 CALL PAGOUT write out the new page 035A4 41005400 1145 PAR CURFILBUF address of page 035A5 40006437 1146 PARL CURFILFBI address of FBI 035A6 FE0E35A9 1147 JMP DSKGAVERR jump if error writing new block 1148 035A7 60978801 2 6 BASE 1149 LD R2 SP,TMPADR get the block number 035A8 19C40001 7 IMM 1150 ADD R7 1 P+3 return 000035A9 1151 DSKGAVERR LABEL 035A9 19C40001 7 IMM 1152 ADD R7 1 P+2 return 000035AA 1153 BADREC LABEL 035AA 19C40001 7 IMM 1154 ADD R7 1 000035AB 1155 OOSRTN LABEL 035AB 5D1F8003 6 STAK 1156 LEAVE POP 1157 * --- 1158 BADREC 000035AA F 19 1126j 1131j 1153= +COMRAFPRC 0000358E F 19 1107 1114= +CURFILBUF 00005400 F 19 1125a 1145a +CURFILFBI 00006437 F 19 1129a 1135a 1146a +CURFILSN 0000649D F 19 1141 DSKGAVERR 000035A9 F 19 1147j 1151= +GETFREADR UUUUUUUU F 19 1118 HAVEIT 0000359C F 19 1123j 1134= +HAVEPAGE 00006555 F 19 1122s +MOVEFP UUUUUUUU F 19 1124 +MOVLOGREC UUUUUUUU F 19 1128 OOSRTN 000035AB F 19 1119j 1155= +PAGOUT UUUUUUUU F 19 1144 TMPADR 00178801 F 19 1110= 1120s 1138 1149 TMPFBITYP 00178802 F 19 1111= 1115s 1136 1159 END of COMRAFPRC 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 82 (TRFILEREC) F 19 File data recovery routines 1161 1162 ********************************************************************************** 1163 * * 1164 * CVTRAFLRG * 1165 * * 1166 * When we get here we have a small or empty RAF that has * 1167 * pages that are beyond the range of a small RAF, so we convert * 1168 * the RAF. Note that we must NOT be called with a tiny RAF * 1169 * (data block only) since we don't know how to make the * 1170 * necessary minor access block. * 1171 * * 1172 * Calling sequence: * 1173 * CALLNP CVTRAFLRG * 1174 * JMP * 1175 * * 1176 * Eats: R0:R3. * 1177 * * 1178 ********************************************************************************** 1179 1180 BLOCK CVTRAFLRG 1181 ENTRY CVTRAFLRG 1182 1183 BEGFRAME 1184 ENDFRAME 1185 035AC DD5F8001 6 STAK 1186 CVTRAFLRG ENTRNP PUSH 035AD DC003AD8 1187 CALL GETFREBLK get a block for the major index 035AE 41005C00 1188 PAR TMPPAGBUF2 address of page 035AF 4100644D 1189 PAR TMPPAGFBI2 address of FBI 035B0 4044000D IMM 1190 PARVL FBITLRAF type that we want 035B1 FE0E35C6 1191 JMP DSKOOS jump if out of disk space 1192 035B2 60806499 2 1193 LD R2 CURFDEPTR point to this files FDE 035B3 E0C89185 3 2 ZBM 1194 EXCH R3 R2,FDDA set new starting address and 1195 * pick up minor address (if present) 035B4 E4C05C00 3 1196 ST R3 TMPPAGBUF2(0) store minor index into major block 1197 * (if empty RAF, then old FDDA was 0) 035B5 60040003 0 IMM 1198 LD R0 RAFTLARGE indicate now a large RAF 035B6 E408BC20 0 2 ZBM 1199 ST R0 R2,FDRAFTYPE in directory entry 035B7 D0089186 2 ZBM 1200 INC R2,FDLEN and up its length by one 1201 035B8 60C4644D 3 IMM 1202 LD R3 ADR TMPPAGFBI2 point to the new FBI 035B9 62004C00 01 1203 LD2 R0 CURACTBUF(UDACCT) get the account name 035BA E616C805 013 BASE 1204 ST2 R0 R3,FBIACCT and fix up FBI 035BB 60004C02 0 1205 LD R0 CURACTBUF(UDPROJ) get the division-project 035BC E416C807 0 3 BASE 1206 ST R0 R3,FBIPROJ and fix up FBI 035BD 6200649D 01 1207 LD2 R0 CURFILSN get the file serial number 035BE E616C808 013 BASE 1208 ST2 R0 R3,FBISERNO and fix up FBI 1209 035BF DC003CF9 1210 CALL PAGOUT force out the new major index block 035C0 41005C00 1211 PAR TMPPAGBUF2 address of page 035C1 4000644D 1212 PARL TMPPAGFBI2 address of FBI 035C2 FEC00000 1213 NOP 0 ignore error 1214 035C3 60044C2B 0 IMM 1215 LD R0 ADR CURACTBUF(UDLIMITS) point to the limits 035C4 D0081188 0 ZBM 1216 INC R0,DSKUSD and up that also 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 83 (TRFILEREC) F 19 File data recovery routines 1217 035C5 19C40001 7 IMM 1218 ADD R7 1 return to P+1 000035C6 1219 DSKOOS LABEL 035C6 5D1F8001 6 STAK 1220 LEAVE POP 1221 * --- 1222 +CURACTBUF 00004C00 F 19 1203 1205 1215a +CURFDEPTR 00006499 F 19 1193 +CURFILSN 0000649D F 19 1207 +CVTRAFLRG 000035AC F 19 1181 1186= DSKOOS 000035C6 F 19 1191j 1219= +GETFREBLK UUUUUUUU F 19 1187 +PAGOUT UUUUUUUU F 19 1210 +TMPPAGBUF2 00005C00 F 19 1188a 1196s 1211a +TMPPAGFBI2 0000644D F 19 1189a 1202a 1212a 1223 END of CVTRAFLRG 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 84 (TRFILEREC) F 19 File data recovery routines 1225 1226 ********************************************************************************** 1227 * * 1228 * DUMMYFILE * 1229 * * 1230 * Subroutine which will create a dummy file given * 1231 * a file data page logical record. * 1232 * Call: * 1233 * CALLNP DUMMYFILE * 1234 * JMP * 1235 * JMP * 1236 * JMP * 1237 * * 1238 * Eats R0:R4 * 1239 * * 1240 ********************************************************************************** 1241 1242 BLOCK DUMMYFILE subroutine 1243 1244 ENTRY DUMMYFILE 1245 1246 BEGFRAME 1247 ENDFRAME 1248 035C7 20202020 1249 NOFILEMSG TEXTZ " File information lost for a file in \S1\.\R2\." 035D4 20202020 1250 NEWNAMEMSG TEXTZ " Recovering the data pages into \S1\.\R2\." 1251 035E0 DD5F8001 6 STAK 1252 DUMMYFILE ENTRNP PUSH 035E1 DC1013F9 @ 1253 CALL @VPREPOUT tell about this happening 035E2 41004C00 1254 PAR CURACTBUF(UDACCT) account name 035E3 41004C02 1255 PAR CURACTBUF(UDPROJ) project 035E4 400035C7 1256 PARL NOFILEMSG the message 035E5 DC403916 1257 CALLNP PRNTPHYS include the record number 1258 035E6 EE00649F 1259 STZ2 CURFILNAM no current file name 035E7 EC0064A1 1260 STZ CURFILEXT no current extension 035E8 60046481 0 IMM 1261 LD R0 ADR TMPFDEBUF point to place to build an FDE 035E9 60440060 1 IMM 1262 LD R1 FDLNTH*CPW size of it 035EA DA000800 0 1 1263 FILLI R0 R1 00 zero it out 1264 035EB 5C006555 1265 CMZ HAVEPAGE do we already have the page? 035EC FE0C35F7 1266 JNE NOWHAVEIT jump if so 1267 * \ / 1268 035ED DC403481 1269 CALLNP INITFPAGES get the data pages accessible 035EE FE0E3620 1270 JMP BADREC bad record 035EF FE0E3620 1271 JMP BADREC if no pages then this record is screwed 1272 035F0 DC00378B 1273 CALL MOVEFP get a file page 035F1 40005400 1274 PARL CURFILBUF where we want it 035F2 FE0E3620 1275 JMP BADREC if we ran out of record 1276 035F3 DC00375B 1277 CALL MOVLOGREC pick up the FBI 035F4 41006437 1278 PAR CURFILFBI where to put it 035F5 4044000B IMM 1279 PARVL FBILNTH how much 035F6 FE0E3620 1280 JMP BADREC out of record 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 85 (TRFILEREC) F 19 File data recovery routines 1281 000035F7 1282 NOWHAVEIT LABEL 035F7 60C46481 3 IMM 1283 LD R3 ADR TMPFDEBUF R3 -> FDE 035F8 60846437 2 IMM 1284 LD R2 ADR CURFILFBI R2 -> FBI 1285 035F9 62168808 012 BASE 1286 LD2 R0 R2,FBISERNO pick up the serial number 035FA E616C80A 013 BASE 1287 ST2 R0 R3,FDSERNO and set in the FDE 1288 035FB 60088080 0 2 ZBM 1289 LD R0 R2,FBITYPE get the FBI type 035FC 60440001 1 IMM 1290 LD R1 HTYPESAF assume a saf 035FD 6404000C 0 IMM 1291 CPR R0 FBITSAF were we right? 035FE FE023605 1292 JEQ HAVETYPE jump if so 035FF 60440002 1 IMM 1293 LD R1 HTYPERAF try a RAF 03600 6404000F 0 IMM 1294 CPR R0 FBITRAFD were we right? 03601 FE023605 1295 JEQ HAVETYPE jump if so 03602 60440003 1 IMM 1296 LD R1 HTYPECODE better be a code data block 03603 64040014 0 IMM 1297 CPR R0 FBITCODED was it? 03604 FE0C3620 1298 JNE BADREC jump if not 1299 * \ / 1300 00003605 1301 HAVETYPE LABEL 03605 E448EA60 1 3 ZBM 1302 ST R1 R3,FDET save the hardware type 1303 1304 ********************************************************************************** 1305 * * 1306 * We have no idea what the name of this file is. * 1307 * Therefore we create a name by taking the high order eleven * 1308 * digits of the time and appending them on a T (for * 1309 * taperecover) then tack on BADFIL for an extension. * 1310 * * 1311 ********************************************************************************** 1312 00003606 1313 EXISTS LABEL 03606 DC40362E 1314 CALLNP FAKENAME build a fake name 03607 60C46481 3 IMM 1315 LD R3 ADR TMPFDEBUF R3 -> FDE 03608 E616C802 013 BASE 1316 ST2 R0 R3,FDNAME set name in the FDE 03609 E496C804 2 3 BASE 1317 ST R2 R3,FDEXTEN put extension in FDE 0360A E600649F 01 1318 ST2 R0 CURFILNAM current file name 0360B E48064A1 2 1319 ST R2 CURFILEXT current extension 0360C EDC8F610 3 ZBM 1320 STW R3,FDGHOST indicate a ghost file 1321 1322 * Add the file to the directory 0360D DC403669 1323 CALLNP FNDDIRENT look for place in the directory 0360E FE0E361F 1324 JMP DISKGOBAD disk error 0360F FE023606 1325 JEQ EXISTS jump if it exists already 03610 DC40367D 1326 CALLNP INSDIRENT add the directory entry 03611 FE0E3621 1327 JMP OOSRTN out of disk space 03612 FE0E361F 1328 JMP DISKGOBAD disk error 1329 03613 EDC06556 1330 STW DATALOST we have lost some data 03614 DC1013F9 @ 1331 CALL @VPREPOUT tell the new name 03615 4100649F 1332 PAR CURFILNAM the name 03616 410064A1 1333 PAR CURFILEXT the extension 03617 400035D4 1334 PARL NEWNAMEMSG the message 1335 03618 60006499 0 1336 LD R0 CURFDEPTR point to the directory entry 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 86 (TRFILEREC) F 19 File data recovery routines 03619 60082A60 0 0 ZBM 1337 LD R0 R0,FDET get the hardware type 0361A 5D603622 0 1338 XCT TYPETAB(R0) call the appopriate subroutine 0361B FE0E3621 1339 JMP OOSRTN out of disk space 0361C FE0E3620 1340 JMP BADREC bad record 0361D FE0E361F 1341 JMP DISKGOBAD bad disk 1342 0361E 19C40001 7 IMM 1343 ADD R7 1 0000361F 1344 DISKGOBAD LABEL 0361F 19C40001 7 IMM 1345 ADD R7 1 00003620 1346 BADREC LABEL 03620 19C40001 7 IMM 1347 ADD R7 1 00003621 1348 OOSRTN LABEL 03621 5D1F8001 6 STAK 1349 LEAVE POP 1350 * --- 1351 00003622 1352 TYPETAB LABEL 03622 0002310D 1353 HALT HALTB310D illegal hardware type 03623 DC4034D9 1354 CALLNP RCVSAFFAKE 03624 DC403549 1355 CALLNP RCVRAFFAKE 03625 DC403584 1356 CALLNP RCVCODEFAKE 1357 BADREC 00003620 F 19 1270j 1271j 1275j 1280j 1298j 1340j 1346= +CURACTBUF 00004C00 F 19 1254a 1255a +CURFDEPTR 00006499 F 19 1336 +CURFILBUF 00005400 F 19 1274a +CURFILEXT 000064A1 F 19 1260s 1319s 1333a +CURFILFBI 00006437 F 19 1278a 1284a +CURFILNAM 0000649F F 19 1259s 1318s 1332a +DATALOST 00006556 F 19 1330s DISKGOBAD 0000361F F 19 1324j 1328j 1341j 1344= +DUMMYFILE 000035E0 F 19 1244 1252= EXISTS 00003606 F 19 1313= 1325j +FAKENAME UUUUUUUU F 19 1314 +FNDDIRENT UUUUUUUU F 19 1323 +HAVEPAGE 00006555 F 19 1265 HAVETYPE 00003605 F 19 1292j 1295j 1301= +INITFPAGES 00003481 F 19 1269 +INSDIRENT UUUUUUUU F 19 1326 +MOVEFP UUUUUUUU F 19 1273 +MOVLOGREC UUUUUUUU F 19 1277 NEWNAMEMSG 000035D4 F 19 1250= 1334a NOFILEMSG 000035C7 F 19 1249= 1256a NOWHAVEIT 000035F7 F 19 1266j 1282= OOSRTN 00003621 F 19 1327j 1339j 1348= +PRNTPHYS UUUUUUUU F 19 1257 +RCVCODEFAKE 00003584 F 19 1356 +RCVRAFFAKE 00003549 F 19 1355 +RCVSAFFAKE 000034D9 F 19 1354 +TMPFDEBUF 00006481 F 19 1261a 1283a 1315a TYPETAB 00003622 F 19 1338 1352= +VPREPOUT 000013F9 F 19 1253 1331 1358 END of DUMMYFILE subroutine 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 87 (TRFILEREC) F 19 File data recovery routines 1360 1361 ********************************************************************************** 1362 * * 1363 * FAKENAME * 1364 * * 1365 * Subroutine which builds a fake name for a fake file. * 1366 * Name is of the format Txxxxxxxxxxx.BADFIL where xxxxxxxxxxx * 1367 * is eleven digits of the the system time. * 1368 * Call: * 1369 * CALLNP FAKENAME * 1370 * R0,R1 = file name * 1371 * R2 = extension * 1372 * * 1373 * Eats R0:R4 * 1374 * * 1375 ********************************************************************************** 1376 1377 BLOCK FAKENAME subroutine 1378 1379 ENTRY FAKENAME 1380 1381 BEGFRAME 00178801 6 BASE 1382 TIME BSS 2 1383 ENDFRAME 1384 03626 30313233 1385 HEXTAB TEXT "0123456789ABCDEF" 0362A 020C3626 1386 HEXC PTR HEXTAB/BITS 0:7 hex decode table 1387 0362B 2E424144 1388 BADFIL TEXT ".BADFIL" extension for name 00000007 ABS 1389 BADFILLEN EQU 7 0362D 020C6536 1390 NAMEPTR PTR FILENAME 1391 0362E DD5F8003 6 STAK 1392 FAKENAME ENTRNP PUSH 0362F DC5013FB @ 1393 CALLNP @VGETDATE pick up the current date 03630 E6978801 236 BASE 1394 ST2 R2 SP,TIME save the time 1395 03631 60040054 0 IMM 1396 LD R0 "T" the leading character 03632 E410362D 0 @ 1397 ST R0 @NAMEPTR put into the file name 1398 03633 60C40001 3 IMM 1399 LD R3 1 index into name 03634 3889A841 2 6 ZBM 1400 LEA R2 SP,TIME/BITS 20:23 point to first digit of name 03635 6044000B 1 IMM 1401 LD R1 11 number of digits 00003636 1402 LOOP1 LABEL 03636 60168400 0 2 @R 1403 LD R0 @R2 get 4 bits of number 03637 6030362A 0 0 @ 1404 LD R0 @HEXC(R0) get proper ASCII character 03638 E436362D 0 3 @ 1405 ST R0 @NAMEPTR(R3) stuff into output line 03639 18C40001 3 IMM 1406 ADD R3 1 advance buffer pointer 0363A D0928000 2 REG 1407 INCP R2 move to next digit 0363B FA623636 1 1408 DRJ R1 LOOP1 and cycle through all digits 1409 * \ / 1410 0363C 6004362B 0 IMM 1411 LD R0 ADR BADFIL point to the extension 0363D 60440007 1 IMM 1412 LD R1 BADFILLEN how much there is 0363E 38B6362D 2 3 @ 1413 LEA R2 @NAMEPTR(R3) R3 -> end of file name 0363F FE400000 1414 CMOVE tack on the extension 1415 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 88 (TRFILEREC) F 19 File data recovery routines 03640 6100362D 4 1416 LD R4 NAMEPTR R4 -> file name 03641 6144653B 5 IMM 1417 LD R5 ADR BZFPROT R5 -> block to pack file name into 03642 60C40000 3 IMM 1418 LD R3 0 no default extension 03643 DC5013F6 @ 1419 CALLNP @VFETCHFNM pack the file name 03644 62006545 01 1420 LD2 R0 BZFFIL pick up the account name 03645 60806547 2 1421 LD R2 BZFEXT get the extension 03646 5D1F8003 6 STAK 1422 LEAVE POP 1423 * --- 1424 BADFIL 0000362B F 19 1388= 1411a BADFILLEN 00000007 F 19 1389= 1412 +BZFEXT 00006547 F 19 1421 +BZFFIL 00006545 F 19 1420 +BZFPROT 0000653B F 19 1417a +FAKENAME 0000362E F 19 1379 1392= +FILENAME 02006536 F 19 1390a HEXC 0000362A F 19 1386= 1404 HEXTAB 00003626 F 19 1385= 1386a LOOP1 00003636 F 19 1402= 1408j NAMEPTR 0000362D F 19 1390= 1397s 1405s 1413a 1416 TIME 00178801 F 19 1382= 1394s 1400a +VFETCHFNM 000013F6 F 19 1419 +VGETDATE 000013FB F 19 1393 1425 END of FAKENAME subroutine 788 INPUT TRDIRMAN input the directory manager 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 89 (TRDIRMAN) F 20 Directory manager 3 4 ********************************************************************************** 5 * * 6 * LOOKUPACT * 7 * * 8 * This routine will set up a file that was busy when we * 9 * were doing the account, but now has its data at the end of * 10 * the tape. We pack the account name out of the tape string. * 11 * * 12 * Calling sequence: * 13 * CALLNP LOOKUPACT * 14 * JMP * 15 * JMP * 16 * * 17 * Eats: R0:R5. * 18 * * 19 ********************************************************************************** 20 21 BLOCK LOOKUPACT 22 ENTRY LOOKUPACT 23 24 BEGFRAME 25 ENDFRAME 26 03647 DD5F8001 6 STAK 27 LOOKUPACT ENTRNP PUSH 03648 6000303B 0 28 LD R0 TAPSTRPTR point to the beginning of the string 03649 6044000D 1 IMM 29 LD R1 13 length of the string 0364A DA1C083A 0 1 30 SRCHI R0 R1 ":" move past the volume name 0364B FE0C3668 31 JNE BADREC jump if not found 32 * \ / 0364C 61120000 4 0 REG 33 LD R4 R0 copy the pointer 0364D D0930000 4 REG 34 INCP R4 point to the start of the account name 0364E 60C40000 3 IMM 35 LD R3 0 say no default extension 0364F 6144653B 5 IMM 36 LD R5 ADR BZFPROT and point to the result block 03650 DC5013F6 @ 37 CALLNP @VFETCHFNM pack up the file name 03651 FA083668 0 38 JLTZ R0 BADREC jump on any error 39 * \ / 03652 6004E067 0 IMM 40 LD R0 ADR BZYLSTPROT point to beginning of list 00003653 41 LOOKLOOP LABEL 03653 62406540 12 42 LD2 R1 BZFACT fetch up the account name 03654 60C06542 3 43 LD R3 BZFPRJ and the project from result block 03655 6A560800 120 BASE 44 UCPR2 R1 R0,BZYLSTACT is there a match? 03656 FE02365B 45 JEQ CHKPRJ jump if so 46 * \ / 00003657 47 NXTONE LABEL 03657 18040006 0 IMM 48 ADD R0 BZYLSTLEN move to next element 03658 6400E066 0 49 CPR R0 BZYLSTPTR are we past end? 03659 FE083653 50 JLT LOOKLOOP check next entry if not 0365A FE0E3668 51 JMP BADREC end of table with no find 52 * --- 53 0000365B 54 CHKPRJ LABEL 0365B 68D60802 3 0 BASE 55 UCPR R3 R0,BZYLSTPRJ compare the project 0365C FE0C3657 56 JNE NXTONE jump if not match 57 * \ / 0365D 62406545 12 58 LD2 R1 BZFFIL get file name 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 90 (TRDIRMAN) F 20 Directory manager 0365E 60C06547 3 59 LD R3 BZFEXT and extension 0365F 6A560803 120 BASE 60 UCPR2 R1 R0,BZYLSTFIL do the names match? 03660 FE0C3657 61 JNE NXTONE jump if not 62 * \ / 03661 68D60805 3 0 BASE 63 UCPR R3 R0,BZYLSTEXT compare extensions 03662 FE0C3657 64 JNE NXTONE jump if no match 65 * \ / 03663 D1560800 0 BASE 66 STMW R0,BZYLSTACT mark as recovered 67 03664 62806540 23 68 LD2 R2 BZFACT fetch up the account name 03665 61006542 4 69 LD R4 BZFPRJ fetch up the project 03666 DC403C76 70 CALLNP SETUPACT get the UDIR block in 71 03667 19C40001 7 IMM 72 ADD R7 1 advance to good return 00003668 73 BADREC LABEL 03668 5D1F8001 6 STAK 74 LEAVE POP 75 * --- 76 BADREC 00003668 F 20 31j 38j 51j 73= +BZFACT 00006540 F 20 42 68 +BZFEXT 00006547 F 20 59 +BZFFIL 00006545 F 20 58 +BZFPRJ 00006542 F 20 43 69 +BZFPROT 0000653B F 20 36a +BZYLSTACT 00160800 F 20 44 66s +BZYLSTEXT 00160805 F 20 63 +BZYLSTFIL 00160803 F 20 60 +BZYLSTLEN 00000006 F 20 48 +BZYLSTPRJ 00160802 F 20 55 +BZYLSTPROT 0000E067 F 20 40a +BZYLSTPTR 0000E066 F 20 49 CHKPRJ 0000365B F 20 45j 54= LOOKLOOP 00003653 F 20 41= 50j +LOOKUPACT 00003647 F 20 22 27= NXTONE 00003657 F 20 47= 56j 61j 64j +SETUPACT UUUUUUUU F 20 70 +TAPSTRPTR 0000303B F 20 28 +VFETCHFNM 000013F6 F 20 37 77 END LOOKUPACT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 91 (TRDIRMAN) F 20 Directory manager 79 80 ********************************************************************************** 81 * * 82 * FNDDIRENT * 83 * * 84 * This routine will look for a file in the current directory. * 85 * * 86 * Calling sequence: * 87 * CURACTBUF = UDIR1 * 88 * CURFILNAM = file name * 89 * CURFILEXT = file extension * 90 * CALLNP FNDDIRENT * 91 * JMP * 92 * insertion point, or existing FDE * 94 * * 95 * Eats: R0:R3,R5 * 96 * * 97 ********************************************************************************** 98 99 BLOCK FNDDIRENT 100 ENTRY FNDDIRENT 101 102 BEGFRAME 103 ENDFRAME 104 03669 DD5F8001 6 STAK 105 FNDDIRENT ENTRNP PUSH 0366A 6200649F 01 106 LD2 R0 CURFILNAM get the current file name 0366B 608064A1 2 107 LD R2 CURFILEXT and extension 0366C 61444C00 5 IMM 108 LD R5 ADR CURACTBUF point to the UDIR1 0366D 5C09401A 5 ZBM 109 CMZ R5,UDTYPE is it a large UDIR? 0366E FE023674 110 JEQ ITSSMLDIR jump if small 111 * \ / 0366F DC4036A6 112 CALLNP FNDUDR2BLK find the right UDIR2 bucket 03670 FE0E367C 113 JMP BADDSK jump on disk error 114 03671 DC4036C3 115 CALLNP FNDUDR2ENT try to find the entry, or a spot for it 03672 FE0E3678 116 JMP FNDENT jump if found 117 03673 FE0E3676 118 JMP NOFND say not found 119 * --- 120 00003674 121 ITSSMLDIR LABEL 03674 DC4036D6 122 CALLNP FNDUDRENT try to find the entry, or a spot for it 03675 FE0E3678 123 JMP FNDENT jump if found 00003676 124 NOFND LABEL 03676 5C040001 IMM 125 CMZ 1 set to not equal 03677 FE0E3679 126 JMP ALLDONE return condition 127 * --- 128 00003678 129 FNDENT LABEL 03678 5C040000 IMM 130 CMZ 0 set to equal 00003679 131 ALLDONE LABEL 03679 E5406499 5 132 ST R5 CURFDEPTR remember for later 0367A D80BDA20 7 CBM 133 STPSR R7/BITS 13:14 set into return PSR/PC 0367B 19C40001 7 IMM 134 ADD R7 1 return to P+2 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 92 (TRDIRMAN) F 20 Directory manager 0000367C 135 BADDSK LABEL 0367C 5D1F8001 6 STAK 136 LEAVE POP 137 * --- 138 ALLDONE 00003679 F 20 126j 131= BADDSK 0000367C F 20 113j 135= +CURACTBUF 00004C00 F 20 108a +CURFDEPTR 00006499 F 20 132s +CURFILEXT 000064A1 F 20 107 +CURFILNAM 0000649F F 20 106 +FNDDIRENT 00003669 F 20 100 105= FNDENT 00003678 F 20 116j 123j 129= +FNDUDR2BLK UUUUUUUU F 20 112 +FNDUDR2ENT UUUUUUUU F 20 115 +FNDUDRENT UUUUUUUU F 20 122 ITSSMLDIR 00003674 F 20 110j 121= NOFND 00003676 F 20 118j 124= 139 END of FNDDIRENT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 93 (TRDIRMAN) F 20 Directory manager 141 142 ********************************************************************************** 143 * * 144 * INSDIRENT * 145 * * 146 * This routine will take the temporary FDE and put it * 147 * into the users directory. * 148 * * 149 * Calling sequence: * 150 * CALLNP INSDIRENT * 151 * JMP * 152 * JMP * 153 * * 154 * Eats: R0:R3,R5. * 155 * * 156 ********************************************************************************** 157 158 BLOCK INSDIRENT 159 ENTRY INSDIRENT 160 161 BEGFRAME 162 ENDFRAME 163 0367D DD5F8001 6 STAK 164 INSDIRENT ENTRNP PUSH 0367E 60044C00 0 IMM 165 LD R0 ADR CURACTBUF point to the directory 0367F 5C08001A 0 ZBM 166 CMZ R0,UDTYPE what type of directory is it? 03680 FE023687 167 JEQ SMLDIR jump if small directory 168 * \ / 03681 5C0053D8 169 CMZ CURUD2BUF(UD2LFDE) do we need to split? 03682 FE023690 170 JEQ MOVENT jump if not 171 * \ / 03683 DC403711 172 CALLNP CVTLRGDIR split a large dir 03684 FE0E3697 173 JMP OOSRTN jump if out of disk space 03685 FE0E3696 174 JMP BADDSK jump if disk error 175 03686 FE0E368B 176 JMP SHARUPD put entry in directory 177 * --- 178 00003687 179 SMLDIR LABEL 03687 5C004FD8 180 CMZ CURACTBUF(UD1LFDE) do we need to split to a large one? 03688 FE023690 181 JEQ MOVENT jump if not 182 * \ / 03689 DC4036E7 183 CALLNP CVTSMLDIR convert a small to a large 0368A FE0E3697 184 JMP OOSRTN jump if out of disk space 185 * \ / 186 0000368B 187 SHARUPD LABEL 0368B DC403669 188 CALLNP FNDDIRENT find in new structure 0368C FE0E3696 189 JMP BADDSK jump if disk error 0368D FE023696 190 JEQ DUPENTRY if found, assume bad disk 191 * \ / 192 0368E 6000649A 0 193 LD R0 CURUD1POS point to entry in index block 0368F D016000C 0 CACH 194 INC R0,UDINDXNUM and say one more in the structure 195 * \ / 196 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 94 (TRDIRMAN) F 20 Directory manager 00003690 197 MOVENT LABEL 03690 DC403698 198 CALLNP OPENHOLE make a hole for the new entry 03691 60046481 0 IMM 199 LD R0 ADR TMPFDEBUF point to FDE 03692 60440060 1 IMM 200 LD R1 FDLNTH*CPW number of chars. to move 03693 60806499 2 201 LD R2 CURFDEPTR place in UDIR block 03694 FE400000 202 CMOVE 203 03695 19C40001 7 IMM 204 ADD R7 1 return to P+3 00003696 205 DUPENTRY LABEL 00003696 206 BADDSK LABEL 03696 19C40001 7 IMM 207 ADD R7 1 return to P+2 00003697 208 OOSRTN LABEL 03697 5D1F8001 6 STAK 209 LEAVE POP 210 * --- 211 BADDSK 00003696 F 20 174j 189j 206= +CURACTBUF 00004C00 F 20 165a 180 +CURFDEPTR 00006499 F 20 201 +CURUD1POS 0000649A F 20 193 +CURUD2BUF 00005000 F 20 169 +CVTLRGDIR UUUUUUUU F 20 172 +CVTSMLDIR UUUUUUUU F 20 183 DUPENTRY 00003696 F 20 190j 205= +FNDDIRENT 00003669 F 20 188 +INSDIRENT 0000367D F 20 159 164= MOVENT 00003690 F 20 170j 181j 197= OOSRTN 00003697 F 20 173j 184j 208= +OPENHOLE UUUUUUUU F 20 198 SHARUPD 0000368B F 20 176j 187= SMLDIR 00003687 F 20 167j 179= +TMPFDEBUF 00006481 F 20 199a 212 END of INSDIRENT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 95 (TRDIRMAN) F 20 Directory manager 214 215 ********************************************************************************** 216 * * 217 * OPENHOLE * 218 * This routine opens up a hole in a directory so that a * 219 * new FDE can be emplaced. We know that we have room when we * 220 * get here. * 221 * Call: * 222 * CURFDEPTR => place for new entry * 223 * CALLNP OPENHOLE * 224 * Eats R0:R1 * 225 * * 226 ********************************************************************************** 227 228 BLOCK OPENHOLE 229 ENTRY OPENHOLE 230 231 BEGFRAME 232 ENDFRAME 233 03698 DD5F8001 6 STAK 234 OPENHOLE ENTRNP PUSH 03699 5C106499 @ 235 CMZ @CURFDEPTR check for adding entry on end, quick exit 0369A FE0236A5 236 JEQ QUICKEXIT open space available 0369B 60406499 1 237 LD R1 CURFDEPTR get current location 0369C 18440400 1 IMM 238 ADD R1 WPP into next page 0369D 7847FC00 1 IMM 239 AND R1 -WPP mask off to page end 0369E 1847FFE8 1 IMM 240 ADD R1 -FDLNTH move down to first move place 0369F FE0E36A2 241 JMP ENDTEST 242 * --- 243 000036A0 244 FULLOOP LABEL 036A0 60164800 0 1 BASE 245 LD R0 R1,0 pick up word 036A1 E4164818 0 1 BASE 246 ST R0 R1,FDLNTH and move to higher memory 000036A2 247 ENDTEST LABEL 036A2 64406499 1 248 CPR R1 CURFDEPTR check for done 036A3 FE0236A5 249 JEQ QUICKEXIT jump if now down to insert point 036A4 FA6236A0 1 250 DRJ R1 FULLOOP down one location and repeat 251 * --- 252 000036A5 253 QUICKEXIT LABEL 036A5 5D1F8001 6 STAK 254 LEAVE POP return 255 * --- 256 +CURFDEPTR 00006499 F 20 235 237 248 ENDTEST 000036A2 F 20 241j 247= FULLOOP 000036A0 F 20 244= 250j +OPENHOLE 00003698 F 20 229 234= QUICKEXIT 000036A5 F 20 236j 249j 253= 257 END of OPENHOLE 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 96 (TRDIRMAN) F 20 Directory manager 259 260 ********************************************************************************** 261 * * 262 * FNDUDR2BLK * 263 * * 264 * Given that we have a RAF type directory this routine * 265 * will find the UDIR2 block that we want to look in for a * 266 * given file. * 267 * Call: * 268 * R0,R1 = account name * 269 * R2 = extension * 270 * CALLNP FNDUDR2BLK * 271 * JMP * 272 * * 273 * Eats: R0:R3. * 274 * * 275 ********************************************************************************** 276 277 BLOCK FNDUDR2BLK 278 ENTRY FNDUDR2BLK 279 280 BEGFRAME 281 ENDFRAME 282 036A6 DD5F8001 6 STAK 283 FNDUDR2BLK ENTRNP PUSH 036A7 60C44C65 3 IMM 284 LD R3 ADR CURACTBUF(UDFDLIST+UDINDXLEN) point to second index 000036A8 285 INDXLOOP LABEL 036A8 5C08D183 3 ZBM 286 CMZ R3,UDINDXADR is there an entry here? 036A9 FE0236B1 287 JEQ BACKUP jump if we went too far 036AA 6A16C800 013 BASE 288 UCPR2 R0 R3,UDINDXNAM is this the right index? 036AB FE0836B1 289 JLT BACKUP jump if this entry after desired 036AC FE0436AF 290 JGT NEXTONE jump if desired entry farther 036AD 6896C802 2 3 BASE 291 UCPR R2 R3,UDINDXEXT names equal, check extension 036AE FE0836B1 292 JLT BACKUP jump if too far 000036AF 293 NEXTONE LABEL 036AF 18C40005 3 IMM 294 ADD R3 UDINDXLEN point to the next index 036B0 FE0E36A8 295 JMP INDXLOOP and check the next one 296 * --- 297 000036B1 298 BACKUP LABEL 036B1 10C40005 3 IMM 299 SUB R3 UDINDXLEN move back to the previous entry 036B2 E4C0649A 3 300 ST R3 CURUD1POS and remember for later 036B3 6088D183 2 3 ZBM 301 LD R2 R3,UDINDXADR get the address 036B4 6480649B 2 302 CPR R2 CURUD2BLK is this block already resident? 036B5 FE0236C1 303 JEQ HAVEBLOCK if so then don't read it 304 * \ / 305 036B6 E480649B 2 306 ST R2 CURUD2BLK set the new current UDIR2 036B7 DC003CF9 307 CALL PAGOUT write out current UDIR2 036B8 41005000 308 PAR CURUD2BUF address of page 036B9 4000642C 309 PARL CURUD2FBI address of FBI 036BA FE0E36C2 310 JMP BADDSK jump on error 036BB DC003CE1 311 CALL PAGIN read in the UDIR2 block 036BC 41005000 312 PAR CURUD2BUF address of page 036BD 4100642C 313 PAR CURUD2FBI address of FBI 036BE 4144000A IMM 314 PARV FBITUDIR2 type we expect 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 97 (TRDIRMAN) F 20 Directory manager 036BF 4040649B 315 PARVL CURUD2BLK ms address 036C0 FE0E36C2 316 JMP BADDSK jump on error 317 * \ / 318 000036C1 319 HAVEBLOCK LABEL 036C1 19C40001 7 IMM 320 ADD R7 1 return address will be P+2 000036C2 321 BADDSK LABEL 036C2 5D1F8001 6 STAK 322 LEAVE POP 323 * --- 324 BACKUP 000036B1 F 20 287j 289j 292j 298= BADDSK 000036C2 F 20 310j 316j 321= +CURACTBUF 00004C00 F 20 284a +CURUD1POS 0000649A F 20 300s +CURUD2BLK 0000649B F 20 302 306s 315 +CURUD2BUF 00005000 F 20 308a 312a +CURUD2FBI 0000642C F 20 309a 313a +FNDUDR2BLK 000036A6 F 20 278 283= HAVEBLOCK 000036C1 F 20 303j 319= INDXLOOP 000036A8 F 20 285= 295j NEXTONE 000036AF F 20 290j 293= +PAGIN UUUUUUUU F 20 311 +PAGOUT UUUUUUUU F 20 307 325 END of FNDUDR2BLK 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 98 (TRDIRMAN) F 20 Directory manager 327 328 ********************************************************************************** 329 * * 330 * FNDUDR2ENT * 331 * * 332 * We have the UDIR2 block that we want to look at in * 333 * CURUD2BUF. Find an insertion point to a match. * 334 * * 335 * Calling sequence: * 336 * CALLNP FNDUDR2ENT * 337 * JMP * 338 * * 339 * Eats: R0:R2,R5. * 340 * * 341 ********************************************************************************** 342 343 BLOCK FNDUDR2ENT 344 ENTRY FNDUDR2ENT 345 346 BEGFRAME 347 ENDFRAME 348 036C3 DD5F8001 6 STAK 349 FNDUDR2ENT ENTRNP PUSH 036C4 6200649F 01 350 LD2 R0 CURFILNAM get the file name 036C5 608064A1 2 351 LD R2 CURFILEXT and the extension 036C6 61445000 5 IMM 352 LD R5 ADR CURUD2BUF point to the first entry 000036C7 353 TRYNXT LABEL 036C7 5C174800 5 BASE 354 CMZ R5,0 any more entries? 036C8 FE0236D4 355 JEQ NOTFND not found if no more 356 * \ / 036C9 654453D8 5 IMM 357 CPR R5 ADR CURUD2BUF(UD2LFDE) are we at last entry? 036CA FE0436D4 358 JGT NOTFND jump if past last entry 359 * \ / 036CB 6A174802 015 BASE 360 UCPR2 R0 R5,FDNAME compare our account with this entry 036CC FE0236D0 361 JEQ MAYEXST jump if we might have found it 036CD FE0836D4 362 JLT NOTFND we now have insertion point 000036CE 363 NXTENT LABEL 036CE 19440018 5 IMM 364 ADD R5 FDLNTH advance to next FDE 036CF FE0E36C7 365 JMP TRYNXT try for this entry 366 * --- 367 000036D0 368 MAYEXST LABEL 036D0 68974804 2 5 BASE 369 UCPR R2 R5,FDEXTEN compare the extension 036D1 FE0236D5 370 JEQ FNDENT jump if found 036D2 FE0836D4 371 JLT NOTFND we now have insertion point 372 * \ / 036D3 FE0E36CE 373 JMP NXTENT go try the next one 374 * --- 375 000036D4 376 NOTFND LABEL 036D4 19C40001 7 IMM 377 ADD R7 1 return to P+2 000036D5 378 FNDENT LABEL 036D5 5D1F8001 6 STAK 379 LEAVE POP 380 * --- 381 +CURFILEXT 000064A1 F 20 351 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 99 (TRDIRMAN) F 20 Directory manager +CURFILNAM 0000649F F 20 350 +CURUD2BUF 00005000 F 20 352a 357a FNDENT 000036D5 F 20 370j 378= +FNDUDR2ENT 000036C3 F 20 344 349= MAYEXST 000036D0 F 20 361j 368= NOTFND 000036D4 F 20 355j 358j 362j 371j 376= NXTENT 000036CE F 20 363= 373j TRYNXT 000036C7 F 20 353= 365j 382 END of FNDUDR2ENT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 100 (TRDIRMAN) F 20 Directory manager 384 385 ********************************************************************************** 386 * * 387 * FNDUDRENT * 388 * * 389 * Given that we have a small type of directory this * 390 * routine will look for a file, and if not found, find it's * 391 * insertion point. * 392 * * 393 * Calling sequence: * 394 * R0,R1 = account name * 395 * R2 = extension * 396 * CALLNP FNDUDRENT * 397 * JMP * 398 * * 399 * Eats: R0:R2,R5. * 400 * * 401 ********************************************************************************** 402 403 BLOCK FNDUDRENT 404 ENTRY FNDUDRENT 405 406 BEGFRAME 407 ENDFRAME 408 036D6 DD5F8001 6 STAK 409 FNDUDRENT ENTRNP PUSH 036D7 61444C60 5 IMM 410 LD R5 ADR CURACTBUF(UDFDLIST) point to start of FDE entries 000036D8 411 TRYNXT LABEL 036D8 5C174800 5 BASE 412 CMZ R5,0 any more entries? 036D9 FE0236E5 413 JEQ NOTFND not found if no more 414 * \ / 036DA 65444FD8 5 IMM 415 CPR R5 ADR CURACTBUF(UD1LFDE) are we at last entry? 036DB FE0436E5 416 JGT NOTFND jump if past last entry 417 * \ / 036DC 6A174802 015 BASE 418 UCPR2 R0 R5,FDNAME compare our account with this entry 036DD FE0236E1 419 JEQ MAYEXST jump if we might have found it 036DE FE0836E5 420 JLT NOTFND we now have insertion point 421 000036DF 422 NXTENT LABEL 036DF 19440018 5 IMM 423 ADD R5 FDLNTH point to next FDE 036E0 FE0E36D8 424 JMP TRYNXT try for this entry 425 * --- 426 000036E1 427 MAYEXST LABEL 036E1 68974804 2 5 BASE 428 UCPR R2 R5,FDEXTEN compare the extension 036E2 FE0236E6 429 JEQ FNDENT jump if found 036E3 FE0836E5 430 JLT NOTFND we now have insertion point 431 * \ / 036E4 FE0E36DF 432 JMP NXTENT go try the next one 433 * --- 434 000036E5 435 NOTFND LABEL 036E5 19C40001 7 IMM 436 ADD R7 1 return to P+2 000036E6 437 FNDENT LABEL 036E6 5D1F8001 6 STAK 438 LEAVE POP 439 * --- 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 101 (TRDIRMAN) F 20 Directory manager 440 +CURACTBUF 00004C00 F 20 410a 415a FNDENT 000036E6 F 20 429j 437= +FNDUDRENT 000036D6 F 20 404 409= MAYEXST 000036E1 F 20 419j 427= NOTFND 000036E5 F 20 413j 416j 420j 430j 435= NXTENT 000036DF F 20 422= 432j TRYNXT 000036D8 F 20 411= 424j 441 END of FNDUDRENT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 102 (TRDIRMAN) F 20 Directory manager 443 444 ********************************************************************************** 445 * * 446 * CVTSMLDIR * 447 * * 448 * This routine will convert a small directory into a large * 449 * one (RAF type). * 450 * * 451 * Calling sequence: * 452 * CALLNP CVTSMLDIR * 453 * JMP * 454 * * 455 * Eats: R0:R3. * 456 * * 457 ********************************************************************************** 458 459 BLOCK CVTSMLDIR 460 ENTRY CVTSMLDIR 461 462 BEGFRAME 00178801 6 BASE 463 TMPDSKADR BSS 1 temp. to hold new ms address 464 ENDFRAME 465 036E7 DD5F8002 6 STAK 466 CVTSMLDIR ENTRNP PUSH 036E8 DC003AD8 467 CALL GETFREBLK get a free block 036E9 41005000 468 PAR CURUD2BUF address of page 036EA 4100642C 469 PAR CURUD2FBI address of FBI 036EB 4044000A IMM 470 PARVL FBITUDIR2 type that we want 036EC FE0E3710 471 JMP OOSRTN jump on out of space 036ED E4D78801 3 6 BASE 472 ST R3 SP,TMPDSKADR remember the new address 036EE E4C0649B 3 473 ST R3 CURUD2BLK keep track of the current UDIR2 474 036EF 60044C60 0 IMM 475 LD R0 ADR CURACTBUF(UDFDLIST) point to FDE's 036F0 60440E40 1 IMM 476 LD R1 UDFDECNT*FDLNTH*CPW number of chars to move 036F1 60845000 2 IMM 477 LD R2 ADR CURUD2BUF destination of move 036F2 FE400000 478 CMOVE 479 036F3 6004642C 0 IMM 480 LD R0 ADR CURUD2FBI point to the new FBI 036F4 62404C00 12 481 LD2 R1 CURACTBUF(UDACCT) get this accounts name 036F5 E6560805 120 BASE 482 ST2 R1 R0,FBIACCT and put in new block 036F6 60404C02 1 483 LD R1 CURACTBUF(UDPROJ) get the project-division 036F7 E4560807 1 0 BASE 484 ST R1 R0,FBIPROJ and put in new block 036F8 62404C20 12 485 LD2 R1 CURACTBUF(UDSERNO) get the account serial # 036F9 E6560808 120 BASE 486 ST2 R1 R0,FBISERNO and put in new block 487 036FA 60044C00 0 IMM 488 LD R0 ADR CURACTBUF point to the directory 036FB EDC8001A 0 ZBM 489 STW R0,UDTYPE say it's a large directory 490 036FC 60440E40 1 IMM 491 LD R1 UDFDECNT*FDLNTH*CPW number of chars to fill 036FD 60844C60 2 IMM 492 LD R2 ADR CURACTBUF(UDFDLIST) destination of fill 036FE FE580000 493 CFILL 0 zero out directory 494 036FF 60044C60 0 IMM 495 LD R0 ADR CURACTBUF(UDFDLIST) point to space for pointers 03700 60445000 1 IMM 496 LD R1 ADR CURUD2BUF point to the UDIR2 block 03701 62964802 231 BASE 497 LD2 R2 R1,FDNAME get first name in UDIR2 03702 E6960800 230 BASE 498 ST2 R2 R0,UDINDXNAM and fix up UDIR1 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 103 (TRDIRMAN) F 20 Directory manager 03703 60964804 2 1 BASE 499 LD R2 R1,FDEXTEN and get extension also 03704 E4960802 2 0 BASE 500 ST R2 R0,UDINDXEXT fix up rest of name 03705 60978801 2 6 BASE 501 LD R2 SP,TMPDSKADR get address of new block 03706 E4881183 2 0 ZBM 502 ST R2 R0,UDINDXADR put pointer into UDIR1 03707 60840026 2 IMM 503 LD R2 UDFDECNT number of FDE's in UDIR2 03708 E496000C 2 0 CACH 504 ST R2 R0,UDINDXNUM and fix up entry in UDIR1 505 03709 DC003CF9 506 CALL PAGOUT force out the new UDIR2 block 0370A 41005000 507 PAR CURUD2BUF address of page 0370B 4000642C 508 PARL CURUD2FBI address of FBI 0370C FEC00000 509 NOP 0 ignore error 510 0370D 60044C2B 0 IMM 511 LD R0 ADR CURACTBUF(UDLIMITS) point to the limits 0370E D0081188 0 ZBM 512 INC R0,DSKUSD and up it by one 513 0370F 19C40001 7 IMM 514 ADD R7 1 return address will be P+2 00003710 515 OOSRTN LABEL 03710 5D1F8002 6 STAK 516 LEAVE POP 517 * --- 518 +CURACTBUF 00004C00 F 20 475a 481 483 485 488a 492a 495a 511a +CURUD2BLK 0000649B F 20 473s +CURUD2BUF 00005000 F 20 468a 477a 496a 507a +CURUD2FBI 0000642C F 20 469a 480a 508a +CVTSMLDIR 000036E7 F 20 460 466= +GETFREBLK UUUUUUUU F 20 467 OOSRTN 00003710 F 20 471j 515= +PAGOUT UUUUUUUU F 20 506 TMPDSKADR 00178801 F 20 463= 472s 501 519 END of CVTSMLDIR 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 104 (TRDIRMAN) F 20 Directory manager 521 522 ********************************************************************************** 523 * * 524 * CVTLRGDIR * 525 * * 526 * If the current UDIR2 block is full and needs to be * 527 * split this routine will handle the splitting of this block. * 528 * * 529 * Calling sequence: * 530 * R4 => UDIR2 index element in UDIR1 block that we will split * 531 * CALLNP CVTLRGDIR * 532 * JMP * 533 * JMP * 534 * * 535 * Eats: R0:R3. * 536 * * 537 ********************************************************************************** 538 539 BLOCK CVTLRGDIR 540 ENTRY CVTLRGDIR 541 542 BEGFRAME 00178801 6 BASE 543 NEWBLKNUM BSS 1 temp. for new block allocated 544 ENDFRAME 545 03711 DD5F8002 6 STAK 546 CVTLRGDIR ENTRNP PUSH 03712 DC003AD8 547 CALL GETFREBLK get a new UDIR2 block 03713 41005C00 548 PAR TMPPAGBUF2 address of page 03714 4100644D 549 PAR TMPPAGFBI2 address of FBI 03715 4044000A IMM 550 PARVL FBITUDIR2 type that we want 03716 FE0E3742 551 JMP NOSPACE jump if out of space 03717 E4D78801 3 6 BASE 552 ST R3 SP,NEWBLKNUM remember new block number 553 03718 6004644D 0 IMM 554 LD R0 ADR TMPPAGFBI2 point to the new FBI 03719 62404C00 12 555 LD2 R1 CURACTBUF(UDACCT) get this accounts name 0371A E6560805 120 BASE 556 ST2 R1 R0,FBIACCT and put in new block 0371B 60404C02 1 557 LD R1 CURACTBUF(UDPROJ) get the project-division 0371C E4560807 1 0 BASE 558 ST R1 R0,FBIPROJ and put in new block 0371D 62404C20 12 559 LD2 R1 CURACTBUF(UDSERNO) get the account serial # 0371E E6560808 120 BASE 560 ST2 R1 R0,FBISERNO and put in new block 561 0371F 600451F8 0 IMM 562 LD R0 ADR CURUD2BUF(((UD2FDECNT+1)/2)*FDLNTH) start of move 03720 604407E0 1 IMM 563 LD R1 CPW*((UD2FDECNT/2)*FDLNTH) get number of chars. to move 03721 60845C00 2 IMM 564 LD R2 ADR TMPPAGBUF2 address for destination 03722 FE400000 565 CMOVE split into two 566 03723 DC003CF9 567 CALL PAGOUT force out the new block 03724 41005C00 568 PAR TMPPAGBUF2 address of page 03725 4000644D 569 PARL TMPPAGFBI2 address of FBI 03726 FE0E3741 570 JMP BADDSK jump on disk error 571 03727 604407E0 1 IMM 572 LD R1 CPW*((UD2FDECNT/2)*FDLNTH) number of chars. we moved 03728 608451F8 2 IMM 573 LD R2 ADR CURUD2BUF(((UD2FDECNT+1)/2)*FDLNTH) part we just moved 03729 FE580000 574 CFILL 0 zero, so it won't be in two places 575 0372A DC003CF9 576 CALL PAGOUT force out the old UDIR2 block 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 105 (TRDIRMAN) F 20 Directory manager 0372B 41005000 577 PAR CURUD2BUF address of page 0372C 4000642C 578 PARL CURUD2FBI address of FBI 0372D FE0E3741 579 JMP BADDSK jump on disk error 580 0372E 6000649A 0 581 LD R0 CURUD1POS get our position in the control block 0372F 60440015 1 IMM 582 LD R1 (UD2FDECNT+1)/2 get new count 03730 E456000C 1 0 CACH 583 ST R1 R0,UDINDXNUM and fix up count 584 03731 18040005 0 IMM 585 ADD R0 UDINDXLEN point to new index 03732 5C081183 0 ZBM 586 CMZ R0,UDINDXADR is this spot taken? 03733 FE023735 587 JEQ PUTITHERE jump if not 588 03734 DC403743 589 CALLNP OPENUDIR1 open up the UDIR1 00003735 590 PUTITHERE LABEL 03735 60445C00 1 IMM 591 LD R1 ADR TMPPAGBUF2 point to the new block 03736 62964802 231 BASE 592 LD2 R2 R1,FDNAME get the first name in block 03737 E6960800 230 BASE 593 ST2 R2 R0,UDINDXNAM and put in index 03738 60964804 2 1 BASE 594 LD R2 R1,FDEXTEN get the extension 03739 E4960802 2 0 BASE 595 ST R2 R0,UDINDXEXT and put in index 0373A 60978801 2 6 BASE 596 LD R2 SP,NEWBLKNUM get new address 0373B E4881183 2 0 ZBM 597 ST R2 R0,UDINDXADR fix up address 0373C 60840015 2 IMM 598 LD R2 UD2FDECNT/2 get count 0373D E496000C 2 0 CACH 599 ST R2 R0,UDINDXNUM and put in its place 600 0373E 60044C2B 0 IMM 601 LD R0 ADR CURACTBUF(UDLIMITS) point to the limits 0373F D0081188 0 ZBM 602 INC R0,DSKUSD and up it by one 603 03740 19C40001 7 IMM 604 ADD R7 1 return to P+2 00003741 605 BADDSK LABEL 03741 19C40001 7 IMM 606 ADD R7 1 return to P+3 00003742 607 NOSPACE LABEL 03742 5D1F8002 6 STAK 608 LEAVE POP 609 * --- 610 BADDSK 00003741 F 20 570j 579j 605= +CURACTBUF 00004C00 F 20 555 557 559 601a +CURUD1POS 0000649A F 20 581 +CURUD2BUF 00005000 F 20 562a 573a 577a +CURUD2FBI 0000642C F 20 578a +CVTLRGDIR 00003711 F 20 540 546= +GETFREBLK UUUUUUUU F 20 547 NEWBLKNUM 00178801 F 20 543= 552s 596 NOSPACE 00003742 F 20 551j 607= +OPENUDIR1 UUUUUUUU F 20 589 +PAGOUT UUUUUUUU F 20 567 576 PUTITHERE 00003735 F 20 587j 590= +TMPPAGBUF2 00005C00 F 20 548a 564a 568a 591a +TMPPAGFBI2 0000644D F 20 549a 554a 569a 611 END of CVTLRGDIR 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 106 (TRDIRMAN) F 20 Directory manager 613 614 ********************************************************************************** 615 * * 616 * OPENUDIR1 * 617 * * 618 * When a UDIR2 entry must be added to a UDIR1 this * 619 * subroutine will open a hole in the UDIR1 to insert the * 620 * UDIR2 entry. * 621 * Call: * 622 * CALLNP OPENUDIR1 * 623 * * 624 * Eats R0:R1 * 625 * * 626 ********************************************************************************** 627 628 BLOCK OPENUDIR1 subroutine 629 630 ENTRY OPENUDIR1 631 632 BEGFRAME 633 ENDFRAME 634 03743 DD5F8001 6 STAK 635 OPENUDIR1 ENTRNP PUSH 03744 60444FF3 1 IMM 636 LD R1 ADR CURACTBUF(UD1LINDX)(-UDINDXLEN) R1 -> second to last entry 03745 6440649A 1 637 CPR R1 CURUD1POS check for done 03746 FE043748 638 JGT FULLOOP jump if room to move 03747 0002310C 639 HALT HALTB310C overflowed a directory 640 * --- 641 00003748 642 FULLOOP LABEL 03748 60164800 0 1 BASE 643 LD R0 R1,0 pick up word 03749 E4164805 0 1 BASE 644 ST R0 R1,UDINDXLEN and move to higher memory 0374A 6440649A 1 645 CPR R1 CURUD1POS check for done 0374B FE02374D 646 JEQ QUICKEXIT jump if now down to insert point 0374C FA623748 1 647 DRJ R1 FULLOOP down one location and repeat 648 * --- 649 0000374D 650 QUICKEXIT LABEL 0374D 5D1F8001 6 STAK 651 LEAVE POP 652 * --- 653 +CURACTBUF 00004C00 F 20 636a +CURUD1POS 0000649A F 20 637 645 FULLOOP 00003748 F 20 638j 642= 647j +OPENUDIR1 00003743 F 20 630 635= QUICKEXIT 0000374D F 20 646j 650= 654 END of OPENUDIR1 subroutine 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 107 (TRDIRMAN) F 20 Directory manager 656 657 ********************************************************************************** 658 * * 659 * WRITEUDIR * 660 * * 661 * Subroutine to write the current UDIR blocks. * 662 * Call: * 663 * CALLNP WRITEUDIR * 664 * * 665 * Eats R0:R3 * 666 * * 667 ********************************************************************************** 668 669 BLOCK WRITEUDIR subroutine 670 671 ENTRY WRITEUDIR 672 673 BEGFRAME 674 ENDFRAME 675 0374E DD5F8001 6 STAK 676 WRITEUDIR ENTRNP PUSH 0374F DC003CF9 677 CALL PAGOUT force out the last directory 03750 41004C00 678 PAR CURACTBUF page to write out 03751 40006421 679 PARL CURACTFBI and FBI 03752 FEC00000 680 NOP 0 ignore any error 681 03753 60044C00 0 IMM 682 LD R0 ADR CURACTBUF point to the UDIR 03754 5C08001A 0 ZBM 683 CMZ R0,UDTYPE is it a large dir? 03755 FE02375A 684 JEQ NOLRGDIR jump if not 685 * \ / 03756 DC003CF9 686 CALL PAGOUT force out the last UDIR2 03757 41005000 687 PAR CURUD2BUF page to write out 03758 4000642C 688 PARL CURUD2FBI and FBI 03759 FEC00000 689 NOP 0 ignore any error 0000375A 690 NOLRGDIR LABEL 0375A 5D1F8001 6 STAK 691 LEAVE POP 692 * --- 693 +CURACTBUF 00004C00 F 20 678a 682a +CURACTFBI 00006421 F 20 679a +CURUD2BUF 00005000 F 20 687a +CURUD2FBI 0000642C F 20 688a NOLRGDIR 0000375A F 20 684j 690= +PAGOUT UUUUUUUU F 20 677 686 +WRITEUDIR 0000374E F 20 671 676= 694 END of WRITEUDIR subroutine 789 INPUT TRTAPEMAN get in the tape routines 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 108 (TRTAPEMAN) F 21 Tape record manager 3 4 ********************************************************************************** 5 * * 6 * MOVLOGREC * 7 * * 8 * This routine is called when we want part of the * 9 * current logical record. If the current physical record * 10 * does not contain all the information that was requested, * 11 * this routine will handle the reading of another record. * 12 * Note: If there is not enough logical record to fulfill * 13 * the request we will destroy part of the destination * 14 * buffer by copying over what we do have. * 15 * * 16 * Calling sequence: * 17 * CURRECPTR = starting position in physical record * 18 * CALL MOVLOGREC * 19 * PAR * 20 * PARVL * 21 * JMP * 22 * * 23 * Eats: R0:R4. * 24 * * 25 ********************************************************************************** 26 27 BLOCK MOVLOGREC 28 ENTRY MOVLOGREC 29 30 BEGFRAME 00178801 6 BASE 31 DSTADR BSS 1 temporary destination address of move 00178802 6 BASE 32 WDSLFT BSS 1 temp for number of words left to move 33 ENDFRAME 34 0375B DD1F8003 6 STAK 35 MOVLOGREC ENTR PUSH 0375C C1178801 6 BASE 36 STP SP,DSTADR pass destination address 0375D C0578802 6 BASE 37 STPVL SP,WDSLFT save amount of logical record required 0000375E 38 CALWDS LABEL 0375E 6040654B 1 39 LD R1 ENDRECPTR get index to end of physical record 0375F 1040654A 1 40 SUB R1 CURRECPTR subtract off amount already used 03760 FA4C3764 1 41 JNEZ R1 MOVERECORD jump if physical record remains 42 43 * physical record exhausted, read another 03761 DC4037F1 44 CALLNP NXTPHSREC call for new physical record 03762 FE0E3774 45 JMP BADRTN jump if tape data lost 03763 FE0E375E 46 JMP CALWDS continue processing 47 * --- 48 00003764 49 MOVERECORD LABEL 03764 50578802 1 6 BASE 50 MIN R1 SP,WDSLFT limit move to amount needed 03765 FA423773 1 51 JEQZ R1 RETURN jump if no more needed 03766 6000654A 0 52 LD R0 CURRECPTR pick up current pointer 03767 18124000 0 1 REG 53 ADD R0 R1 add amount that we'll be moving 03768 6400654F 0 54 CPR R0 NXTHDRPTR check for overflow 03769 FE043774 55 JGT BADRTN give error if logical shorter than demand 0376A E000654A 0 56 EXCH R0 CURRECPTR save updated pointer, get original 0376B 382067F7 0 0 57 LEA R0 PHSTAPBUF/PHSLOGDATA(R0) calculate source memory address 0376C 60978801 2 6 BASE 58 LD R2 SP,DSTADR pick up destination address 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 109 (TRTAPEMAN) F 21 Tape record manager 0376D B0578802 1 6 BASE 59 RSBM R1 SP,WDSLFT indicate how much provided to caller 0376E 1C440004 1 IMM 60 MUL R1 CPW convert to character count 0376F FE400000 61 CMOVE do move of logical record 03770 E4978801 2 6 BASE 62 ST R2 SP,DSTADR save new destination address 03771 5C178802 6 BASE 63 CMZ SP,WDSLFT check for more required 03772 FE0C375E 64 JNE CALWDS jump if we need more record 65 * \ / 66 00003773 67 RETURN LABEL 03773 19C40001 7 IMM 68 ADD R7 1 return will be P+2 00003774 69 BADRTN LABEL 03774 5D1F8003 6 STAK 70 LEAVE POP 71 * --- 72 BADRTN 00003774 F 21 45j 55j 69= CALWDS 0000375E F 21 38= 46j 64j +CURRECPTR 0000654A F 21 40 52 56s DSTADR 00178801 F 21 31= 36s 58 62s +ENDRECPTR 0000654B F 21 39 MOVERECORD 00003764 F 21 41j 49= +MOVLOGREC 0000375B F 21 28 35= +NXTHDRPTR 0000654F F 21 54 +NXTPHSREC UUUUUUUU F 21 44 +PHSLOGDATA 00160807 F 21 57a +PHSTAPBUF 000067F0 F 21 57a RETURN 00003773 F 21 51j 67= WDSLFT 00178802 F 21 32= 37s 50 59s 63 73 END of MOVLOGREC 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 110 (TRTAPEMAN) F 21 Tape record manager 75 76 ********************************************************************************** 77 * * 78 * GETOSHDR * 79 * * 80 * Thus subroutine gets the next OS header. If it is not * 81 * in the current physical record the remaining file page is * 82 * moved into EXTRAPAGE, the next physical record is read, the * 83 * rest of the file page is moved into EXTRAPAGE, and the OS * 84 * header is then moved into TMPOSHDR. * 85 * Note that this works due to the requirement that if a * 86 * file page record is going to be split between two physical * 87 * records it may only contain one file page. * 88 * Call: * 89 * CALLNP GETOSHDR * 90 * JMP * 91 * * 92 * Eats R0:R5 * 93 * * 94 ********************************************************************************** 95 96 GETOSHDR BLOCK 97 98 ENTRY GETOSHDR 99 100 BEGFRAME 101 ENDFRAME 102 03775 DD5F8001 6 STAK 103 GETOSHDR ENTRNP PUSH 03776 6000654A 0 104 LD R0 CURRECPTR get the current record pointer 03777 FA083783 0 105 JLTZ R0 HARDWAY if not set then do this the hard way 03778 3000654B 0 106 RSB R0 ENDRECPTR see how much buffer is left 03779 64040002 0 IMM 107 CPR R0 BKUPHDRLEN is there enough for the OS header? 0377A FE083781 108 JLT TRYHARDWAY if not, then try doing it the hard way 109 * \ / 110 0000377B 111 MOVETHEHDR LABEL 0377B DC00375B 112 CALL MOVLOGREC get the OS made header 0377C 4100647C 113 PAR TMPOSHDR destination address 0377D 40440002 IMM 114 PARVL BKUPHDRLEN words to move 0377E FE0E3780 115 JMP BADREC jump if bad record 116 0377F 19C40001 7 IMM 117 ADD R7 1 advance to skip return 00003780 118 BADREC LABEL 03780 5D1F8001 6 STAK 119 LEAVE POP 120 * --- 121 00003781 122 TRYHARDWAY LABEL 03781 5C00654D 123 CMZ NUMBFP is there a file page to move? 03782 FE0A377B 124 JLE MOVETHEHDR if not then just move the header 125 * \ / 126 00003783 127 HARDWAY LABEL 03783 EDC06554 128 STW PAGEFLAG say we already have a page 03784 6000654C 0 129 LD R0 CURFPPTR get current pointer to file page 03785 E400654A 0 130 ST R0 CURRECPTR so the move will know where to get it 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 111 (TRTAPEMAN) F 21 Tape record manager 03786 DC00375B 131 CALL MOVLOGREC get the OS made header 03787 41006000 132 PAR EXTRAPAGE destination address 03788 40440400 IMM 133 PARVL WPP words to move 03789 FE0E3780 134 JMP BADREC jump if bad record 0378A FE0E377B 135 JMP MOVETHEHDR now get the header 136 * --- 137 BADREC 00003780 F 21 115j 118= 134j +BKUPHDRLEN 00000002 F 21 107 114 +CURFPPTR 0000654C F 21 129 +CURRECPTR 0000654A F 21 104 130s +ENDRECPTR 0000654B F 21 106 +EXTRAPAGE 00006000 F 21 132a +GETOSHDR 00003775 F 21 98 103= HARDWAY 00003783 F 21 105j 127= MOVETHEHDR 0000377B F 21 111= 124j 135j +MOVLOGREC 0000375B F 21 112 131 +NUMBFP 0000654D F 21 123 +PAGEFLAG 00006554 F 21 128s +TMPOSHDR 0000647C F 21 113a TRYHARDWAY 00003781 F 21 108j 122= 138 END GETOSHDR 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 112 (TRTAPEMAN) F 21 Tape record manager 140 141 ********************************************************************************** 142 * * 143 * MOVEFP * 144 * * 145 * This subroutine moves a file page into the * 146 * caller's buffer. We either CMOVE it (if the file * 147 * page is not page aligned), or switch page map values * 148 * with the physical record buffer page and caller's * 149 * buffer page or switch page map values with the * 150 * EXTRAPAGE if PAGEFLAG is set indicating there is * 151 * a page in this buffer. * 152 * On reaching here CURFPPTR will be pointing to * 153 * the beginning of the file page unless it is an old * 154 * format file page in which case CURRECPTR will be * 155 * pointing to the file page. Old format file pages * 156 * are determined by NUMBFP = 0. * 157 * CURRECPTR must be set to -1 if there is not * 158 * enough physical record available for a file page * 159 * to be moved from and we are not in the old format. * 160 * Call: * 161 * CALL MOVEFP * 162 * PARL
* 163 * JMP bad record * 164 * * 165 * Eats R0:R4 * 166 * * 167 ********************************************************************************** 168 169 BLOCK 170 ENTRY MOVEFP 171 172 BEGFRAME 173 ENDFRAME 174 0378B DD1F8001 6 STAK 175 MOVEFP ENTR PUSH 0378C C0128000 2 REG 176 STPL R2 capture destination address 177 0378D 5C00654D 178 CMZ NUMBFP see if we are using the old format 0378E FE0A37AC 179 JLE OLDFORMAT if so, just call MOVELOGREC 0378F 5C006554 180 CMZ PAGEFLAG is the page in a special buffer? 03790 FE0437A7 181 JGT GIVEPAGE if so, give it to them 03791 5C00654A 182 CMZ CURRECPTR is there enough file to move? 03792 FE0837AA 183 JLT NOTENUF if not, then don't juggle page map values 184 03793 6000654C 0 185 LD R0 CURFPPTR get the pointer to the current file page 03794 382067F7 0 0 186 LEA R0 PHSTAPBUF/PHSLOGDATA(R0) turn into an address 187 03795 5C0A2CA0 0 CBM 188 CMZ R0/DISPFIELD is the source page aligned? 03796 FE0C37B1 189 JNE NOTALIGN if not then can't juggle page map 03797 5C0AACA0 2 CBM 190 CMZ R2/DISPFIELD is the destination buffer page aligned? 03798 FE0C37B1 191 JNE NOTALIGN if not then can't juggle page map 192 03799 60440400 1 IMM 193 LD R1 WPP 0379A 9840654C 1 194 ADDM R1 CURFPPTR move pointer to next file page 0000379B 195 MAPPAGE LABEL 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 113 (TRTAPEMAN) F 21 Tape record manager 0379B 608A9C80 2 2 CBM 196 LD R2 R2/PAGEFIELD get the destination page number 0379C 7C840080 2 IMM 197 IOR R2 1*MONBIT make sure we are in monitor 0379D 60CA1C80 3 0 CBM 198 LD PFPTR R0/PAGEFIELD and get the source page number 0379E 7CC40080 3 IMM 199 IOR PFPTR 1*MONBIT make sure this is in monitor 0379F 80920000 0 REG 200 PFRD R0 get the source page map value 037A0 E0D28000 3 2 REG 201 EXCH PFPTR R2 now get the destination page number 037A1 80924000 1 REG 202 PFRD R1 and pick up the destination's page map value 037A2 00D20000 0 REG 203 LDPF R0 map in the source page 037A3 60D28000 3 2 REG 204 LD PFPTR R2 get the source page number 037A4 00D24000 1 REG 205 LDPF R1 give it the destination's old page 206 000037A5 207 GOODRTN LABEL 037A5 19C40001 7 IMM 208 ADD R7 1 advance to skip return 000037A6 209 BADRTN LABEL 037A6 5D1F8001 6 STAK 210 LEAVE POP 211 * --- 212 000037A7 213 GIVEPAGE LABEL 037A7 EC006554 214 STZ PAGEFLAG giving this page away 037A8 60046000 0 IMM 215 LD R0 ADR EXTRAPAGE where the page is located 037A9 FE0E379B 216 JMP MAPPAGE 217 * --- 218 000037AA 219 NOTENUF LABEL 037AA 6000654C 0 220 LD R0 CURFPPTR get the current file page record pointer 037AB E400654A 0 221 ST R0 CURRECPTR so MOVELOGREC will have the correct pointer 222 * \ / 223 000037AC 224 OLDFORMAT LABEL 037AC DC00375B 225 CALL MOVLOGREC move the logical record to the user 037AD 41168400 2 @R 226 PAR @R2 where to move stuff to 037AE 40440400 IMM 227 PARVL WPP how much to move 037AF FE0E37A6 228 JMP BADRTN if we had problems 229 * \ / 037B0 FE0E37A5 230 JMP GOODRTN 231 * --- 232 000037B1 233 NOTALIGN LABEL 037B1 6000654C 0 234 LD R0 CURFPPTR get the current file page record pointer 037B2 E000654A 0 235 EXCH R0 CURRECPTR call this current record pointer 037B3 E400654C 0 236 ST R0 CURFPPTR save old current record pointer 037B4 DC00375B 237 CALL MOVLOGREC move the logical record to the user 037B5 41168400 2 @R 238 PAR @R2 where to move stuff to 037B6 40440400 IMM 239 PARVL WPP how much to move 037B7 FE0E37A6 240 JMP BADRTN if we had problems 241 * \ / 037B8 6000654C 0 242 LD R0 CURFPPTR get the current record pointer 037B9 E000654A 0 243 EXCH R0 CURRECPTR restore this and get file page pointer 037BA E400654C 0 244 ST R0 CURFPPTR set file page pointer 037BB FE0E37A5 245 JMP GOODRTN 246 * --- 247 BADRTN 000037A6 F 21 209= 228j 240j +CURFPPTR 0000654C F 21 185 194s 220 234 236s 242 244s +CURRECPTR 0000654A F 21 182 221s 235s 243s +EXTRAPAGE 00006000 F 21 215a 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 114 (TRTAPEMAN) F 21 Tape record manager GIVEPAGE 000037A7 F 21 181j 213= GOODRTN 000037A5 F 21 207= 230j 245j MAPPAGE 0000379B F 21 195= 216j +MOVEFP 0000378B F 21 170 175= +MOVLOGREC 0000375B F 21 225 237 NOTALIGN 000037B1 F 21 189j 191j 233= NOTENUF 000037AA F 21 183j 219= +NUMBFP 0000654D F 21 178 OLDFORMAT 000037AC F 21 179j 224= +PAGEFLAG 00006554 F 21 180 214s +PHSLOGDATA 00160807 F 21 186a +PHSTAPBUF 000067F0 F 21 186a 248 END of MOVEFP 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 115 (TRTAPEMAN) F 21 Tape record manager 250 251 ********************************************************************************** 252 * * 253 * NXTLOGREC * 254 * This routine advances the current record pointer to * 255 * point to the first word of the backup data generated by the * 256 * operating system backup requests. This means that we skip * 257 * all of the logical record header and any "tape string" that * 258 * +BACKUP made. * 259 * If necessary, we will read the next physical record. * 260 * We set CURRECPTR to point to the data in the current * 261 * logical record, and we return the 'type' of the record in * 262 * R0 (this type is what +BACKUP placed in its header... it * 263 * indicates which OPREQ returned the info). * 264 * Any filler records are also skipped over. * 265 * Calling sequence: * 266 * CALLNP NXTLOGREC * 267 * R0 = +BACKUP defined logical record type * 268 * CURRECPTR => data in the current logical record * 269 * * 270 * Eats: R0:R4. * 271 * * 272 ********************************************************************************** 273 274 BLOCK NXTLOGREC 275 ENTRY NXTLOGREC 276 277 BEGFRAME 00178801 6 BASE 278 COUNT BSS 1 retry counter 279 ENDFRAME 280 00000008 ABS 281 MAXTRY EQU 8 maximum number of retries 282 037BC DD5F8002 6 STAK 283 NXTLOGREC ENTRNP PUSH 037BD 60040008 0 IMM 284 LD R0 MAXTRY 037BE E4178801 0 6 BASE 285 ST R0 SP,COUNT set up our retry counter 000037BF 286 NXTREC LABEL 037BF 6000654F 0 287 LD R0 NXTHDRPTR start of next header 037C0 6400654B 0 288 CPR R0 ENDRECPTR is it to end yet? 037C1 FE0637D7 289 JGE TRYAGN jump if so, try next record 290 * \ / 037C2 6040654F 1 291 LD R1 NXTHDRPTR next record pointer 037C3 E440654A 1 292 ST R1 CURRECPTR and make it the new one 037C4 386267F7 1 1 293 LEA R1 PHSTAPBUF/PHSLOGDATA(R1) make ptr to this logical record 294 * note that we may have only one word 295 * available in this physical record 037C5 60086100 0 1 ZBM 296 LD R0 R1,LOGRECIFL get length of this record 037C6 9800654F 0 297 ADDM R0 NXTHDRPTR and add in to point to next one 298 037C7 60085650 0 1 ZBM 299 LD R0 R1,LOGRECTYP get the type of the new one 037C8 64040008 0 IMM 300 CPR R0 MAXRECTYP is it reasonable? 037C9 FE0437DE 301 JGT TRYRSN if not, tell the user 037CA 64040008 0 IMM 302 CPR R0 RTYPEFLR is it a filler record? 037CB FE0237BF 303 JEQ NXTREC if so then get the next record 304 037CC E400654E 0 305 ST R0 CURRECTYP remember type of new record for later 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 116 (TRTAPEMAN) F 21 Tape record manager 037CD DC403924 306 CALLNP GETRECHDR get the header so we can use it later 037CE FE0E37D7 307 JMP TRYAGN error, try for next record 308 * \ / 037CF DC4038FA 309 CALLNP DOANY take care of this record if we can 037D0 FE0E37BF 310 JMP NXTREC get next, if had an error, or did this one 311 * \ / 037D1 DC403936 312 CALLNP GETTAPSTR get the "tape string" if there is one 037D2 FE0E37D7 313 JMP TRYAGN error, try for next record 314 * \ / 037D3 DC40394C 315 CALLNP BMPPSTHDR2 move past another f___ing header 037D4 FE0E37D7 316 JMP TRYAGN error, try for next record 317 * \ / 037D5 6000654E 0 318 LD R0 CURRECTYP get record type that was stored away 037D6 5D1F8002 6 STAK 319 LEAVE POP 320 * --- 321 000037D7 322 TRYAGN LABEL 037D7 D0578801 6 BASE 323 DEC SP,COUNT one more attempt at reading a record 037D8 FE0837DC 324 JLT BADTAP out of tries, quit 037D9 DC4037F1 325 CALLNP NXTPHSREC read the next physical record 037DA FE0E37BF 326 JMP NXTREC lost tape data, continue 037DB FE0E37BF 327 JMP NXTREC go try again 328 * --- 329 330 ********************************************************************************** 331 * * 332 * We come here when we have 8 consecutive format errors * 333 * when reading a tape. We just halt, possibly field service * 334 * can retrieve some data. * 335 * * 336 ********************************************************************************** 337 000037DC 338 BADTAP LABEL 037DC 00023112 339 HALT HALTB3112 excessive tape errors 037DD FE0E37D7 340 JMP TRYAGN return here to try once more 341 * --- 342 343 ********************************************************************************** 344 * * 345 * If we come here we have a bad logical record type. * 346 * Just go read the next physical record and hope this will * 347 * set us going ok again. * 348 * * 349 ********************************************************************************** 350 000037DE 351 TRYRSN LABEL 037DE DC1013F9 @ 352 CALL @VPREPOUT tell the guy 037DF 41085650 1 ZBM 353 PAR R1,LOGRECTYP pass the logical record type 037E0 410067F0 354 PAR PHSTAPBUF/PHSSEQNUM and the seq number 037E1 400037E3 355 PARL BADMSG 037E2 FE0E37D7 356 JMP TRYAGN 357 * --- 358 037E3 20426164 359 BADMSG TEXTZ " Bad logical record type \H1\ in physical record #\H2\." 360 BADMSG 000037E3 F 21 355a 359= 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 117 (TRTAPEMAN) F 21 Tape record manager BADTAP 000037DC F 21 324j 338= +BMPPSTHDR2 UUUUUUUU F 21 315 COUNT 00178801 F 21 278= 285s 323s +CURRECPTR 0000654A F 21 292s +CURRECTYP 0000654E F 21 305s 318 +DOANY UUUUUUUU F 21 309 +ENDRECPTR 0000654B F 21 288 +GETRECHDR UUUUUUUU F 21 306 +GETTAPSTR UUUUUUUU F 21 312 +LOGRECIFL 00082100 F 21 296 +LOGRECTYP 00081650 F 21 299 353a +MAXRECTYP 00000008 F 21 300 MAXTRY 00000008 F 21 281= 284 +NXTHDRPTR 0000654F F 21 287 291 297s +NXTLOGREC 000037BC F 21 275 283= +NXTPHSREC UUUUUUUU F 21 325 NXTREC 000037BF F 21 286= 303j 310j 326j 327j +PHSLOGDATA 00160807 F 21 293a +PHSSEQNUM 00160800 F 21 354a +PHSTAPBUF 000067F0 F 21 293a 354a +RTYPEFLR 00000008 F 21 302 TRYAGN 000037D7 F 21 289j 307j 313j 316j 322= 340j 356j TRYRSN 000037DE F 21 301j 351= +VPREPOUT 000013F9 F 21 352 361 END of NXTLOGREC 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 118 (TRTAPEMAN) F 21 Tape record manager 363 364 ********************************************************************************** 365 * * 366 * NXTPHSREC * 367 * * 368 * This routine will attempt to read the next physical * 369 * record from the tape. We do the following operations and * 370 * error checks: * 371 * 1) Call the tape driver. It checks for reported errors * 372 * and retries to its limit. * 373 * 2) Option to read each physical record twice and compare * 374 * the two reads. This combats a rare, random hardware * 375 * glitch. This option is strictly manually activated * 376 * and monitored. * 377 * 3) Decrypt the record, if needed. * 378 * 4) Calculate and check the software checksum on the tape * 379 * record. This is also to combat the same hardware * 380 * problem, in a slightly more elegant fashion. * 381 * 5) Verify that the physical record sequence number matches * 382 * that expected. This combats random tape write errors. * 383 * * 384 * Note that we actually do have a new physical record * 385 * even if we return to the records lost return. * 386 * * 387 * Calling sequence: * 388 * CALLNP NXTPHSREC * 389 * * 390 * * 391 * Returns: * 392 * CURRECPTR => index to first word excluding header (0) * 393 * NXTHDRPTR => index to first logical record header in this record * 394 * ENDRECPTR => index to first word after the end of the phs. record * 395 * * 396 * Eats: R0:R4. * 397 * * 398 ********************************************************************************** 399 400 BLOCK NXTPHSREC 401 ENTRY NXTPHSREC 402 403 BEGFRAME 00178801 6 BASE 404 SYNCOUNT BSS 1 resync attempt counter 00178802 6 BASE 405 RRCOUNT BSS 1 reread counter 00178803 6 BASE 406 RECSIZE BSS 1 record size temp 407 ENDFRAME 408 00000010 BYTE 409 SKIPFLAG EQU BIT 0 flag for error return 00000008 ABS 410 MAXTRY EQU 8 maximum number of retries 00000008 ABS 411 MAXSYNTRY EQU 8 maximum number of resync attempts 412 037F1 DD5F8004 6 STAK 413 NXTPHSREC ENTRNP PUSH 037F2 60040008 0 IMM 414 LD R0 MAXTRY 037F3 E4178802 0 6 BASE 415 ST R0 SP,RRCOUNT set up reread limiter 037F4 60040008 0 IMM 416 LD R0 MAXSYNTRY 037F5 E4178801 0 6 BASE 417 ST R0 SP,SYNCOUNT set up our resync attempt counter 037F6 EDCBC010 7 CBM 418 STW R7/SKIPFLAG indicate normal return 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 119 (TRTAPEMAN) F 21 Tape record manager 419 * \ / 420 000037F7 421 READNXT LABEL 037F7 611013D0 4 @ 422 LD R4 @VTAPECB point to our tape control block 037F8 DC1013D3 @ 423 CALL @VREADTAPE read a record from the tape 037F9 41406551 424 PARV NXTPHSNUM pass expected sequence number 037FA 414467F0 IMM 425 PARV ADR PHSTAPBUF address of buffer 037FB 40440000 IMM 426 PARVL 0 say we want single sequential record 037FC E4578803 1 6 BASE 427 ST R1 SP,RECSIZE save record size 037FD FA023820 0 428 JEQZ R0 OKREAD jump if all is ok 429 * \ / not normal status 037FE 64040008 0 IMM 430 CPR R0 TERREOF is it an EOF? 037FF FE0C3899 431 JNE PRTTER jump if not 432 * \ / EOF just read 03800 DC4038AF 433 CALLNP PRCFILMRK process the file mark that we just found 03801 FE0E3851 434 JMP ENDOFTAPE jump if we found end of backup info. 03802 FE0E37F7 435 JMP READNXT go try for next record 436 * --- 437 438 ********************************************************************************** 439 * This code is provided for the read twice and compare option. * 440 ********************************************************************************** 441 00003803 442 ERROR LABEL 03803 0082310E 443 STOP HALTB310E record miscompare on read twice option 03804 611013D0 4 @ 444 LD R4 @VTAPECB point to our tape control block 03805 60040006 0 IMM 445 LD R0 MTFNBKSP load code for backspace 03806 DC5013D7 @ 446 CALLNP @VTAPEFUNC call for backspace 03807 FE0E37F7 447 JMP READNXT just try another read 448 * --- 449 450 * restart here to reread only first buffer 451 ORG ((DISPW MA 0)+0F) AND 01FFF0 even up address a bit 03810 611013D0 4 @ 452 LD R4 @VTAPECB point to our tape control block 03811 60040006 0 IMM 453 LD R0 MTFNBKSP load code for backspace 03812 DC5013D7 @ 454 CALLNP @VTAPEFUNC call for backspace 03813 611013D0 4 @ 455 LD R4 @VTAPECB point to our tape control block 03814 DC1013D3 @ 456 CALL @VREADTAPE read a record from the tape 03815 41406551 457 PARV NXTPHSNUM pass expected sequence number 03816 414467F0 IMM 458 PARV ADR PHSTAPBUF address of buffer 03817 40440000 IMM 459 PARVL 0 say we want single sequential record 03818 E4578803 1 6 BASE 460 ST R1 SP,RECSIZE save record size 03819 FA02382D 0 461 JEQZ R0 XOKREAD jump if all is ok 0381A 0002310F 462 HALT HALTB310F not recoverable tape error on reread 463 * --- 464 465 ORG ((DISPW MA 0)+0F) AND 01FFF0 even up address a bit 00003820 466 OKREAD LABEL 03820 FE0E3836 467 JMP READSDONE NOP this to read records twice 468 * *** 469 * restart here to reread only second buffer 03821 611013D0 4 @ 470 LD R4 @VTAPECB point to our tape control block 03822 60040006 0 IMM 471 LD R0 MTFNBKSP load code for backspace 03823 DC5013D7 @ 472 CALLNP @VTAPEFUNC call for backspace 03824 611013D0 4 @ 473 LD R4 @VTAPECB point to our tape control block 03825 DC1013D3 @ 474 CALL @VREADTAPE read a record from the tape 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 120 (TRTAPEMAN) F 21 Tape record manager 03826 41406551 475 PARV NXTPHSNUM pass expected sequence number 03827 414497F0 IMM 476 PARV ADR XTRABUF address of buffer 03828 40440000 IMM 477 PARVL 0 say we want single sequential record 03829 64578803 1 6 BASE 478 CPR R1 SP,RECSIZE check for matching length 0382A FE0C3803 479 JNE ERROR jump if not 0382B FA02382D 0 480 JEQZ R0 XOKREAD jump if all is ok 0382C 0002310F 481 HALT HALTB310F not recoverable tape error on reread 482 * --- 483 0000382D 484 XOKREAD LABEL 0382D 60C467F0 3 IMM 485 LD R3 ADR PHSTAPBUF get address of first tape buffer 0382E 610497F0 4 IMM 486 LD R4 ADR XTRABUF and second tape buffer 0382F 60978803 2 6 BASE 487 LD R2 SP,RECSIZE get character count 03830 14840004 2 IMM 488 DIV R2 4 chop to word count 03831 D0528000 2 REG 489 DEC R2 bias for JDR loop 00003832 490 XCHEKLOOP LABEL 03832 601CD000 0 32 BASE 491 LD R0 R3,0(R2) get a word 03833 641D1000 0 42 BASE 492 CPR R0 R4,0(R2) and check it 03834 FE0C3803 493 JNE ERROR jump if no match 03835 FAA63832 2 494 JDR R2 XCHEKLOOP do whole buffer 495 * \ / good buffers, continue 496 497 ********************************************************************************** 498 * We get here when the tape driver is happy with the * 499 * record. Length (in characters) in R1. * 500 * * 501 ********************************************************************************** 502 503 * \ / 00003836 504 READSDONE LABEL 03836 14440004 1 IMM 505 DIV R1 CPW convert chars. to words 03837 10440003 1 IMM 506 SUB R1 PHSNOESIZE remove size of unencrypted part 03838 E4406550 1 507 ST R1 PHSRECWDS remember # of words to decrypt 03839 10440004 1 IMM 508 SUB R1 PHSEHDRSIZ and subtract size of encrypted header 0383A E440654B 1 509 ST R1 ENDRECPTR and remember size of logical area 0383B FA4A3899 1 510 JLEZ R1 PRTTER logical record must exist 511 512 * Now start record processing 0383C 390067F0 4 513 LEA R4 PHSTAPBUF get pointer to physical record buffer 0383D 6000645E 0 514 LD R0 EXPECTENC get encrypt expectation 0383E 7C090012 0 4 ZBM 515 IOR R0 R4,PHSNCRYPTD check what tape sez 0383F FA023841 0 516 JEQZ R0 NODCPT jump if not encrypted 517 * \ / 03840 DC4038DB 518 CALLNP DECRYPTIT do the decryption 00003841 519 NODCPT LABEL 03841 6000645F 0 520 LD R0 TAPEFORM pick up format number 03842 64040006 0 IMM 521 CPR R0 SSTAPEFN6 check for the new format with checksums 03843 FE083848 522 JLT NOCKSUM jump if no checksums 523 * \ / Checksum the record 03844 60D78803 3 6 BASE 524 LD R3 SP,RECSIZE pick up record size 03845 14C40004 3 IMM 525 DIV R3 CPW convert chars to words 03846 DC403A48 526 CALLNP CHECKSUM do the checksum on the whole record 03847 FA2E3886 0 527 JNEMW R0 CSERR jump if not good 528 * \ / 00003848 529 NOCKSUM LABEL 530 * check dup seq number in case old 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 121 (TRTAPEMAN) F 21 Tape record manager 531 * style (not checksummed) 03848 60570800 1 4 BASE 532 LD R1 R4,PHSSEQNUM get the sequence number in buffer 03849 64570803 1 4 BASE 533 CPR R1 R4,PHSDSEQNUM ensure decrypt happened okay 0384A FE0C3886 534 JNE CSERR jump if mismatch 535 0384B 60006551 0 536 LD R0 NXTPHSNUM pick up expected sequence number 0384C 64170800 0 4 BASE 537 CPR R0 R4,PHSSEQNUM is this the one expected? 0384D FE023851 538 JEQ SEQNUMOK jump if ok 0384E FA06386D 0 539 JGEZ R0 SEQPROB jump if NOT a reseq situation 540 * \ / known missing record, fix seq num 0384F 60170800 0 4 BASE 541 LD R0 R4,PHSSEQNUM pick up the sequence number 03850 E4006551 0 542 ST R0 NXTPHSNUM assume this number is good 00003851 543 SEQNUMOK LABEL 00003851 544 ENDOFTAPE LABEL 03851 EC00654A 545 STZ CURRECPTR initialize pick up index to record begin 546 03852 60170805 0 4 BASE 547 LD R0 R4,PHSREQCNT amount of logical record continued 548 * from previous physical record 03853 6040645F 1 549 LD R1 TAPEFORM * pick up format number 03854 64440006 1 IMM 550 CPR R1 SSTAPEFN6 * check for new version 03855 FE063857 551 JGE USENEWCNT * jump if new format, continuation in R0 03856 60170801 0 4 BASE 552 LD R0 R4,OPHSREQCNT * amount of logical record continuation 00003857 553 USENEWCNT LABEL * 03857 E400654F 0 554 ST R0 NXTHDRPTR and point to next logical record 555 * \ / 556 03858 F7C0385F 7 557 JBT R7/SKIPFLAG NOPRINT jump if no errors 03859 DC1013F9 @ 558 CALL @VPREPOUT tell that we are here 0385A 41004C00 559 PAR CURACTBUF(UDACCT) account name 0385B 41004C02 560 PAR CURACTBUF(UDPROJ) and extension 0385C 4100649F 561 PAR CURFILNAM file name 0385D 410064A1 562 PAR CURFILEXT extension 0385E 40003862 563 PARL DATAMSG 0000385F 564 NOPRINT LABEL 0385F 19CBC010 7 7 CBM 565 ADD R7 R7/SKIPFLAG skip return if no errors 03860 D0006551 566 INC NXTPHSNUM adjust seq number for the next read 03861 5D1F8004 6 STAK 567 LEAVE POP return to caller 568 * --- 569 03862 20446174 570 DATAMSG TEXTZ " Data lost recovering \S1\.\R2\:\S3\.\R4\" 571 572 ********************************************************************************** 573 * * 574 * We arrive here when a physical record arrives out of * 575 * its expected sequence. This is usually caused by a tape * 576 * error. We issue a warning message and resyncronize our * 577 * counter. * 578 * We should probably ensure that the just arrived record * 579 * is a higher number than we have already processed. * 580 * At this point we should probably store zero into the * 581 * EXPECTENC flag to ensure that we resync after losing an * 582 * encryption change record. However, this method is slightly * 583 * more secure. * 584 * * 585 ********************************************************************************** 586 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 122 (TRTAPEMAN) F 21 Tape record manager 0000386D 587 SEQPROB LABEL 0386D DC1013F9 @ 588 CALL @VPREPOUT complain a bit 0386E 41170800 4 BASE 589 PAR R4,PHSSEQNUM pass seq number that we got 0386F 41006551 590 PAR NXTPHSNUM and what we expected. 03870 40003876 591 PARL BADNUMMESS what to say 592 03871 EC0BC010 7 CBM 593 STZ R7/SKIPFLAG indicate tape record lost 03872 EDC06556 594 STW DATALOST indicate lost data 03873 60030000 0 IMM 595 LD R0 080000000 pick up flag bit 03874 FC006551 0 596 IORM R0 NXTPHSNUM indicate unknown sequence number 597 03875 FE0E3851 598 JMP SEQNUMOK return to main sequence 599 * --- 600 03876 20426164 601 BADNUMMESS TEXT " Bad physical record sequence number" 0387F 2E202047 602 TEXTZ ". Got \H1\, expected \H2\." 603 604 ********************************************************************************** 605 * * 606 * A checksum error occurred. In general, we want this to * 607 * appear as if we got a reported tape error, so we count a * 608 * counter and go try again if not exhausted. * 609 * We may also get here if we were given a bad key and the * 610 * decryption failed. * 611 * If we exhaust our retry count, we treat it as if we had * 612 * an actual tape error. * 613 * * 614 ********************************************************************************** 615 00003886 616 CSERR LABEL 03886 E4006557 0 617 ST R0 TMTEMP1 save checksum 03887 DC1013F9 @ 618 CALL @VPREPOUT tell the user about our error 03888 41006557 619 PAR TMTEMP1 pass the checksum value 03889 40003891 620 PARL CSMSG and the message prototype 0388A D0578802 6 BASE 621 DEC SP,RRCOUNT check the reread count 0388B FE083899 622 JLT PRTTER give error if exhausted 0388C DC403916 623 CALLNP PRNTPHYS give clue as to where 0388D 611013D0 4 @ 624 LD R4 @VTAPECB point to our tape control block 0388E 60040006 0 IMM 625 LD R0 MTFNBKSP load code for backspace 0388F DC5013D7 @ 626 CALLNP @VTAPEFUNC call for backspace 03890 FE0E37F7 627 JMP READNXT just try another read 628 * --- 629 03891 20436865 630 CSMSG TEXTZ " Checksum error. Computed \H1\" 631 632 ********************************************************************************** 633 * * 634 * We come here for actual tape errors or if we gave up * 635 * on a checksum error (which is probably an actual tape * 636 * error). * 637 * * 638 ********************************************************************************** 639 00003899 640 PRTTER LABEL 03899 DC1013F9 @ 641 CALL @VPREPOUT tell the guy what happened 0389A 400038A3 642 PARL TERMSG 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 123 (TRTAPEMAN) F 21 Tape record manager 0389B DC403916 643 CALLNP PRNTPHYS include the record number 0389C D0578801 6 BASE 644 DEC SP,SYNCOUNT can we try the next record? 0389D FE0838AD 645 JLT BADTAP out of tries, quit 0389E EC0BC010 7 CBM 646 STZ R7/SKIPFLAG indicate tape record lost 0389F EDC06556 647 STW DATALOST indicate lost data 038A0 60030000 0 IMM 648 LD R0 080000000 pick up flag bit 038A1 FC006551 0 649 IORM R0 NXTPHSNUM indicate unknown sequence number 650 038A2 FE0E37F7 651 JMP READNXT try the next record 652 * --- 653 038A3 20457272 654 TERMSG TEXTZ " Error on tape drive, record skipped." 655 656 ********************************************************************************** 657 * * 658 * We come here when we have multiple consecutive errors * 659 * when reading a tape. We just halt, possibly field service * 660 * can retrieve some data. * 661 * * 662 ********************************************************************************** 663 000038AD 664 BADTAP LABEL 038AD 00023113 665 HALT HALTB3113 excessive tape errors 038AE FE0E37F7 666 JMP READNXT 667 * --- 668 BADNUMMESS 00003876 F 21 591a 601= BADTAP 000038AD F 21 645j 664= +CHECKSUM UUUUUUUU F 21 526 CSERR 00003886 F 21 527j 534j 616= CSMSG 00003891 F 21 620a 630= +CURACTBUF 00004C00 F 21 559a 560a +CURFILEXT 000064A1 F 21 562a +CURFILNAM 0000649F F 21 561a +CURRECPTR 0000654A F 21 545s +DATALOST 00006556 F 21 594s 647s DATAMSG 00003862 F 21 563a 570= +DECRYPTIT UUUUUUUU F 21 518 ENDOFTAPE 00003851 F 21 434j 544= +ENDRECPTR 0000654B F 21 509s ERROR 00003803 F 21 442= 479j 493j +EXPECTENC 0000645E F 21 514 MAXSYNTRY 00000008 F 21 411= 416 MAXTRY 00000008 F 21 410= 414 NOCKSUM 00003848 F 21 522j 529= NODCPT 00003841 F 21 516j 519= NOPRINT 0000385F F 21 557j 564= +NXTHDRPTR 0000654F F 21 554s +NXTPHSNUM 00006551 F 21 424 457 475 536 542s 566s 590a 596s 649s +NXTPHSREC 000037F1 F 21 401 413= OKREAD 00003820 F 21 428j 466= +OPHSREQCNT 00160801 F 21 552 +PHSDSEQNUM 00160803 F 21 533 +PHSEHDRSIZ 00000004 F 21 508 +PHSNCRYPTD 00080012 F 21 515 +PHSNOESIZE 00000003 F 21 506 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 124 (TRTAPEMAN) F 21 Tape record manager +PHSRECWDS 00006550 F 21 507s +PHSREQCNT 00160805 F 21 547 +PHSSEQNUM 00160800 F 21 532 537 541 589a +PHSTAPBUF 000067F0 F 21 425a 458a 485a 513a +PRCFILMRK UUUUUUUU F 21 433 +PRNTPHYS UUUUUUUU F 21 623 643 PRTTER 00003899 F 21 431j 510j 622j 640= READNXT 000037F7 F 21 421= 435j 447j 627j 651j 666j READSDONE 00003836 F 21 467j 504= RECSIZE 00178803 F 21 406= 427s 460s 478 487 524 RRCOUNT 00178802 F 21 405= 415s 621s SEQNUMOK 00003851 F 21 538j 543= 598j SEQPROB 0000386D F 21 539j 587= SKIPFLAG 00000010 F 21 409= 418s 557j 565 593s 646s +SSTAPEFN6 00000006 F 21 521 550 SYNCOUNT 00178801 F 21 404= 417s 644s +TAPEFORM 0000645F F 21 520 549 TERMSG 000038A3 F 21 642a 654= +TERREOF 00000008 F 21 430 +TMTEMP1 00006557 F 21 617s 619a USENEWCNT 00003857 F 21 551j 553= +VPREPOUT 000013F9 F 21 558 588 618 641 +VREADTAPE 000013D3 F 21 423 456 474 +VTAPECB 000013D0 F 21 422 444 452 455 470 473 624 +VTAPEFUNC 000013D7 F 21 446 454 472 626 XCHEKLOOP 00003832 F 21 490= 494j XOKREAD 0000382D F 21 461j 480j 484= +XTRABUF 000097F0 F 21 476a 486a 669 END of NXTPHSREC 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 125 (TRTAPEMAN) F 21 Tape record manager 671 672 ********************************************************************************** 673 * * 674 * PRCFILMRK * 675 * * 676 * This routine will process the file mark that we got. * 677 * We might be all done, or need to switch tracks, or switch tapes. * 678 * * 679 * Calling sequence: * 680 * CALLNP PRCFILMRK * 681 * JMP * 682 * * 683 * * 684 * Eats: R0:R4. * 685 * * 686 ********************************************************************************** 687 688 BLOCK PRCFILMRK 689 ENTRY PRCFILMRK 690 691 BEGFRAME 692 ENDFRAME 693 038AF DD5F8001 6 STAK 694 PRCFILMRK ENTRNP PUSH 038B0 611013D0 4 @ 695 LD R4 @VTAPECB point to our tape control block 038B1 DC1013D3 @ 696 CALL @VREADTAPE read a record from the tape 038B2 41440000 IMM 697 PARV 0 no sequence number available 038B3 414467F0 IMM 698 PARV ADR PHSTAPBUF address of buffer 038B4 40440000 IMM 699 PARVL 0 say we want a single sequential record 038B5 FA0C38CD 0 700 JNEZ R0 SAYEND jump on any error 701 * \ / 702 038B6 604467F7 1 IMM 703 LD R1 ADR PHSTAPBUF(PHSHDRLEN) point to first logical record 038B7 60085650 0 1 ZBM 704 LD R0 R1,LOGRECTYP get the type 038B8 64040001 0 IMM 705 CPR R0 RTYPEESET is it end of the recovery? 038B9 FE0238D1 706 JEQ PROCEND jump if so 707 * \ / 708 038BA 64040002 0 IMM 709 CPR R0 RTYPESWCH do we need to shuffle tape around? 038BB FE0C38CD 710 JNE SAYEND if not, assume end of recovery 711 * \ / 712 038BC 6000645F 0 713 LD R0 TAPEFORM * get the current tape format number 038BD 64040005 0 IMM 714 CPR R0 SSTAPEFN5 * see if it has new style numbering 038BE FE0638C0 715 JGE NEWFORM * if so then don't increment 038BF D0006551 716 INC NXTPHSNUM * adjust for first number on next track/tape 717 * \ / * 718 000038C0 719 NEWFORM LABEL * 038C0 611013D0 4 @ 720 LD R4 @VTAPECB point to the tape control block 038C1 60170802 0 4 BASE 721 LD R0 R4,TPCBTRACK get the id for type of tape/track number 038C2 FA2C38C8 0 722 JEQMW R0 DONEWTAPE jump if it's a 9 track tape 723 038C3 BC170802 0 4 BASE 724 INCL R0 R4,TPCBTRACK get the next track number 038C4 68040004 0 IMM 725 UCPR R0 MAXTRAX have we reached the last track? 038C5 FE0638C8 726 JGE DONEWTAPE jump if so 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 126 (TRTAPEMAN) F 21 Tape record manager 727 * \ / 728 038C6 DC5013D8 @ 729 CALLNP @VSETTAPE set the new track and rewind 038C7 FE0E38CB 730 JMP RETURN 731 * --- 732 000038C8 733 DONEWTAPE LABEL 038C8 611013D0 4 @ 734 LD R4 @VTAPECB point to the tape control block 038C9 DC5013D4 @ 735 CALLNP @VREWIND rewind the completed tape 038CA DC40398F 736 CALLNP NEWTAPE go get the next tape 000038CB 737 RETURN LABEL 038CB 19C40001 7 IMM 738 ADD R7 1 000038CC 739 ENDRTN LABEL 038CC 5D1F8001 6 STAK 740 LEAVE POP 741 * --- 742 743 * We come here if we got any error reading the tape. 744 000038CD 745 SAYEND LABEL 038CD DC1013F9 @ 746 CALL @VPREPOUT tell the guy what happened 038CE 400038D3 747 PARL RELBADMSG 038CF DC403A1E 748 CALLNP ASKIFEND see if there is another tape 038D0 FE0E38CB 749 JMP RETURN have new tape, keep on going 000038D1 750 PROCEND LABEL 038D1 DC5013D4 @ 751 CALLNP @VREWIND rewind the tape 038D2 FE0E38CC 752 JMP ENDRTN 753 * --- 754 038D3 20546170 755 RELBADMSG TEXTZ " Tape error after file mark." 756 +ASKIFEND UUUUUUUU F 21 748 DONEWTAPE 000038C8 F 21 722j 726j 733= ENDRTN 000038CC F 21 739= 752j +LOGRECTYP 00081650 F 21 704 +MAXTRAX 00000004 F 21 725 NEWFORM 000038C0 F 21 715j 719= +NEWTAPE UUUUUUUU F 21 736 +NXTPHSNUM 00006551 F 21 716s +PHSHDRLEN 00000007 F 21 703a +PHSTAPBUF 000067F0 F 21 698a 703a +PRCFILMRK 000038AF F 21 689 694= PROCEND 000038D1 F 21 706j 750= RELBADMSG 000038D3 F 21 747a 755= RETURN 000038CB F 21 730j 737= 749j +RTYPEESET 00000001 F 21 705 +RTYPESWCH 00000002 F 21 709 SAYEND 000038CD F 21 700j 710j 745= +SSTAPEFN5 00000005 F 21 714 +TAPEFORM 0000645F F 21 713 +TPCBTRACK 00160802 F 21 721 724s +VPREPOUT 000013F9 F 21 746 +VREADTAPE 000013D3 F 21 696 +VREWIND 000013D4 F 21 735 751 +VSETTAPE 000013D8 F 21 729 +VTAPECB 000013D0 F 21 695 720 734 757 END of PRCFILMRK 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 127 (TRTAPEMAN) F 21 Tape record manager 759 760 ********************************************************************************** 761 * * 762 * DECRYPTIT * 763 * * 764 * We arrive here if the current physical record needs to * 765 * be decrypted. The decryptor as implemented can only handle * 766 * a limited range of sizes for encrypted blocks. The minimum * 767 * size is taken care of by ensuring that the encrypted part * 768 * of the header is at least this long (PHSEHDRSIZ). The * 769 * maximum size (MAXENCRSIZ) is taken care of by dividing a given * 770 * physical record into 'chunks' that are smaller than this * 771 * limit. This is accomplished by finding the minimum number * 772 * of chunks that will do the job (divide by MAXENCRSIZ), then * 773 * dividing it into that many equal size chunks. If there is * 774 * not an equal number of words per chunk then the first * 775 * chunks each get one extra word until the extra is used up. * 776 * Call: * 777 * CALLNP DECRYPTIT * 778 * * 779 * Eats: R0:R3. * 780 * * 781 ********************************************************************************** 782 783 BLOCK DECRYPTIT 784 ENTRY DECRYPTIT 785 786 BEGFRAME 00178801 6 BASE 787 R4SAVE BSS 1 guess 00178802 6 BASE 788 CHUNKPTR BSS 1 pointer to next chunk 00178803 6 BASE 789 CHUNKSIZE BSS 1 size of chunks record is broken into 00178804 6 BASE 790 EXTRA BSS 1 slop left over if chunk size is not even 00178805 6 BASE 791 NUMCHUNKS BSS 1 number of chunks record is broken into 792 ENDFRAME 793 038DB DD5F8006 6 STAK 794 DECRYPTIT ENTRNP PUSH 038DC E5178801 4 6 BASE 795 ST R4 SP,R4SAVE save this register 038DD 600467F3 0 IMM 796 LD R0 ADR PHSTAPBUF/PHSENCSTRT point to the decrypt buffer 038DE E4178802 0 6 BASE 797 ST R0 SP,CHUNKPTR and save 038DF 60006550 0 798 LD R0 PHSRECWDS get number of words to decrypt 038E0 18040FFF 0 IMM 799 ADD R0 MAXENCRSIZ-1 so divide will round up 038E1 14041000 0 IMM 800 DIV R0 MAXENCRSIZ determine number of chunks 038E2 E4178805 0 6 BASE 801 ST R0 SP,NUMCHUNKS and save 802 038E3 60040000 0 IMM 803 LD R0 0 set up for funky math 038E4 60406550 1 804 LD R1 PHSRECWDS get number of words to decrypt 038E5 58C40010 IMM 805 IORPSR PSRMODIF tell CPU funky math time 038E6 14178805 0 6 BASE 806 DIV R0 SP,NUMCHUNKS get size of each chunk 038E7 58840010 IMM 807 CLBPSR PSRMODIF back to normal for now 038E8 E4178803 0 6 BASE 808 ST R0 SP,CHUNKSIZE save this 038E9 E4578804 1 6 BASE 809 ST R1 SP,EXTRA save the slop 810 * \ / 811 812 * We go through this loop once for each chunk that needs to be decrypted. 000038EA 813 CHUNKLOOP LABEL 038EA 60578803 1 6 BASE 814 LD R1 SP,CHUNKSIZE get the size of the chunk 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 128 (TRTAPEMAN) F 21 Tape record manager 038EB D0578804 6 BASE 815 DEC SP,EXTRA should this chunk be bigger? 038EC FE0838EE 816 JLT HAVESIZE jump if no 038ED 18440001 1 IMM 817 ADD R1 1 else use up some of the slop 818 * \ / 819 000038EE 820 HAVESIZE LABEL 038EE 60178802 0 6 BASE 821 LD R0 SP,CHUNKPTR pick up pointer to chunk to decrypt 038EF 98578802 1 6 BASE 822 ADDM R1 SP,CHUNKPTR move chunk pointer up 038F0 DC003D5A 823 CALL DECRYPT decrypt the first part 038F1 41160400 0 @R 824 PAR @R0 pass address to start at 038F2 41524000 1 REG 825 PARV R1 pass length to decrypt 038F3 4100645A 826 PAR SYSKEY key 038F4 4100645C 827 PAR OURTIMSTMP indicator 038F5 404067F0 828 PARVL PHSTAPBUF/PHSSEQNUM record number 829 038F6 D0578805 6 BASE 830 DEC SP,NUMCHUNKS one more chunk is done 038F7 FE0438EA 831 JGT CHUNKLOOP keep going until they are all done 832 * \ / 833 038F8 61178801 4 6 BASE 834 LD R4 SP,R4SAVE restore this register 038F9 5D1F8006 6 STAK 835 LEAVE POP 836 * --- 837 CHUNKLOOP 000038EA F 21 813= 831j CHUNKPTR 00178802 F 21 788= 797s 821 822s CHUNKSIZE 00178803 F 21 789= 808s 814 +DECRYPT UUUUUUUU F 21 823 +DECRYPTIT 000038DB F 21 784 794= EXTRA 00178804 F 21 790= 809s 815s HAVESIZE 000038EE F 21 816j 820= +MAXENCRSIZ 00001000 F 21 799 800 NUMCHUNKS 00178805 F 21 791= 801s 806 830s +OURTIMSTMP 0000645C F 21 827a +PHSENCSTRT 00160803 F 21 796a +PHSRECWDS 00006550 F 21 798 804 +PHSSEQNUM 00160800 F 21 828 +PHSTAPBUF 000067F0 F 21 796a 828 R4SAVE 00178801 F 21 787= 795s 834 +SYSKEY 0000645A F 21 826a 838 END DECRYPTIT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 129 (TRTAPEMAN) F 21 Tape record manager 840 841 ********************************************************************************** 842 * * 843 * DOANY * 844 * * 845 * We can process some types of records (e.g. backup * 846 * error) at a very low level. This routine will process * 847 * these record types. * 848 * * 849 * Calling sequence: * 850 * CALLNP DOANY * 851 * JMP * 852 * * 853 * Eats: R0:R1. * 854 * * 855 ********************************************************************************** 856 857 BLOCK DOANY 858 ENTRY DOANY 859 860 BEGFRAME 861 ENDFRAME 862 038FA DD5F8001 6 STAK 863 DOANY ENTRNP PUSH 038FB 6000654E 0 864 LD R0 CURRECTYP get the type for this record 038FC 5D6038FE 0 865 XCT FCTTAB(R0) 038FD 5D1F8001 6 STAK 866 LEAVE POP 867 * --- 868 000038FE 869 FCTTAB LABEL 038FE 19C40001 7 IMM 870 ADD R7 1 "file set" we shouldn't get this one 038FF 19C40001 7 IMM 871 ADD R7 1 "end file set" do nothing 03900 19C40001 7 IMM 872 ADD R7 1 "tape/track switch" : do nothing 03901 19C40001 7 IMM 873 ADD R7 1 "volume" info do nothing 03902 19C40001 7 IMM 874 ADD R7 1 "account" info do nothing 03903 19C40001 7 IMM 875 ADD R7 1 "file" info do nothing 03904 19C40001 7 IMM 876 ADD R7 1 "file data" info do nothing 03905 DC403907 877 CALLNP PRNTERR "error" info. found by +BACKUP 03906 19C40001 7 IMM 878 ADD R7 1 "filler" do nothing 00000009 ABS 879 FCTLEN EQU DISPW FCTTAB length of table 880 ASSERTEQ FCTLEN,(MAXRECTYP+1) 880 BSS FCTLEN-(MAXRECTYP+1) error if FCTLEN < (MAXRECTYP+1) 880 BSS (MAXRECTYP+1)-FCTLEN error if (MAXRECTYP+1) < FCTLEN 881 +ASSERTEQ MACRO F 21 880 +CURRECTYP 0000654E F 21 864 +DOANY 000038FA F 21 858 863= FCTLEN 00000009 F 21 879= 880 880 FCTTAB 000038FE F 21 865 869= 879e +MAXRECTYP 00000008 F 21 880 880 +PRNTERR UUUUUUUU F 21 877 882 END of DOANY 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 130 (TRTAPEMAN) F 21 Tape record manager 884 885 ********************************************************************************** 886 * * 887 * PRNTERR * 888 * * 889 * When we enounter a record that says that on-line * 890 * backup had an error we will come here and tell the guy * 891 * about it. * 892 * * 893 * Calling sequence: * 894 * CALLNP PRNTERR * 895 * * 896 * Eats: R0,R1 * 897 * * 898 ********************************************************************************** 899 900 BLOCK PRNTERR 901 ENTRY PRNTERR 902 903 BEGFRAME 904 ENDFRAME 905 03907 DD5F8001 6 STAK 906 PRNTERR ENTRNP PUSH 03908 DC1013F9 @ 907 CALL @VPREPOUT tell the guy what we found 03909 4000390B 908 PARL ONLERRMSG 0390A 5D1F8001 6 STAK 909 LEAVE POP 910 * --- 911 0390B 204F6E2D 912 ONLERRMSG TEXTZ " On-line BACKUP encountered an error here." 913 ONLERRMSG 0000390B F 21 908a 912= +PRNTERR 00003907 F 21 901 906= +VPREPOUT 000013F9 F 21 907 914 END of PRNTERR 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 131 (TRTAPEMAN) F 21 Tape record manager 916 917 ********************************************************************************** 918 * * 919 * PRNTPHYS * 920 * * 921 * This routine just prints the physical record sequence * 922 * number. * 923 * * 924 * Calling sequence: * 925 * CALLNP PRNTPHYS * 926 * * 927 * Eats: R0:R4. * 928 * * 929 ********************************************************************************** 930 931 BLOCK PRNTPHYS 932 ENTRY PRNTPHYS 933 934 BEGFRAME 935 ENDFRAME 936 03916 DD5F8001 6 STAK 937 PRNTPHYS ENTRNP PUSH 03917 DC1013F9 @ 938 CALL @VPREPOUT complain a bit 03918 41006551 939 PAR NXTPHSNUM and what we expected. 03919 4000391B 940 PARL PHYSNMMESS what to say 941 0391A 5D1F8001 6 STAK 942 LEAVE POP 943 * --- 0391B 20696E20 944 PHYSNMMESS TEXTZ " in physical record number \H1\." 945 +NXTPHSNUM 00006551 F 21 939a PHYSNMMESS 0000391B F 21 940a 944= +PRNTPHYS 00003916 F 21 932 937= +VPREPOUT 000013F9 F 21 938 946 END of PRNTPHYS 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 132 (TRTAPEMAN) F 21 Tape record manager 948 949 ********************************************************************************** 950 * * 951 * GETRECHDR * 952 * This routine will move the current header to a buffer * 953 * so that we can play with it later. It also adjusts, and * 954 * updates all the pointers etc. for the record. * 955 * Calling sequence: * 956 * CALLNP GETRECHDR * 957 * JMP * 958 * * 959 * Eats: R0:R4. * 960 * * 961 ********************************************************************************** 962 963 BLOCK GETRECHDR 964 ENTRY GETRECHDR 965 966 BEGFRAME 967 ENDFRAME 968 03924 DD5F8001 6 STAK 969 GETRECHDR ENTRNP PUSH 03925 6000654E 0 970 LD R0 CURRECTYP get the current type 03926 6060392D 1 0 971 LD R1 FCTTAB(R0) get the length we want to move 03927 DC00375B 972 CALL MOVLOGREC move the header to a buffer 03928 41006522 973 PAR CURHDRBUF buffer to move to 03929 40524000 1 REG 974 PARVL R1 number of words to move 0392A FE0E392C 975 JMP BADRTN jump on tape error 976 0392B 19C40001 7 IMM 977 ADD R7 1 return to P+2 0000392C 978 BADRTN LABEL 0392C 5D1F8001 6 STAK 979 LEAVE POP 980 * --- 981 982 * Table of header lengths for each logical record type 0000392D 983 FCTTAB LABEL 0392D 00000010 984 VFD SVSRECLEN 0392E 00000007 985 VFD SVERECLEN 0392F 00000008 986 VFD TPERECLEN 03930 00000005 987 VFD VOLRECLEN 03931 00000009 988 VFD ACTRECLEN 03932 00000013 989 VFD FILRECLEN 03933 00000008 990 VFD FIPRECLEN 03934 00000001 991 VFD ERRRECLEN 03935 00000001 992 VFD FILLERRECL 00000009 ABS 993 FCTLEN EQU DISPW FCTTAB length of table 994 ASSERTEQ FCTLEN,(MAXRECTYP+1) 994 BSS FCTLEN-(MAXRECTYP+1) error if FCTLEN < (MAXRECTYP+1) 994 BSS (MAXRECTYP+1)-FCTLEN error if (MAXRECTYP+1) < FCTLEN 995 +ACTRECLEN 00000009 F 21 988x +ASSERTEQ MACRO F 21 994 BADRTN 0000392C F 21 975j 978= +CURHDRBUF 00006522 F 21 973a +CURRECTYP 0000654E F 21 970 +ERRRECLEN 00000001 F 21 991x 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 133 (TRTAPEMAN) F 21 Tape record manager FCTLEN 00000009 F 21 993= 994 994 FCTTAB 0000392D F 21 971 983= 993e +FILLERRECL 00000001 F 21 992x +FILRECLEN 00000013 F 21 989x +FIPRECLEN 00000008 F 21 990x +GETRECHDR 00003924 F 21 964 969= +MAXRECTYP 00000008 F 21 994 994 +MOVLOGREC 0000375B F 21 972 +SVERECLEN 00000007 F 21 985x +SVSRECLEN 00000010 F 21 984x +TPERECLEN 00000008 F 21 986x +VOLRECLEN 00000005 F 21 987x 996 END of GETRECHDR 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 134 (TRTAPEMAN) F 21 Tape record manager 998 999 ********************************************************************************** 1000 * * 1001 * GETTAPSTR * 1002 * * 1003 * This routine will bump past any "tape string" that is * 1004 * in the current logical record. * 1005 * * 1006 * Call: * 1007 * CALLNP GETTAPSTR * 1008 * JMP * 1009 * * 1010 * Eats: R0:R4. * 1011 * * 1012 ********************************************************************************** 1013 1014 BLOCK GETTAPSTR 1015 ENTRY GETTAPSTR 1016 1017 BEGFRAME 1018 ENDFRAME 1019 03936 DD5F8001 6 STAK 1020 GETTAPSTR ENTRNP PUSH 03937 6000654E 0 1021 LD R0 CURRECTYP get the current record type 03938 5C30394B 0 @ 1022 CMZ @FCTTABPTR(R0) is there a tape string for this record? 03939 FE023948 1023 JEQ NOSTRING quit if no strings attached 1024 * \ / 1025 0393A 60440200 1 IMM 1026 LD R1 TAPSTRBUFL pick up size of buffer and 0393B 388064A2 2 1027 LEA R2 TAPSTRBUF ... its starting address 0393C FE580000 1028 CFILL 0 ... and clear it 1029 0393D DC00375B 1030 CALL MOVLOGREC move the first word of the string 0393E 410064A2 1031 PAR TAPSTRBUF buffer to move to 0393F 40440001 IMM 1032 PARVL 1 move just one word 03940 FE0E3949 1033 JMP BADRTN jump on tape error 1034 03941 380064A2 0 1035 LEA R0 TAPSTRBUF point to what we just moved 03942 60560000 1 0 CACH 1036 LD R1 R0,TAPSTRCHS get the number of chars. in string 03943 14440004 1 IMM 1037 DIV R1 CPW convert to words (-1, rounds down) 1038 03944 DC00375B 1039 CALL MOVLOGREC move what's left in the tape string 03945 410064A3 1040 PAR TAPSTRBUF(1) destination buffer 03946 40524000 1 REG 1041 PARVL R1 words to move 03947 FE0E3949 1042 JMP BADRTN jump on tape error 1043 * \ / 1044 00003948 1045 NOSTRING LABEL 03948 19C40001 7 IMM 1046 ADD R7 1 return to P+2 00003949 1047 BADRTN LABEL 03949 5D1F8001 6 STAK 1048 LEAVE POP 1049 * --- 1050 1051 * Table for each logical record type. Bit is true if 1052 * there is a tape string associated with the record. 03949 00000000 1053 FCTTAB VFDB 1:1,0,0,1,1,1,0,0,0 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 135 (TRTAPEMAN) F 21 Tape record manager 0394B 0048394A 1054 FCTTABPTR PTR FCTTAB 1055 BADRTN 00003949 F 21 1033j 1042j 1047= +CURRECTYP 0000654E F 21 1021 FCTTAB 0040394A F 21 1053= 1054a FCTTABPTR 0000394B F 21 1022 1054= +GETTAPSTR 00003936 F 21 1015 1020= +MOVLOGREC 0000375B F 21 1030 1039 NOSTRING 00003948 F 21 1023j 1045= +TAPSTRBUF 000064A2 F 21 1027a 1031a 1035a 1040a +TAPSTRBUFL 00000200 F 21 1026 +TAPSTRCHS 00160000 F 21 1036 1056 END of GETTAPSTR 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 136 (TRTAPEMAN) F 21 Tape record manager 1058 1059 ********************************************************************************** 1060 * * 1061 * This routine will move over the header that is tacked * 1062 * onto information that was returned to +BACKUP by the OS. * 1063 * * 1064 * Call: * 1065 * CALLNP BMPPSTHDR2 * 1066 * JMP * 1067 * Eats: R0:R4. * 1068 * * 1069 ********************************************************************************** 1070 1071 BLOCK BMPPSTHDR2 1072 ENTRY BMPPSTHDR2 1073 1074 BEGFRAME 1075 ENDFRAME 1076 0394C DD5F8001 6 STAK 1077 BMPPSTHDR2 ENTRNP PUSH 0394D 6000654E 0 1078 LD R0 CURRECTYP get the current type 0394E 5C303957 0 @ 1079 CMZ @FCTTABPTR(R0) see if there is a header to move 0394F FE023954 1080 JEQ NODO if none just skip over 03950 DC00375B 1081 CALL MOVLOGREC move the header to a temp. 03951 41006535 1082 PAR HDR1000BUF place to move the header 03952 40440001 IMM 1083 PARVL TAPHDR1000L length of move in words 03953 FE0E3955 1084 JMP BADRTN jump on tape error 1085 00003954 1086 NODO LABEL 03954 19C40001 7 IMM 1087 ADD R7 1 return to P+2 00003955 1088 BADRTN LABEL 03955 5D1F8001 6 STAK 1089 LEAVE POP 1090 * --- 1091 1092 * Table of what to move, if any. 03955 00000000 1093 FCTTAB VFDB 1:0,0,0,1,1,1,1,0,0 03957 00483956 1094 FCTTABPTR PTR FCTTAB 1095 BADRTN 00003955 F 21 1084j 1088= +BMPPSTHDR2 0000394C F 21 1072 1077= +CURRECTYP 0000654E F 21 1078 FCTTAB 00403956 F 21 1093= 1094a FCTTABPTR 00003957 F 21 1079 1094= +HDR1000BUF 00006535 F 21 1082a +MOVLOGREC 0000375B F 21 1081 NODO 00003954 F 21 1080j 1086= +TAPHDR1000L 00000001 F 21 1083 1096 END of BMPPSTHDR2 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 137 (TRTAPEMAN) F 21 Tape record manager 1098 1099 ********************************************************************************** 1100 * * 1101 * SETUPTAPE * 1102 * * 1103 * This routine will ask the user to put the first tape * 1104 * into the drive if it isn't there already. If we get an * 1105 * error here we just die. * 1106 * * 1107 * Calling sequence: * 1108 * CALLNP SETUPTAPE * 1109 * JMP * 1110 * * 1111 * Eats: R0:R4. * 1112 * * 1113 ********************************************************************************** 1114 1115 BLOCK SETUPTAPE 1116 ENTRY SETUPTAPE 1117 03958 2A506C65 1118 PROMPTMSG TEXTZ "*Please place correct tape in drive, and press CR " 1119 1120 BEGFRAME 1121 ENDFRAME 1122 03965 DD5F8001 6 STAK 1123 SETUPTAPE ENTRNP PUSH 00003966 1124 TRYAGAIN LABEL 03966 DC1013F9 @ 1125 CALL @VPREPOUT output to the terminal 03967 40003958 1126 PARL PROMPTMSG message to print 1127 03968 DC5013F1 @ 1128 CALLNP @VREADCHAR read a character from the terminal 03969 6404000D 0 IMM 1129 CPR R0 CR is it a carriage return? 0396A FE0C3966 1130 JNE TRYAGAIN jump if not 1131 * \ / 0396B 6004000A 0 IMM 1132 LD R0 LF line feed char. 0396C DC5013F2 @ 1133 CALLNP @VWRITECHAR echo a line feed 1134 0396D 611013D0 4 @ 1135 LD R4 @VTAPECB point to our tape control block 0396E DC5013D4 @ 1136 CALLNP @VREWIND rewind the tape 0396F FA0C3978 0 1137 JNEZ R0 BADRWD jump if error rewinding 1138 * \ / 03970 EDC06552 1139 STW EXPTAPNUM we should get tape number one 03971 EC006551 1140 STZ NXTPHSNUM first record number will be zero 03972 EDC0645E 1141 STW EXPECTENC we expect to begin with encryption 03973 DC4039C5 1142 CALLNP GETFLSREC get a copy of the "file set" header 03974 FE0E3977 1143 JMP BADRTN jump if couldn't get a good copy 1144 03975 E640645C 12 1145 ST2 R1 OURTIMSTMP save time stamp 1146 03976 19C40001 7 IMM 1147 ADD R7 1 return address is P+2 00003977 1148 BADRTN LABEL 03977 5D1F8001 6 STAK 1149 LEAVE POP 1150 * --- 1151 1152 * If we got an error rewinding the tape come here. 00003978 1153 BADRWD LABEL 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 138 (TRTAPEMAN) F 21 Tape record manager 03978 DC1013F9 @ 1154 CALL @VPREPOUT write the message 03979 4000397B 1155 PARL BADRWDMSG 0397A FE0E3977 1156 JMP BADRTN go give error return 1157 * --- 1158 0397B 20457272 1159 BADRWDMSG TEXTZ " Error rewinding tape." 1160 BADRTN 00003977 F 21 1143j 1148= 1156j BADRWD 00003978 F 21 1137j 1153= BADRWDMSG 0000397B F 21 1155a 1159= +CR 0000000D F 21 1129 +EXPECTENC 0000645E F 21 1141s +EXPTAPNUM 00006552 F 21 1139s +GETFLSREC UUUUUUUU F 21 1142 +LF 0000000A F 21 1132 +NXTPHSNUM 00006551 F 21 1140s +OURTIMSTMP 0000645C F 21 1145s PROMPTMSG 00003958 F 21 1118= 1126a +SETUPTAPE 00003965 F 21 1116 1123= TRYAGAIN 00003966 F 21 1124= 1130j +VPREPOUT 000013F9 F 21 1125 1154 +VREADCHAR 000013F1 F 21 1128 +VREWIND 000013D4 F 21 1136 +VTAPECB 000013D0 F 21 1135 +VWRITECHAR 000013F2 F 21 1133 1161 END of SETUPTAPE 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 139 (TRTAPEMAN) F 21 Tape record manager 1163 1164 ********************************************************************************** 1165 * * 1166 * NEWTAPE * 1167 * * 1168 * This routine will switch tapes. Note that tapes made * 1169 * by +BACKUP will always have two identical copies of the * 1170 * "file set" info. at the beginning of each tape. * 1171 * * 1172 * Calling sequence: * 1173 * CALLNP NEWTAPE * 1174 * * 1175 * Eats: R0:R4. * 1176 * * 1177 ********************************************************************************** 1178 1179 BLOCK NEWTAPE 1180 ENTRY NEWTAPE 1181 1182 BEGFRAME 1183 ENDFRAME 1184 03981 2A07506C 1185 NEWMSG TEXTZ "*Please put tape #\D1\ in the drive and enter OK. " 0398E 9BCAD000 1186 PACKOK PAK6 OK 1187 0398F DD5F8001 6 STAK 1188 NEWTAPE ENTRNP PUSH 03990 5C170802 4 BASE 1189 CMZ R4,TPCBTRACK check type of tape 03991 FE083994 1190 JLT ASKGUY jump iff 9 track 1191 * \ / 03992 EC170802 4 BASE 1192 STZ R4,TPCBTRACK we will begin again at track 0 03993 DC5013D8 @ 1193 CALLNP @VSETTAPE set the new track 00003994 1194 ASKGUY LABEL 03994 DC1013F9 @ 1195 CALL @VPREPOUT tell the guy we're done with this tape 03995 41006552 1196 PAR EXPTAPNUM pass tape # 03996 40003981 1197 PARL NEWMSG 1198 03997 60440050 1 IMM 1199 LD R1 TRMBUFLEN buffer length 03998 60846460 2 IMM 1200 LD R2 ADR TRMBUF start of the thing 03999 DC5013F3 @ 1201 CALLNP @VREADLINE read a line 0399A 30440050 1 IMM 1202 RSB R1 TRMBUFLEN see what's left 0399B FA4A3994 1 1203 JLEZ R1 ASKGUY ask again if we didn't get anything 1204 * \ / 1205 0399C EC32303C 1 @ 1206 STZ @TRMBUFPTR(R1) emplace terminator in buffer 0399D 39006460 4 1207 LEA R4 TRMBUF R4 -> beginning of input buffer 0399E DC5013F5 @ 1208 CALLNP @VFETCHITEM get parameter 0399F 6480398E 2 1209 CPR R2 PACKOK is it an OK response? 039A0 FE0C3994 1210 JNE ASKGUY if not then make them get it right 1211 * \ / 1212 039A1 611013D0 4 @ 1213 LD R4 @VTAPECB point to our tape control block 039A2 DC5013D4 @ 1214 CALLNP @VREWIND rewind the tape 039A3 FA0C39A9 0 1215 JNEZ R0 BADRWD 1216 * \ / 039A4 DC4039C5 1217 CALLNP GETFLSREC get a copy of the "file set" record 039A5 FE0E3994 1218 JMP ASKGUY jump if error 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 140 (TRTAPEMAN) F 21 Tape record manager 1219 039A6 6A40645C 12 1220 UCPR2 R1 OURTIMSTMP is it the same as the last one? 039A7 FE0C39B3 1221 JNE BADTIM jump if not 1222 * \ / 039A8 5D1F8001 6 STAK 1223 LEAVE POP 1224 * --- 1225 1226 * We come here if we get an error trying to rewind the tape. 000039A9 1227 BADRWD LABEL 039A9 DC1013F9 @ 1228 CALL @VPREPOUT tell the guy 039AA 400039AC 1229 PARL BADRWDMSG 039AB FE0E3994 1230 JMP ASKGUY and try again 1231 * --- 1232 039AC 20457272 1233 BADRWDMSG TEXTZ " Error rewinding the tape." 1234 1235 * We come here when we have a tape that has a bad time stamp (serial #). 000039B3 1236 BADTIM LABEL 039B3 DC1013F9 @ 1237 CALL @VPREPOUT tell the guy about what we found 039B4 400039B6 1238 PARL BADTIMMSG 039B5 FE0E3994 1239 JMP ASKGUY and try again 1240 * --- 1241 039B6 20546869 1242 BADTIMMSG TEXTZ " This tape is not part of the set that we were recovering." 1243 ASKGUY 00003994 F 21 1190j 1194= 1203j 1210j 1218j 1230j 1239j BADRWD 000039A9 F 21 1215j 1227= BADRWDMSG 000039AC F 21 1229a 1233= BADTIM 000039B3 F 21 1221j 1236= BADTIMMSG 000039B6 F 21 1238a 1242= +EXPTAPNUM 00006552 F 21 1196a +GETFLSREC UUUUUUUU F 21 1217 NEWMSG 00003981 F 21 1185= 1197a +NEWTAPE 0000398F F 21 1180 1188= +OURTIMSTMP 0000645C F 21 1220 PACKOK 0000398E F 21 1186= 1209 +TPCBTRACK 00160802 F 21 1189 1192s +TRMBUF 00006460 F 21 1200a 1207a +TRMBUFLEN 00000050 F 21 1199 1202 +TRMBUFPTR 0000303C F 21 1206s +VFETCHITEM 000013F5 F 21 1208 +VPREPOUT 000013F9 F 21 1195 1228 1237 +VREADLINE 000013F3 F 21 1201 +VREWIND 000013D4 F 21 1214 +VSETTAPE 000013D8 F 21 1193 +VTAPECB 000013D0 F 21 1213 1244 END of NEWTAPE 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 141 (TRTAPEMAN) F 21 Tape record manager 1246 1247 ********************************************************************************** 1248 * * 1249 * GETFLSREC * 1250 * * 1251 * This routine will attempt to get a good copy of the * 1252 * duplicate "file set" logical record. We will then see * 1253 * if this is from the tape that we expected. * 1254 * * 1255 * Calling sequence: * 1256 * tape rewound * 1257 * CALLNP GETFLSREC * 1258 * JMP * 1259 * R1,R2 = time stamp from the first record * 1260 * * 1261 * Eats: R0:R4. * 1262 * * 1263 ********************************************************************************** 1264 1265 BLOCK GETFLSREC 1266 ENTRY GETFLSREC 1267 1268 BEGFRAME 00178801 6 BASE 1269 FLGWRD BSS 1 flag to say if we have read secondary block 1270 ENDFRAME 1271 1272 039C5 DD5F8002 6 STAK 1273 GETFLSREC ENTRNP PUSH 039C6 EC178801 6 BASE 1274 STZ SP,FLGWRD say we have not read the first one 1275 * \ / 1276 000039C7 1277 CHKREC LABEL 039C7 611013D0 4 @ 1278 LD R4 @VTAPECB point to our tape control block 039C8 DC1013D3 @ 1279 CALL @VREADTAPE read a record from the tape 039C9 41440000 IMM 1280 PARV 0 no sequence number available 039CA 414467F0 IMM 1281 PARV ADR PHSTAPBUF address of buffer 039CB 40440000 IMM 1282 PARVL 0 say we want a single sequential record 039CC FA0C39E9 0 1283 JNEZ R0 BADPHS jump on error 1284 039CD 380067F7 0 1285 LEA R0 PHSTAPBUF/PHSLOGDATA get pointer to logical data 039CE 60481650 1 0 ZBM 1286 LD R1 R0,LOGRECTYP and get the logical record type 039CF 64440000 1 IMM 1287 CPR R1 RTYPESET is it a "file set" record type? 039D0 FE0C39E9 1288 JNE BADPHS jump if not 1289 * \ / 1290 039D1 60560802 1 0 BASE 1291 LD R1 R0,SETTAPNUM get this tape number 039D2 64406552 1 1292 CPR R1 EXPTAPNUM is what we expected? 039D3 FE0C39F8 1293 JNE BADTAP jump if not 1294 * \ / 1295 039D4 60560805 1 0 BASE 1296 LD R1 R0,BOOTINFO get boot info flag 039D5 E4406553 1 1297 ST R1 BOOTFLAG keep around 039D6 5C178801 6 BASE 1298 CMZ SP,FLGWRD have we read secondary block? 039D7 FE0C39DC 1299 JNE RETURN if so, all done 1300 * \ / 1301 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 142 (TRTAPEMAN) F 21 Tape record manager 039D8 DC1013D3 @ 1302 CALL @VREADTAPE read a record from the tape 039D9 41440000 IMM 1303 PARV 0 no sequence number available 039DA 41446BF0 IMM 1304 PARV ADR PHSTAPBUF(WPP) address of buffer (avoiding first record) 039DB 40440000 IMM 1305 PARVL 0 say we want a single sequential buffer 1306 * \ / ignore any errors 1307 000039DC 1308 RETURN LABEL 039DC 380067F7 0 1309 LEA R0 PHSTAPBUF/PHSLOGDATA get pointer to logical data 039DD 62560803 120 BASE 1310 LD2 R1 R0,SETTIMSTP get the time stamp 039DE 60082101 0 0 ZBM 1311 LD R0 R0,SAVSETFMT get the tape format 039DF E400645F 0 1312 ST R0 TAPEFORM save for others to know 039E0 64040005 0 IMM 1313 CPR R0 SSTAPEFN5 see if it has new style record numbering 039E1 FE0639E4 1314 JGE NEWFORM if so then skip the increments 1315 * \ / 1316 039E2 60040002 0 IMM 1317 LD R0 2 new format keeps same seq number for end 039E3 98006551 0 1318 ADDM R0 NXTPHSNUM of tape and beginning of tape records 000039E4 1319 NEWFORM LABEL 039E4 EC00654F 1320 STZ NXTHDRPTR force a read next logical record 039E5 EC00654B 1321 STZ ENDRECPTR force a read next logical record we get 039E6 D0006552 1322 INC EXPTAPNUM increment for next tape 039E7 19C40001 7 IMM 1323 ADD R7 1 return will be P+2 000039E8 1324 BADRTN LABEL 039E8 5D1F8002 6 STAK 1325 LEAVE POP 1326 * --- 1327 1328 * If a record is bad, we come here. If this was a read 1329 * of the first record, we try for the secondary one. 000039E9 1330 BADPHS LABEL 039E9 D1D78801 6 BASE 1331 SETT SP,FLGWRD check for first time through 039EA FE0C39C7 1332 JNE CHKREC jump if it was 1333 1334 * We get here if we can't read either "file set" record. 039EB DC1013F9 @ 1335 CALL @VPREPOUT tell the guy what happened 039EC 400039EE 1336 PARL BADRECMSG 039ED FE0E39E8 1337 JMP BADRTN 1338 * --- 1339 039EE 20074361 1340 BADRECMSG TEXTZ " Can't read either 'file set' record." 1341 1342 * If we get here we have a tape number that we didn't expect. 000039F8 1343 BADTAP LABEL 039F8 DC1013F9 @ 1344 CALL @VPREPOUT tell the guy what happened 039F9 400039FB 1345 PARL BADTAPMSG 039FA FE0E39E8 1346 JMP BADRTN 1347 * --- 1348 039FB 20075468 1349 BADTAPMSG TEXTZ " This tape is not the expected one." 1350 BADPHS 000039E9 F 21 1283j 1288j 1330= BADRECMSG 000039EE F 21 1336a 1340= BADRTN 000039E8 F 21 1324= 1337j 1346j BADTAP 000039F8 F 21 1293j 1343= BADTAPMSG 000039FB F 21 1345a 1349= +BOOTFLAG 00006553 F 21 1297s +BOOTINFO 00160805 F 21 1296 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 143 (TRTAPEMAN) F 21 Tape record manager CHKREC 000039C7 F 21 1277= 1332j +ENDRECPTR 0000654B F 21 1321s +EXPTAPNUM 00006552 F 21 1292 1322s FLGWRD 00178801 F 21 1269= 1274s 1298 1331s +GETFLSREC 000039C5 F 21 1266 1273= +LOGRECTYP 00081650 F 21 1286 NEWFORM 000039E4 F 21 1314j 1319= +NXTHDRPTR 0000654F F 21 1320s +NXTPHSNUM 00006551 F 21 1318s +PHSLOGDATA 00160807 F 21 1285a 1309a +PHSTAPBUF 000067F0 F 21 1281a 1285a 1304a 1309a RETURN 000039DC F 21 1299j 1308= +RTYPESET 00000000 F 21 1287 +SAVSETFMT 00082101 F 21 1311 +SETTAPNUM 00160802 F 21 1291 +SETTIMSTP 00160803 F 21 1310 +SSTAPEFN5 00000005 F 21 1313 +TAPEFORM 0000645F F 21 1312s +VPREPOUT 000013F9 F 21 1335 1344 +VREADTAPE 000013D3 F 21 1279 1302 +VTAPECB 000013D0 F 21 1278 1351 END of GETFLSREC 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 144 (TRTAPEMAN) F 21 Tape record manager 1353 1354 ********************************************************************************** 1355 * * 1356 * ASKIFEND * 1357 * * 1358 * We reach here when it has been determined that the * 1359 * current tape is no longer readable. We then ask if there * 1360 * is another tape in the file set. If there is, we call * 1361 * NEWTAPE to prompt for it and to read the headers. If there * 1362 * is not another tape, we fake end of file set. * 1363 * Call: * 1364 * CALLNP ASKIFEND * 1365 * JMP another tape is in * 1366 * * 1367 * Eats R0:R4 * 1368 * * 1369 ********************************************************************************** 1370 1371 BLOCK ASKIFEND subroutine 1372 1373 ENTRY ASKIFEND 1374 1375 BEGFRAME 1376 ENDFRAME 1377 03A05 20546865 1378 HAPPENMSG TEXTZ " The current tape is no longer readable." 03A10 2A497320 1379 ASKMSG TEXTZ "*Is there another tape in this file set (Y|N)? " 1380 03A1C D59F8000 1381 PAKY PAK6 Y 03A1D 927C0000 1382 PAKN PAK6 N 1383 03A1E DD5F8001 6 STAK 1384 ASKIFEND ENTRNP PUSH 03A1F DC1013F9 @ 1385 CALL @VPREPOUT explain what is happening 03A20 40003A05 1386 PARL HAPPENMSG 1387 00003A21 1388 ASKAGAIN LABEL 03A21 DC1013F9 @ 1389 CALL @VPREPOUT ask if another tape is available 03A22 40003A10 1390 PARL ASKMSG 1391 1392 * Pick up some response. 03A23 60440050 1 IMM 1393 LD R1 TRMBUFLEN length of the input buffer 03A24 60846460 2 IMM 1394 LD R2 ADR TRMBUF point to the buffer 03A25 DC5013F3 @ 1395 CALLNP @VREADLINE read a line from the terminal 1396 03A26 30440050 1 IMM 1397 RSB R1 TRMBUFLEN get length of the input line 03A27 FA4A3A21 1 1398 JLEZ R1 ASKAGAIN make the user answer 03A28 EC32303C 1 @ 1399 STZ @TRMBUFPTR(R1) terminate the buffer 1400 03A29 61046460 4 IMM 1401 LD R4 ADR TRMBUF point to the buffer 03A2A DC5013F8 @ 1402 CALLNP @VFETCHITMH fetch up the key 03A2B 64440002 1 IMM 1403 CPR R1 2 is it a symbol that was packed? 03A2C FE0C3A21 1404 JNE ASKAGAIN jump if not 1405 * \ / 1406 03A2D 64803A1C 2 1407 CPR R2 PAKY is it a Y? 03A2E FE023A34 1408 JEQ YESTHEREIS jump if there is more 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 145 (TRTAPEMAN) F 21 Tape record manager 03A2F 64803A1D 2 1409 CPR R2 PAKN is it a N? 03A30 FE0C3A21 1410 JNE ASKAGAIN error if not Y or N 1411 * \ / 1412 03A31 DC403A36 1413 CALLNP FAKEEND fake end of fileset 1414 03A32 19C40001 7 IMM 1415 ADD R7 1 indicate no more tapes 00003A33 1416 MORERETURN LABEL 03A33 5D1F8001 6 STAK 1417 LEAVE POP 1418 * --- 1419 00003A34 1420 YESTHEREIS LABEL 03A34 DC40398F 1421 CALLNP NEWTAPE get the new tape 03A35 FE0E3A33 1422 JMP MORERETURN 1423 * --- 1424 ASKAGAIN 00003A21 F 21 1388= 1398j 1404j 1410j +ASKIFEND 00003A1E F 21 1373 1384= ASKMSG 00003A10 F 21 1379= 1390a +FAKEEND UUUUUUUU F 21 1413 HAPPENMSG 00003A05 F 21 1378= 1386a MORERETURN 00003A33 F 21 1416= 1422j +NEWTAPE 0000398F F 21 1421 PAKN 00003A1D F 21 1382= 1409 PAKY 00003A1C F 21 1381= 1407 +TRMBUF 00006460 F 21 1394a 1401a +TRMBUFLEN 00000050 F 21 1393 1397 +TRMBUFPTR 0000303C F 21 1399s +VFETCHITMH 000013F8 F 21 1402 +VPREPOUT 000013F9 F 21 1385 1389 +VREADLINE 000013F3 F 21 1395 YESTHEREIS 00003A34 F 21 1408j 1420= 1425 END of ASKIFEND subroutine 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 146 (TRTAPEMAN) F 21 Tape record manager 1427 1428 ********************************************************************************** 1429 * * 1430 * FAKEEND * 1431 * * 1432 * For some reason we must terminate this recovery. In * 1433 * order to accomplish this in a graceful manner we fake the * 1434 * end of file set. This subroutine does that. * 1435 * Call: * 1436 * CALLNP FAKEEND * 1437 * * 1438 * Eats R0:R2 * 1439 * * 1440 ********************************************************************************** 1441 1442 BLOCK FAKEEND subroutine 1443 1444 ENTRY FAKEEND 1445 1446 BEGFRAME 1447 ENDFRAME 1448 03A36 DD5F8001 6 STAK 1449 FAKEEND ENTRNP PUSH 03A37 608467F0 2 IMM 1450 LD R2 ADR PHSTAPBUF R2 -> physical tape buffer 03A38 EC168800 2 BASE 1451 STZ R2,PHSSEQNUM use zero for the sequence number 03A39 EC168803 2 BASE 1452 STZ R2,PHSDSEQNUM and the the duplicate sequence number 03A3A EC088012 2 ZBM 1453 STZ R2,PHSNCRYPTD unencrypted physical record 03A3B EC168801 2 BASE 1454 STZ R2,OPHSREQCNT say no carry over logical record 03A3C EC168805 2 BASE 1455 STZ R2,PHSREQCNT say no carry over logical record 03A3D EC088212 2 ZBM 1456 STZ R2,PHSFILEDO not just file data 03A3E 38968806 2 2 BASE 1457 LEA R2 R2,PHSFILLER want to zero fill the filler 03A3F 60440004 1 IMM 1458 LD R1 CPW*PHSFILLSIZ how much to fill 03A40 FE580000 1459 CFILL 00 all zeroes 1460 03A41 608467F7 2 IMM 1461 LD R2 ADR PHSTAPBUF/PHSLOGDATA R2 -> start of logical record 03A42 60040001 0 IMM 1462 LD R0 RTYPEESET get indicator for end of file set 03A43 E4089650 0 2 ZBM 1463 ST R0 R2,LOGRECTYP set the logical record type 03A44 E400654E 0 1464 ST R0 CURRECTYP set the current record type 03A45 60040007 0 IMM 1465 LD R0 SVERECLEN length of this record 03A46 E408A100 0 2 ZBM 1466 ST R0 R2,LOGRECIFL set the length field 1467 03A47 5D1F8001 6 STAK 1468 LEAVE POP 1469 * --- 1470 +CURRECTYP 0000654E F 21 1464s +FAKEEND 00003A36 F 21 1444 1449= +LOGRECIFL 00082100 F 21 1466s +LOGRECTYP 00081650 F 21 1463s +OPHSREQCNT 00160801 F 21 1454s +PHSDSEQNUM 00160803 F 21 1452s +PHSFILEDO 00080212 F 21 1456s +PHSFILLER 00160806 F 21 1457a +PHSFILLSIZ 00000001 F 21 1458 +PHSLOGDATA 00160807 F 21 1461a +PHSNCRYPTD 00080012 F 21 1453s +PHSREQCNT 00160805 F 21 1455s 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 147 (TRTAPEMAN) F 21 Tape record manager +PHSSEQNUM 00160800 F 21 1451s +PHSTAPBUF 000067F0 F 21 1450a 1461a +RTYPEESET 00000001 F 21 1462 +SVERECLEN 00000007 F 21 1465 1471 END of FAKEEND subroutine 790 INPUT TRCHECKSUM get in the checksum routine 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 148 (TRCHECKSUM) F 22 Tape record manager 2 3 ********************************************************************************** 4 * * 5 * CHECKSUM * 6 * This routine is designed to calculate a ones complement * 7 * checksum as fast as practical. We use this clever table to * 8 * almost completely remove any loop overhead from our checksum * 9 * timing. Note that as one of the restrictions that gains us * 10 * some speed the buffer address must be a fixed memory * 11 * address. A CPU 4 with an SMU will do a checksum in about 3 * 12 * milliseconds per block. A CPU3 with an MCU will still be * 13 * only about 5 milliseconds per block. * 14 * Call: * 15 * R3 = block word length * 16 * CALLNP CHECKSUM * 17 * * 18 * * 19 * Eats R0:R2 * 20 * * 21 ********************************************************************************** 22 23 CHECKSUM BLOCK checksum routine 24 ENTRY CHECKSUM 25 00000007 ABS 26 LOGTABSIZ EQU 7 size of add table 27 03A48 DD5F8001 6 STAK 28 CHECKSUM ENTRNP STAK SP,1 03A49 604AC190 1 3 CBM 29 LD R1 R3/BITS 0:(31-LOGTABSIZ) get number of blocks 03A4A 604A4E00 1 1 CBM 30 LD R1 R1/BITS LOGTABSIZ:(LOGTABSIZ-1) make block number into offset 03A4B 708AF270 2 3 CBM 31 LDN R2 R3/BITS (32-LOGTABSIZ):31 get the offset 03A4C 18843AD2 2 IMM 32 ADD R2 ADR LOOPTOP(128) generate entry address 03A4D 58840004 IMM 33 CLBPSR PSRCARRY clear the carry bit 03A4E 58C40010 IMM 34 IORPSR PSRMODIF turn on modified arithmetic 03A4F 60040000 0 IMM 35 LD R0 0 initialize the checksum 03A50 5C928000 2 REG 36 LDPC R2 and start the operation 37 * --- 38 00003A51 39 RELOOP LABEL 03A51 604A4E00 1 1 CBM 40 LD R1 R1/BITS LOGTABSIZ:(LOGTABSIZ-1) make block number into offset 00003A52 41 LOOPTOP LABEL 03A52 1822686F 0 1 42 ADD R0 BUFFER(127)(R1) 03A53 1822686E 0 1 43 ADD R0 BUFFER(126)(R1) 03A54 1822686D 0 1 44 ADD R0 BUFFER(125)(R1) 03A55 1822686C 0 1 45 ADD R0 BUFFER(124)(R1) 03A56 1822686B 0 1 46 ADD R0 BUFFER(123)(R1) 03A57 1822686A 0 1 47 ADD R0 BUFFER(122)(R1) 03A58 18226869 0 1 48 ADD R0 BUFFER(121)(R1) 03A59 18226868 0 1 49 ADD R0 BUFFER(120)(R1) 03A5A 18226867 0 1 50 ADD R0 BUFFER(119)(R1) 03A5B 18226866 0 1 51 ADD R0 BUFFER(118)(R1) 03A5C 18226865 0 1 52 ADD R0 BUFFER(117)(R1) 03A5D 18226864 0 1 53 ADD R0 BUFFER(116)(R1) 03A5E 18226863 0 1 54 ADD R0 BUFFER(115)(R1) 03A5F 18226862 0 1 55 ADD R0 BUFFER(114)(R1) 03A60 18226861 0 1 56 ADD R0 BUFFER(113)(R1) 03A61 18226860 0 1 57 ADD R0 BUFFER(112)(R1) 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 149 (TRCHECKSUM) F 22 Tape record manager 03A62 1822685F 0 1 58 ADD R0 BUFFER(111)(R1) 03A63 1822685E 0 1 59 ADD R0 BUFFER(110)(R1) 03A64 1822685D 0 1 60 ADD R0 BUFFER(109)(R1) 03A65 1822685C 0 1 61 ADD R0 BUFFER(108)(R1) 03A66 1822685B 0 1 62 ADD R0 BUFFER(107)(R1) 03A67 1822685A 0 1 63 ADD R0 BUFFER(106)(R1) 03A68 18226859 0 1 64 ADD R0 BUFFER(105)(R1) 03A69 18226858 0 1 65 ADD R0 BUFFER(104)(R1) 03A6A 18226857 0 1 66 ADD R0 BUFFER(103)(R1) 03A6B 18226856 0 1 67 ADD R0 BUFFER(102)(R1) 03A6C 18226855 0 1 68 ADD R0 BUFFER(101)(R1) 03A6D 18226854 0 1 69 ADD R0 BUFFER(100)(R1) 03A6E 18226853 0 1 70 ADD R0 BUFFER(99)(R1) 03A6F 18226852 0 1 71 ADD R0 BUFFER(98)(R1) 03A70 18226851 0 1 72 ADD R0 BUFFER(97)(R1) 03A71 18226850 0 1 73 ADD R0 BUFFER(96)(R1) 03A72 1822684F 0 1 74 ADD R0 BUFFER(95)(R1) 03A73 1822684E 0 1 75 ADD R0 BUFFER(94)(R1) 03A74 1822684D 0 1 76 ADD R0 BUFFER(93)(R1) 03A75 1822684C 0 1 77 ADD R0 BUFFER(92)(R1) 03A76 1822684B 0 1 78 ADD R0 BUFFER(91)(R1) 03A77 1822684A 0 1 79 ADD R0 BUFFER(90)(R1) 03A78 18226849 0 1 80 ADD R0 BUFFER(89)(R1) 03A79 18226848 0 1 81 ADD R0 BUFFER(88)(R1) 03A7A 18226847 0 1 82 ADD R0 BUFFER(87)(R1) 03A7B 18226846 0 1 83 ADD R0 BUFFER(86)(R1) 03A7C 18226845 0 1 84 ADD R0 BUFFER(85)(R1) 03A7D 18226844 0 1 85 ADD R0 BUFFER(84)(R1) 03A7E 18226843 0 1 86 ADD R0 BUFFER(83)(R1) 03A7F 18226842 0 1 87 ADD R0 BUFFER(82)(R1) 03A80 18226841 0 1 88 ADD R0 BUFFER(81)(R1) 03A81 18226840 0 1 89 ADD R0 BUFFER(80)(R1) 03A82 1822683F 0 1 90 ADD R0 BUFFER(79)(R1) 03A83 1822683E 0 1 91 ADD R0 BUFFER(78)(R1) 03A84 1822683D 0 1 92 ADD R0 BUFFER(77)(R1) 03A85 1822683C 0 1 93 ADD R0 BUFFER(76)(R1) 03A86 1822683B 0 1 94 ADD R0 BUFFER(75)(R1) 03A87 1822683A 0 1 95 ADD R0 BUFFER(74)(R1) 03A88 18226839 0 1 96 ADD R0 BUFFER(73)(R1) 03A89 18226838 0 1 97 ADD R0 BUFFER(72)(R1) 03A8A 18226837 0 1 98 ADD R0 BUFFER(71)(R1) 03A8B 18226836 0 1 99 ADD R0 BUFFER(70)(R1) 03A8C 18226835 0 1 100 ADD R0 BUFFER(69)(R1) 03A8D 18226834 0 1 101 ADD R0 BUFFER(68)(R1) 03A8E 18226833 0 1 102 ADD R0 BUFFER(67)(R1) 03A8F 18226832 0 1 103 ADD R0 BUFFER(66)(R1) 03A90 18226831 0 1 104 ADD R0 BUFFER(65)(R1) 03A91 18226830 0 1 105 ADD R0 BUFFER(64)(R1) 03A92 1822682F 0 1 106 ADD R0 BUFFER(63)(R1) 03A93 1822682E 0 1 107 ADD R0 BUFFER(62)(R1) 03A94 1822682D 0 1 108 ADD R0 BUFFER(61)(R1) 03A95 1822682C 0 1 109 ADD R0 BUFFER(60)(R1) 03A96 1822682B 0 1 110 ADD R0 BUFFER(59)(R1) 03A97 1822682A 0 1 111 ADD R0 BUFFER(58)(R1) 03A98 18226829 0 1 112 ADD R0 BUFFER(57)(R1) 03A99 18226828 0 1 113 ADD R0 BUFFER(56)(R1) 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 150 (TRCHECKSUM) F 22 Tape record manager 03A9A 18226827 0 1 114 ADD R0 BUFFER(55)(R1) 03A9B 18226826 0 1 115 ADD R0 BUFFER(54)(R1) 03A9C 18226825 0 1 116 ADD R0 BUFFER(53)(R1) 03A9D 18226824 0 1 117 ADD R0 BUFFER(52)(R1) 03A9E 18226823 0 1 118 ADD R0 BUFFER(51)(R1) 03A9F 18226822 0 1 119 ADD R0 BUFFER(50)(R1) 03AA0 18226821 0 1 120 ADD R0 BUFFER(49)(R1) 03AA1 18226820 0 1 121 ADD R0 BUFFER(48)(R1) 03AA2 1822681F 0 1 122 ADD R0 BUFFER(47)(R1) 03AA3 1822681E 0 1 123 ADD R0 BUFFER(46)(R1) 03AA4 1822681D 0 1 124 ADD R0 BUFFER(45)(R1) 03AA5 1822681C 0 1 125 ADD R0 BUFFER(44)(R1) 03AA6 1822681B 0 1 126 ADD R0 BUFFER(43)(R1) 03AA7 1822681A 0 1 127 ADD R0 BUFFER(42)(R1) 03AA8 18226819 0 1 128 ADD R0 BUFFER(41)(R1) 03AA9 18226818 0 1 129 ADD R0 BUFFER(40)(R1) 03AAA 18226817 0 1 130 ADD R0 BUFFER(39)(R1) 03AAB 18226816 0 1 131 ADD R0 BUFFER(38)(R1) 03AAC 18226815 0 1 132 ADD R0 BUFFER(37)(R1) 03AAD 18226814 0 1 133 ADD R0 BUFFER(36)(R1) 03AAE 18226813 0 1 134 ADD R0 BUFFER(35)(R1) 03AAF 18226812 0 1 135 ADD R0 BUFFER(34)(R1) 03AB0 18226811 0 1 136 ADD R0 BUFFER(33)(R1) 03AB1 18226810 0 1 137 ADD R0 BUFFER(32)(R1) 03AB2 1822680F 0 1 138 ADD R0 BUFFER(31)(R1) 03AB3 1822680E 0 1 139 ADD R0 BUFFER(30)(R1) 03AB4 1822680D 0 1 140 ADD R0 BUFFER(29)(R1) 03AB5 1822680C 0 1 141 ADD R0 BUFFER(28)(R1) 03AB6 1822680B 0 1 142 ADD R0 BUFFER(27)(R1) 03AB7 1822680A 0 1 143 ADD R0 BUFFER(26)(R1) 03AB8 18226809 0 1 144 ADD R0 BUFFER(25)(R1) 03AB9 18226808 0 1 145 ADD R0 BUFFER(24)(R1) 03ABA 18226807 0 1 146 ADD R0 BUFFER(23)(R1) 03ABB 18226806 0 1 147 ADD R0 BUFFER(22)(R1) 03ABC 18226805 0 1 148 ADD R0 BUFFER(21)(R1) 03ABD 18226804 0 1 149 ADD R0 BUFFER(20)(R1) 03ABE 18226803 0 1 150 ADD R0 BUFFER(19)(R1) 03ABF 18226802 0 1 151 ADD R0 BUFFER(18)(R1) 03AC0 18226801 0 1 152 ADD R0 BUFFER(17)(R1) 03AC1 18226800 0 1 153 ADD R0 BUFFER(16)(R1) 03AC2 182267FF 0 1 154 ADD R0 BUFFER(15)(R1) 03AC3 182267FE 0 1 155 ADD R0 BUFFER(14)(R1) 03AC4 182267FD 0 1 156 ADD R0 BUFFER(13)(R1) 03AC5 182267FC 0 1 157 ADD R0 BUFFER(12)(R1) 03AC6 182267FB 0 1 158 ADD R0 BUFFER(11)(R1) 03AC7 182267FA 0 1 159 ADD R0 BUFFER(10)(R1) 03AC8 182267F9 0 1 160 ADD R0 BUFFER(9)(R1) 03AC9 182267F8 0 1 161 ADD R0 BUFFER(8)(R1) 03ACA 182267F7 0 1 162 ADD R0 BUFFER(7)(R1) 03ACB 182267F6 0 1 163 ADD R0 BUFFER(6)(R1) 03ACC 182267F5 0 1 164 ADD R0 BUFFER(5)(R1) 03ACD 182267F4 0 1 165 ADD R0 BUFFER(4)(R1) 03ACE 182267F3 0 1 166 ADD R0 BUFFER(3)(R1) 03ACF 182267F2 0 1 167 ADD R0 BUFFER(2)(R1) 03AD0 182267F1 0 1 168 ADD R0 BUFFER(1)(R1) 03AD1 182267F0 0 1 169 ADD R0 BUFFER(0)(R1) 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 151 (TRCHECKSUM) F 22 Tape record manager 170 * \ / end of table 03AD2 604A4190 1 1 CBM 171 LD R1 R1/BITS 0:(31-LOGTABSIZ) get number of blocks 03AD3 FA663A51 1 172 JDR R1 RELOOP if more to do, go back 173 * \ / done with checksum 03AD4 18040000 0 IMM 174 ADD R0 0 add in final carry 03AD5 58840010 IMM 175 CLBPSR PSRMODIF restore normal arithmetic 03AD6 5D1F8001 6 STAK 176 LEAVE STAK SP,1 return to caller 177 * --- 178 +BUFFER 000067F0 F 22 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 +CHECKSUM 00003A48 F 22 24 28= LOGTABSIZ 00000007 F 22 26= 29 30 30 31 40 40 171 LOOPTOP 00003A52 F 22 32a 41= RELOOP 00003A51 F 22 39= 172j 179 END CHECKSUM of checksum routine 791 INPUT TRFREEMAN input the disk free space manager 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 152 (TRFREEMAN) F 23 disk free space manager 3 4 ********************************************************************************** 5 * * 6 * Routines that deal with disk space allocation. * 7 * * 8 ********************************************************************************** 9 10 BLOCK disk space manager 11 ENTRY GETFREBLK 12 ENTRY PUTFREBLK 13 ENTRY CRTADTOUT 14 ENTRY GETFREADR 15 ENTRY MRKBLKS 16 03AD7 0048C7FC 17 BITPTR PTR BITARRAY pointer indexed by block number 18 19 ********************************************************************************** 20 * * 21 * GETFREBLK * 22 * * 23 * This routine will get a free block on the disk, and * 24 * map it into a page and associated FBI. The page is filled * 25 * with zeros, the FBI is set up with the FBI type requested * 26 * and the disk block number of this page. * 27 * * 28 * Calling sequence is: * 29 * CALL GETFREBLK * 30 * PAR address of page * 31 * PAR address of FBI * 32 * PARVL FBI type for page * 33 * JMP * 34 * R3 = disk block number * 35 * * 36 * Eats: R0-R3. * 37 * * 38 ********************************************************************************** 39 40 BLOCK 41 ENTRY GETFREBLK 42 43 BEGFRAME 00178801 6 BASE 44 PAGADR BSS 1 temporary for address of page 00178802 6 BASE 45 FBIADDR BSS 1 temporary location for FBI address 00178803 6 BASE 46 FBITYPREQ BSS 1 FBI type requested 47 ENDFRAME 48 03AD8 DD1F8004 6 STAK 49 GETFREBLK ENTR PUSH 03AD9 C1178801 6 BASE 50 STP SP,PAGADR pass address of page 03ADA C1178802 6 BASE 51 STP SP,FBIADDR pass address of FBI 03ADB C0578803 6 BASE 52 STPVL SP,FBITYPREQ pass the type requested 53 54 * Get a disk block number that we can use 55 03ADC DC403AEA 56 CALLNP GETFREADR get a free block number 03ADD FE0E3AE9 57 JMP DSKOOS jump if out of free space 58 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 153 (TRFREEMAN) F 23 disk free space manager 59 * Zero out the page 60 03ADE 60441000 1 IMM 61 LD R1 CPP number of chars. to do 03ADF 60978801 2 6 BASE 62 LD R2 SP,PAGADR get address of page 03AE0 FE580000 63 CFILL 0 fill it with zeros 64 65 * Fix up the FBI 66 03AE1 6044002C 1 IMM 67 LD R1 FBILNTH*CPW number of chars. in FBI 03AE2 60978802 2 6 BASE 68 LD R2 SP,FBIADDR get starting address 03AE3 FE580000 69 CFILL 0 start by clearing FBI 03AE4 60578802 1 6 BASE 70 LD R1 SP,FBIADDR base of FBI 03AE5 E4C85181 3 1 ZBM 71 ST R3 R1,FBIDA put the block number in FBI 03AE6 60178803 0 6 BASE 72 LD R0 SP,FBITYPREQ get requested type from stack 03AE7 E4084080 0 1 ZBM 73 ST R0 R1,FBITYPE put type into the FBI 74 03AE8 19C40001 7 IMM 75 ADD R7 1 return to P+2 00003AE9 76 DSKOOS LABEL 03AE9 5D1F8004 6 STAK 77 LEAVE POP 78 * --- 79 DSKOOS 00003AE9 F 23 57j 76= FBIADDR 00178802 F 23 45= 51s 68 70 FBITYPREQ 00178803 F 23 46= 52s 72 +GETFREADR UUUUUUUU F 23 56 +GETFREBLK 00003AD8 F 23 41 49= PAGADR 00178801 F 23 44= 50s 62 80 END of GETFREBLK 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 154 (TRFREEMAN) F 23 disk free space manager 82 83 ********************************************************************************** 84 * * 85 * GETFREADR * 86 * * 87 * This routine will get the address of a free block on * 88 * the disk. * 89 * * 90 * Calling sequence: * 91 * CALLNP GETFREADR * 92 * JMP * 93 * R3 = disk block number * 94 * * 95 * Eats: R3. * 96 * * 97 ********************************************************************************** 98 99 BLOCK GETFREADR 100 ENTRY GETFREADR 101 102 BEGFRAME 103 ENDFRAME 104 03AEA DD5F8001 6 STAK 105 GETFREADR ENTRNP PUSH 00003AEB 106 TRYAGN LABEL 03AEB BCC0C7F8 3 107 INCL R3 DSKBLKNUM next available block number 03AEC 64C0C7F5 3 108 CPR R3 MAXDSKADR is it bigger than we can get? 03AED FE063AF2 109 JGE HRDLOOK jump if we are too far 03AEE D1F63AD7 3 @ 110 SETT @BITPTR(R3) is it marked already? 03AEF FE023AEB 111 JEQ TRYAGN try again if this was used 112 * \ / 113 00003AF0 114 GOTONE LABEL 03AF0 19C40001 7 IMM 115 ADD R7 1 return is P+2 00003AF1 116 DSKOOS LABEL 03AF1 5D1F8001 6 STAK 117 LEAVE POP 118 * --- 119 120 * Here we have to go look through the bit map to find one. 00003AF2 121 HRDLOOK LABEL 03AF2 EDC0C7F8 122 STW DSKBLKNUM start at beginning 00003AF3 123 HRDLOOP LABEL 03AF3 BCC0C7F8 3 124 INCL R3 DSKBLKNUM get the next address 03AF4 64C0C7F5 3 125 CPR R3 MAXDSKADR is this number too big? 03AF5 FE063AF1 126 JGE DSKOOS jump if we can't get a block 03AF6 D1F63AD7 3 @ 127 SETT @BITPTR(R3) is this one being used already? 03AF7 FE0C3AF0 128 JNE GOTONE jump if it was zero (free) 03AF8 FE0E3AF3 129 JMP HRDLOOP try next number 130 * --- 131 +BITPTR 00003AD7 F 23 110s 127s +DSKBLKNUM 0000C7F8 F 23 107s 122s 124s DSKOOS 00003AF1 F 23 116= 126j +GETFREADR 00003AEA F 23 100 105= GOTONE 00003AF0 F 23 114= 128j HRDLOOK 00003AF2 F 23 109j 121= 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 155 (TRFREEMAN) F 23 disk free space manager HRDLOOP 00003AF3 F 23 123= 129j +MAXDSKADR 0000C7F5 F 23 108 125 TRYAGN 00003AEB F 23 106= 111j 132 END of GETFREADR 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 156 (TRFREEMAN) F 23 disk free space manager 134 135 ********************************************************************************** 136 * * 137 * PUTFREBLK * 138 * * 139 * This routine will mark a disk block number as unused * 140 * in the bit array of available disk block numbers. * 141 * * 142 * Calling sequence: * 143 * LD R0 * 144 * CALLNP PUTFREBLK * 145 * * 146 * Eats: R0-R1. * 147 * * 148 ********************************************************************************** 149 150 BLOCK PUTFREBLK 151 ENTRY PUTFREBLK 152 153 BEGFRAME 154 ENDFRAME 155 03AF9 20446973 156 BADMSG TEXTZ " Disk block number returned twice, ignored." 03B04 DD5F8001 6 STAK 157 PUTFREBLK ENTRNP PUSH 03B05 78003039 0 158 AND R0 MSBLKMASK chop MS address down to size 03B06 D1B03AD7 0 @ 159 CLRT @BITPTR(R0) mark as available in bit array 03B07 FE0C3B0A 160 JNE OKRTN jump if all is ok 161 * \ / 03B08 DC1013F9 @ 162 CALL @VPREPOUT print out a nasty message 03B09 40003AF9 163 PARL BADMSG 164 00003B0A 165 OKRTN LABEL 03B0A 5D1F8001 6 STAK 166 LEAVE POP 167 * --- 168 BADMSG 00003AF9 F 23 156= 163a +BITPTR 00003AD7 F 23 159s +MSBLKMASK 00003039 F 23 158 OKRTN 00003B0A F 23 160j 165= +PUTFREBLK 00003B04 F 23 151 157= +VPREPOUT 000013F9 F 23 162 169 END of PUTFREBLK 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 157 (TRFREEMAN) F 23 disk free space manager 171 172 ********************************************************************************** 173 * * 174 * MRKBLKS * 175 * * 176 * This routine will mark all of the bad trax, and other * 177 * initially used blocks as used in the bit array, so we will * 178 * not use them again. * 179 * * 180 * Calling sequence: * 181 * TMPPAGBUF = mapped to the bad trax list * 182 * CALLNP MRKBLKS * 183 * Eats: R0-R2,R4. * 184 * * 185 ********************************************************************************** 186 187 BLOCK MRKBLKS 188 ENTRY MRKBLKS 189 190 BEGFRAME 191 ENDFRAME 192 03B0B DD5F8001 6 STAK 193 MRKBLKS ENTRNP PUSH 03B0C 604461A8 1 IMM 194 LD R1 ARYCHRLEN number of chars. in the array 03B0D 6084C7FC 2 IMM 195 LD R2 ADR ARRAYW point to beginning of array 03B0E FE580000 196 CFILL 0 zero out the array 197 03B0F EC130000 4 REG 198 STZ R4 initialize offset into BTRX buffer 00003B10 199 MRKBADLOOP LABEL 03B10 60285800 0 4 200 LD R0 TMPPAGBUF(R4) get the disk address (zero => end) 03B11 FA023B19 0 201 JEQZ R0 ALLFIN if none, stop 202 * \ / 03B12 78003039 0 203 AND R0 MSBLKMASK chop off reason bits 204 03B13 6400C7F5 0 205 CPR R0 MAXDSKADR check for beyond volume end 03B14 FE063B23 206 JGE ERROR jump if so 03B15 D1F03AD7 0 @ 207 SETT @BITPTR(R0) mark as used 00003B16 208 BILOOP LABEL 03B16 19040002 4 IMM 209 ADD R4 BTRXLNTH point to next entry 03B17 69040400 4 IMM 210 UCPR R4 WPP are we beyond the end of the page? 03B18 FE083B10 211 JLT MRKBADLOOP if not then do the next entry 212 * \ / 213 00003B19 214 ALLFIN LABEL 03B19 60040000 0 IMM 215 LD R0 PLDA ms address of pack label 03B1A D1F03AD7 0 @ 216 SETT @BITPTR(R0) mark as used 03B1B 60040001 0 IMM 217 LD R0 VOLLABELDA ms address of volume label 03B1C D1F03AD7 0 @ 218 SETT @BITPTR(R0) mark as used 03B1D 60040002 0 IMM 219 LD R0 BOOTDA ms address of DISKBOOT 03B1E D1F03AD7 0 @ 220 SETT @BITPTR(R0) mark as used 03B1F 6000C7FA 0 221 LD R0 BTXDSKADR ms address of bad trax list 03B20 78003039 0 222 AND R0 MSBLKMASK chop down to size 03B21 D1F03AD7 0 @ 223 SETT @BITPTR(R0) mark as used 03B22 5D1F8001 6 STAK 224 LEAVE POP 225 * --- 226 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 158 (TRFREEMAN) F 23 disk free space manager 00003B23 227 ERROR LABEL 03B23 E4006558 0 228 ST R0 ADDRESSTMP save block number 03B24 DC1013F9 @ 229 CALL @VPREPOUT call to print a message 03B25 41006558 230 PAR ADDRESSTMP pass bad address 03B26 40003B28 231 PARL BEYONDNDMS 03B27 FE0E3B16 232 JMP BILOOP and return to marking 233 * --- 03B28 20426164 234 BEYONDNDMS TEXTZ " Bad Trax block #\H1\ beyond volume end." 235 +ADDRESSTMP 00006558 F 23 228s 230a ALLFIN 00003B19 F 23 201j 214= +ARRAYW 0000C7FC F 23 195a +ARYCHRLEN 000061A8 F 23 194 BEYONDNDMS 00003B28 F 23 231a 234= BILOOP 00003B16 F 23 208= 232j +BITPTR 00003AD7 F 23 207s 216s 218s 220s 223s +BTXDSKADR 0000C7FA F 23 221 ERROR 00003B23 F 23 206j 227= +MAXDSKADR 0000C7F5 F 23 205 MRKBADLOOP 00003B10 F 23 199= 211j +MRKBLKS 00003B0B F 23 188 193= +MSBLKMASK 00003039 F 23 203 222 +TMPPAGBUF 00005800 F 23 200 +VPREPOUT 000013F9 F 23 229 236 END of MRKBLKS 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 159 (TRFREEMAN) F 23 disk free space manager 238 239 ********************************************************************************** 240 * * 241 * CRTADTOUT * 242 * * 243 * When we are all done recovering onto the volume this * 244 * routine is called, and will build an ADT list and put it * 245 * on the volume. * 246 * * 247 * Calling sequence: * 248 * CALLNP CRTADTOUT * 249 * * 250 * Eats : R0:R5 * 251 * * 252 ********************************************************************************** 253 254 BLOCK CRTADTOUT 255 ENTRY CRTADTOUT 256 257 BEGFRAME 00178801 6 BASE 258 MAXLSTSIZ BSS 1 number of ADT blocks per list 00178802 6 BASE 259 CURADTPOS BSS 1 current position in this ADT block 00178803 6 BASE 260 TMPDSKADR BSS 1 temp to hold block number 261 ENDFRAME 262 03B33 20446973 263 BADOUTMSG TEXTZ " Disk error writing a free block, not written." 264 03B3F DD5F8004 6 STAK 265 CRTADTOUT ENTRNP PUSH 03B40 6000C7F5 0 266 LD R0 MAXDSKADR get the maximum disk address 03B41 E400C7F9 0 267 ST R0 LSTDSKADR and initialize the ms block counter 268 03B42 DC403BB3 269 CALLNP GETADTADR get an ADT address 03B43 FA023B6F 0 270 JEQZ R0 NOLIST jump if no free space 271 * \ / 03B44 E4004008 0 272 ST R0 CURSECBUF(SECADTTOP) make this the start of list 03B45 E4004010 0 273 ST R0 CURSECBUF(SECADTBTM) and the end also 03B46 EDC04018 274 STW CURSECBUF(SECADTCNT) initialize count 275 03B47 DC403B73 276 CALLNP INITBUFFS initialize ADT buffer, and a free block 277 03B48 6000C7F5 0 278 LD R0 MAXDSKADR get total possible blocks on volume 03B49 14040008 0 IMM 279 DIV R0 SECADTNUM 03B4A 18040008 0 IMM 280 ADD R0 SECADTNUM calculate blocks per list 03B4B E4178801 0 6 BASE 281 ST R0 SP,MAXLSTSIZ and remember for later 282 03B4C EC00C7FB 283 STZ CURADTLST start with the first list 00003B4D 284 NEWLOOP LABEL 03B4D EC178802 6 BASE 285 STZ SP,CURADTPOS initialize current block pointer 00003B4E 286 MAINLOOP LABEL 03B4E 6080C7FB 2 287 LD R2 CURADTLST get the current list number 03B4F 60644018 1 2 288 LD R1 CURSECBUF(SECADTCNT)(R2) and count for this list 03B50 64578801 1 6 BASE 289 CPR R1 SP,MAXLSTSIZ is the list full? 03B51 FE083B55 290 JLT OKLST jump if not 291 * \ / 03B52 DC403B88 292 CALLNP MAKNEWLST start a new list 03B53 FA023B6B 0 293 JEQZ R0 ALLDONE jump if out of disk space 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 160 (TRFREEMAN) F 23 disk free space manager 294 * \ / 03B54 FE0E3B4D 295 JMP NEWLOOP jump to start new block 296 * --- 297 00003B55 298 OKLST LABEL 03B55 60978802 2 6 BASE 299 LD R2 SP,CURADTPOS get position in current ADT block 03B56 648400C7 2 IMM 300 CPR R2 ADTECNT-1 have we reached limit? 03B57 FE0A3B5B 301 JLE OKCNT jump if not 302 * \ / 03B58 DC403B9B 303 CALLNP MAKNEWBLK start a new ADT block 03B59 FA023B6B 0 304 JEQZ R0 ALLDONE jump if out of space 305 * \ / 03B5A FE0E3B4D 306 JMP NEWLOOP jump to start new block 307 * --- 308 00003B5B 309 OKCNT LABEL 03B5B DC403BB3 310 CALLNP GETADTADR get a free block 03B5C FA023B6B 0 311 JEQZ R0 ALLDONE jump if out of space 312 * \ / 03B5D E4178803 0 6 BASE 313 ST R0 SP,TMPDSKADR remember for later 03B5E 38406442 1 314 LEA R1 TMPPAGFBI point to the "free" blocks FBI 03B5F E4085181 0 1 ZBM 315 ST R0 R1,FBIDA and fix up ms block number 316 03B60 DC003CF9 317 CALL PAGOUT force out the free block 03B61 41005800 318 PAR TMPPAGBUF address of page 03B62 40006442 319 PARL TMPPAGFBI address of FBI 03B63 FE0E3B70 320 JMP BADOUT jump on error 321 03B64 60178803 0 6 BASE 322 LD R0 SP,TMPDSKADR get the disk address 03B65 60578802 1 6 BASE 323 LD R1 SP,CURADTPOS and position into ADT block 03B66 E4224400 0 1 324 ST R0 CURADTBUF(R1) put into the list 03B67 6000C7FB 0 325 LD R0 CURADTLST list we are working on 03B68 D0204018 0 326 INC CURSECBUF(SECADTCNT)(R0) count this block 03B69 D0178802 6 BASE 327 INC SP,CURADTPOS adjust pointer 03B6A FE0E3B4E 328 JMP MAINLOOP 329 * --- 330 00003B6B 331 ALLDONE LABEL 03B6B DC003CF9 332 CALL PAGOUT force out the last block in list 03B6C 41004400 333 PAR CURADTBUF address of page 03B6D 4000640B 334 PARL CURADTFBI address of FBI 03B6E FEC00000 335 NOP 0 ignore any error 336 * \ / 337 00003B6F 338 NOLIST LABEL 03B6F 5D1F8004 6 STAK 339 LEAVE POP 340 * --- 341 00003B70 342 BADOUT LABEL 03B70 DC1013F9 @ 343 CALL @VPREPOUT print out a message 03B71 40003B33 344 PARL BADOUTMSG 03B72 FE0E3B4E 345 JMP MAINLOOP go try for next block 346 * --- 347 ALLDONE 00003B6B F 23 293j 304j 311j 331= BADOUT 00003B70 F 23 320j 342= 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 161 (TRFREEMAN) F 23 disk free space manager BADOUTMSG 00003B33 F 23 263= 344a +CRTADTOUT 00003B3F F 23 255 265= +CURADTBUF 00004400 F 23 324s 333a +CURADTFBI 0000640B F 23 334a +CURADTLST 0000C7FB F 23 283s 287 325 CURADTPOS 00178802 F 23 259= 285s 299 323 327s +CURSECBUF 00004000 F 23 272s 273s 274s 288 326s +GETADTADR UUUUUUUU F 23 269 310 +INITBUFFS UUUUUUUU F 23 276 +LSTDSKADR 0000C7F9 F 23 267s MAINLOOP 00003B4E F 23 286= 328j 345j +MAKNEWBLK UUUUUUUU F 23 303 +MAKNEWLST UUUUUUUU F 23 292 +MAXDSKADR 0000C7F5 F 23 266 278 MAXLSTSIZ 00178801 F 23 258= 281s 289 NEWLOOP 00003B4D F 23 284= 295j 306j NOLIST 00003B6F F 23 270j 338= OKCNT 00003B5B F 23 301j 309= OKLST 00003B55 F 23 290j 298= +PAGOUT UUUUUUUU F 23 317 332 TMPDSKADR 00178803 F 23 260= 313s 322 +TMPPAGBUF 00005800 F 23 318a +TMPPAGFBI 00006442 F 23 314a 319a +VPREPOUT 000013F9 F 23 343 348 END CRTADTOUT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 162 (TRFREEMAN) F 23 disk free space manager 350 351 ********************************************************************************** 352 * * 353 * INITBUFFS * 354 * * 355 * This routine will set up a "free" block that we will * 356 * re-use, and will set up the first ADT list block. * 357 * * 358 * Calling sequence: * 359 * R0 = ms address of free block * 360 * CALLNP INITBUFFS * 361 * * 362 * Eats: R0-R2. * 363 * * 364 ********************************************************************************** 365 366 BLOCK INITBUFFS 367 ENTRY INITBUFFS 368 369 BEGFRAME 370 ENDFRAME 371 03B73 DD5F8001 6 STAK 372 INITBUFFS ENTRNP PUSH 03B74 6044002C 1 IMM 373 LD R1 FBILNTH*CPW number of chars. 03B75 3880640B 2 374 LEA R2 CURADTFBI point to the ADT FBI 03B76 FE580000 375 CFILL 0 zero out 376 03B77 3840640B 1 377 LEA R1 CURADTFBI point to the FBI again 03B78 E4085181 0 1 ZBM 378 ST R0 R1,FBIDA fix up the ms address 03B79 60040007 0 IMM 379 LD R0 FBITADT get FBI type 03B7A E4084080 0 1 ZBM 380 ST R0 R1,FBITYPE and fix up this field 381 03B7B 60441000 1 IMM 382 LD R1 CPP number of chars. 03B7C 38804400 2 383 LEA R2 CURADTBUF point to the page 03B7D FE580000 384 CFILL 0 and zero it out 385 386 * Fix up a "free" page that we will re-use. 387 03B7E 60441000 1 IMM 388 LD R1 CPP do a whole page 03B7F 60845800 2 IMM 389 LD R2 ADR TMPPAGBUF destination 03B80 FE5800FF 390 CFILL 0FF fill with ones 03B81 6044002C 1 IMM 391 LD R1 FBILNTH*CPW do a whole FBI 03B82 60846442 2 IMM 392 LD R2 ADR TMPPAGFBI destination 03B83 FE580000 393 CFILL 0 zero out 03B84 60046442 0 IMM 394 LD R0 ADR TMPPAGFBI point to the FBI 03B85 6044007F 1 IMM 395 LD R1 FBITFREE type of FBI 03B86 E4480080 1 0 ZBM 396 ST R1 R0,FBITYPE and put it in its place 03B87 5D1F8001 6 STAK 397 LEAVE POP 398 * --- 399 +CURADTBUF 00004400 F 23 383a +CURADTFBI 0000640B F 23 374a 377a +INITBUFFS 00003B73 F 23 367 372= +TMPPAGBUF 00005800 F 23 389a +TMPPAGFBI 00006442 F 23 392a 394a 400 END INITBUFFS 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 163 (TRFREEMAN) F 23 disk free space manager 402 403 ********************************************************************************** 404 * * 405 * MAKNEWLST * 406 * * 407 * This routine will start a new list when the current * 408 * one is full. * 409 * * 410 * Calling sequence: * 411 * CALLNP MAKNEWLST * 412 * R0 = 0 if out of space, or new ADT ms address * 413 * * 414 * Eats: R0-R3. * 415 * * 416 ********************************************************************************** 417 418 BLOCK MAKNEWLST 419 ENTRY MAKNEWLST 420 421 BEGFRAME 422 ENDFRAME 423 03B88 DD5F8001 6 STAK 424 MAKNEWLST ENTRNP PUSH 03B89 DC003CF9 425 CALL PAGOUT force out the current page 03B8A 41004400 426 PAR CURADTBUF address of page 03B8B 4000640B 427 PARL CURADTFBI address of FBI 03B8C FEC00000 428 NOP 0 ignore any error here 429 03B8D 60440320 1 IMM 430 LD R1 ADTECNT*CPW length to zero 03B8E 38804400 2 431 LEA R2 CURADTBUF place to start 03B8F FE580000 432 CFILL 0 zero the block 433 03B90 3840640B 1 434 LEA R1 CURADTFBI point to the FBI 03B91 EC085180 1 ZBM 435 STZ R1,FBIFLINK zero the link out 03B92 EC085182 1 ZBM 436 STZ R1,FBIBLINK and the back link also 437 03B93 DC403BB3 438 CALLNP GETADTADR get the next block 03B94 FA023B9A 0 439 JEQZ R0 NOSPACE jump if out of space 440 * \ / 03B95 E4085181 0 1 ZBM 441 ST R0 R1,FBIDA and make it new address 03B96 BC40C7FB 1 442 INCL R1 CURADTLST get number into next list 03B97 E4224008 0 1 443 ST R0 CURSECBUF(SECADTTOP)(R1) fix up start of list 03B98 E4224010 0 1 444 ST R0 CURSECBUF(SECADTBTM)(R1) and end of list 03B99 EDE24018 1 445 STW CURSECBUF(SECADTCNT)(R1) and count 00003B9A 446 NOSPACE LABEL 03B9A 5D1F8001 6 STAK 447 LEAVE POP 448 * --- 449 +CURADTBUF 00004400 F 23 426a 431a +CURADTFBI 0000640B F 23 427a 434a +CURADTLST 0000C7FB F 23 442s +CURSECBUF 00004000 F 23 443s 444s 445s +GETADTADR UUUUUUUU F 23 438 +MAKNEWLST 00003B88 F 23 419 424= NOSPACE 00003B9A F 23 439j 446= +PAGOUT UUUUUUUU F 23 425 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 164 (TRFREEMAN) F 23 disk free space manager 450 END of MAKNEWLST 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 165 (TRFREEMAN) F 23 disk free space manager 452 453 ********************************************************************************** 454 * * 455 * MAKNEWBLK * 456 * * 457 * When the current ADT block is full this routine will * 458 * create a new one and link it into the current list. * 459 * * 460 * Calling sequence: * 461 * CALLNP MAKNEWBLK * 462 * R0 = 0 if out of space, or new ADT ms address * 463 * * 464 * Eats: R0-R3. * 465 * * 466 ********************************************************************************** 467 468 BLOCK MAKNEWBLK 469 ENTRY MAKNEWBLK 470 471 BEGFRAME 00178801 6 BASE 472 NEWADTADR BSS 1 temp to remember new address 473 ENDFRAME 474 03B9B DD5F8002 6 STAK 475 MAKNEWBLK ENTRNP PUSH 03B9C DC403BB3 476 CALLNP GETADTADR get another block 03B9D FA023BB2 0 477 JEQZ R0 NOSPACE jump if not more free space 478 * \ / 03B9E E4178801 0 6 BASE 479 ST R0 SP,NEWADTADR remember for later 03B9F 3840640B 1 480 LEA R1 CURADTFBI point to the new FBI 03BA0 E4085180 0 1 ZBM 481 ST R0 R1,FBIFLINK and fix up forward link 482 03BA1 DC003CF9 483 CALL PAGOUT force out the old ADT block 03BA2 41004400 484 PAR CURADTBUF address of page 03BA3 4000640B 485 PARL CURADTFBI address of FBI 03BA4 FEC00000 486 NOP 0 ignore any error here 487 03BA5 60440320 1 IMM 488 LD R1 ADTECNT*CPW number of chars. to do 03BA6 38804400 2 489 LEA R2 CURADTBUF point to the buffer 03BA7 FE580000 490 CFILL 0 zero it out 491 03BA8 3800640B 0 492 LEA R0 CURADTFBI point to the FBI 03BA9 EC081180 0 ZBM 493 STZ R0,FBIFLINK zero out the forward pointer 03BAA 60481181 1 0 ZBM 494 LD R1 R0,FBIDA get last address 03BAB E4481182 1 0 ZBM 495 ST R1 R0,FBIBLINK and fix up back link 03BAC 60578801 1 6 BASE 496 LD R1 SP,NEWADTADR get the new ms address 03BAD E4481181 1 0 ZBM 497 ST R1 R0,FBIDA and make it this blocks address 498 03BAE 60178801 0 6 BASE 499 LD R0 SP,NEWADTADR get the block number 03BAF 6040C7FB 1 500 LD R1 CURADTLST get the current list 03BB0 E4224010 0 1 501 ST R0 CURSECBUF(SECADTBTM)(R1) and fix up last pointer 03BB1 D0224018 1 502 INC CURSECBUF(SECADTCNT)(R1) and adjust the limits 00003BB2 503 NOSPACE LABEL 03BB2 5D1F8002 6 STAK 504 LEAVE POP 505 * --- 506 +CURADTBUF 00004400 F 23 484a 489a 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 166 (TRFREEMAN) F 23 disk free space manager +CURADTFBI 0000640B F 23 480a 485a 492a +CURADTLST 0000C7FB F 23 500 +CURSECBUF 00004000 F 23 501s 502s +GETADTADR UUUUUUUU F 23 476 +MAKNEWBLK 00003B9B F 23 469 475= NEWADTADR 00178801 F 23 472= 479s 496 499 NOSPACE 00003BB2 F 23 477j 503= +PAGOUT UUUUUUUU F 23 483 507 END of MAKNEWBLK 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 167 (TRFREEMAN) F 23 disk free space manager 509 510 ********************************************************************************** 511 * * 512 * GETADTADR * 513 * * 514 * This routine will get free blocks for the disk ADT * 515 * rewriter. * 516 * * 517 * Calling sequence: * 518 * CALLNP GETADTADR * 519 * R0 = zero, or ms block number * 520 * * 521 * Eats: R0. * 522 * * 523 ********************************************************************************** 524 525 BLOCK GETADTADR 526 ENTRY GETADTADR 527 528 BEGFRAME 529 ENDFRAME 530 03BB3 DD5F8001 6 STAK 531 GETADTADR ENTRNP PUSH 03BB4 6000C7F9 0 532 LD R0 LSTDSKADR get the last disk address 00003BB5 533 LOOKLOOP LABEL 03BB5 D0520000 0 REG 534 DEC R0 and find new one 03BB6 FA0A3BBA 0 535 JLEZ R0 NOSPACE jump if no more space 536 * \ / 03BB7 D1F03AD7 0 @ 537 SETT @BITPTR(R0) is it already used? 03BB8 FE023BB5 538 JEQ LOOKLOOP try next one 539 * \ / 03BB9 E400C7F9 0 540 ST R0 LSTDSKADR and make this the last one allocated 00003BBA 541 NOSPACE LABEL 03BBA 5D1F8001 6 STAK 542 LEAVE POP 543 * --- 544 +BITPTR 00003AD7 F 23 537s +GETADTADR 00003BB3 F 23 526 531= LOOKLOOP 00003BB5 F 23 533= 538j +LSTDSKADR 0000C7F9 F 23 532 540s NOSPACE 00003BBA F 23 535j 541= 545 END of GETADTADR +ADDRESSTMP 00006558 F 23 228s 230a +ARRAYW 0000C7FC F 23 195a +ARYCHRLEN 000061A8 F 23 194 +BITARRAY 0040C7FC F 23 17a BITPTR 00003AD7 F 23 17= 110s 127s 159s 207s 216s 218s 220s 223s 537s +BTXDSKADR 0000C7FA F 23 221 +CRTADTOUT 00003B3F F 23 13 255 265= +CURADTBUF 00004400 F 23 324s 333a 383a 426a 431a 484a 489a +CURADTFBI 0000640B F 23 334a 374a 377a 427a 434a 480a 485a 492a +CURADTLST 0000C7FB F 23 283s 287 325 442s 500 +CURSECBUF 00004000 F 23 272s 273s 274s 288 326s 443s 444s 445s 501s 502s +DSKBLKNUM 0000C7F8 F 23 107s 122s 124s 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 168 (TRFREEMAN) F 23 disk free space manager GETADTADR 00003BB3 F 23 269 310 438 476 526 531= +GETFREADR 00003AEA F 23 14 56 100 105= +GETFREBLK 00003AD8 F 23 11 41 49= INITBUFFS 00003B73 F 23 276 367 372= +LSTDSKADR 0000C7F9 F 23 267s 532 540s MAKNEWBLK 00003B9B F 23 303 469 475= MAKNEWLST 00003B88 F 23 292 419 424= +MAXDSKADR 0000C7F5 F 23 108 125 205 266 278 +MRKBLKS 00003B0B F 23 15 188 193= +MSBLKMASK 00003039 F 23 158 203 222 +PAGOUT UUUUUUUU F 23 317 332 425 483 +PUTFREBLK 00003B04 F 23 12 151 157= +TMPPAGBUF 00005800 F 23 200 318a 389a +TMPPAGFBI 00006442 F 23 314a 319a 392a 394a +VPREPOUT 000013F9 F 23 162 229 343 546 END disk free space manager 792 INPUT TRIDXMAN get the IDX manager routines 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 169 (TRIDXMAN) F 24 IDX manager 3 4 ********************************************************************************** 5 * * 6 * Routines to manipulate the IDX stucture. * 7 * * 8 ********************************************************************************** 9 10 BLOCK IDX manager 11 ENTRY ADDACT 12 13 ********************************************************************************** 14 * * 15 * ADDACT * 16 * * 17 * This routine will add an account into the IDX of the * 18 * volume being recovered. Note that if the hashed IDX bucket * 19 * is more than 80% full we will re-hash the structure, and * 20 * then add the new account. * 21 * * 22 * Call: * 23 * CALLNP ADDACT * 24 * JMP * 25 * JMP * 26 * JMP * 27 * * 28 * Eats: R0:R5. * 29 * * 30 ********************************************************************************** 31 32 BLOCK ADDACT 33 ENTRY ADDACT 34 35 BEGFRAME 00178801 6 BASE 36 IDXRELBLK BSS 1 holds hash value (IDX relative block) 37 ENDFRAME 38 03BBB DD5F8002 6 STAK 39 ADDACT ENTRNP PUSH 00003BBC 40 HASHACCT LABEL 41 IDXHASH R0,R1,CURACTBUF(UDACCT),CURACTBUF(UDPROJ),CURSECBUF(SECIDXSIZ) 03BBC 62004C00 01 41 LD2 R0 CURACTBUF(UDACCT) get the account name into R0 and R1 03BBD 744A1000 1 0 CBM 41 XOR R1 R0/BITS 8:7 mix up the account number 03BBE 60004C02 0 41 LD R0 CURACTBUF(UDPROJ) fetch up the project 03BBF 744A2000 1 0 CBM 41 XOR R1 R0/BITS 16:15 mix in the project shifted 03BC0 60040000 0 IMM 41 LD R0 0 initialize register for marth 03BC1 58C40010 IMM 41 IORPSR PSRMODIF say that we want the remainder 03BC2 14004028 0 41 DIV R0 CURSECBUF(SECIDXSIZ) divide by number of buckets 03BC3 58840010 IMM 41 CLBPSR PSRMODIF restore normalcy 42 03BC4 E4578801 1 6 BASE 43 ST R1 SP,IDXRELBLK save the hash value 03BC5 6062402C 1 1 44 LD R1 CURSECBUF(SECIDXPTR)(R1) get the pointer 03BC6 FA4C3BD3 1 45 JNEZ R1 HAVBLK jump if there is a block there 46 * \ / 03BC7 DC003AD8 47 CALL GETFREBLK get a free block 03BC8 41004800 48 PAR CURIDXBUF address of page 03BC9 41006416 49 PAR CURIDXFBI address of FBI 03BCA 40440008 IMM 50 PARVL FBITIDX type we want 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 170 (TRIDXMAN) F 24 IDX manager 03BCB FE0E3BEC 51 JMP OOSRTN jump if out of free space 03BCC 60446416 1 IMM 52 LD R1 ADR CURIDXFBI get FBI address 03BCD 60178801 0 6 BASE 53 LD R0 SP,IDXRELBLK get the hash value 03BCE E4085184 0 1 ZBM 54 ST R0 R1,FBIRELBLK set the relative block number 03BCF E4C06474 3 55 ST R3 CURIDXADR save ms address of current bucket 03BD0 E4E0402C 3 0 56 ST R3 CURSECBUF(SECIDXPTR)(R0) and into security block 03BD1 DC4031FE 57 CALLNP WRITESEC write the security blocks 03BD2 FE0E3BE8 58 JMP NOSPLIT go add the entry 59 * --- 60 00003BD3 61 HAVBLK LABEL 03BD3 64406474 1 62 CPR R1 CURIDXADR see if this block is already in 03BD4 FE023BDC 63 JEQ NOREAD if so don't waste another read 64 * \ / 65 03BD5 E4406474 1 66 ST R1 CURIDXADR remember for disk transfers 03BD6 DC003CE1 67 CALL PAGIN read in the hashed IDX bucket 03BD7 41004800 68 PAR CURIDXBUF address of page 03BD8 41006416 69 PAR CURIDXFBI address of FBI 03BD9 41440008 IMM 70 PARV FBITIDX FBI type we expect 03BDA 40406474 71 PARVL CURIDXADR ms address of bucket 03BDB FE0E3BEF 72 JMP BADDSK jump on error 73 * \ / 74 75 ********************************************************************************** 76 * * 77 * If the current IDX block is more than 80% full we check * 78 * to see if there is room to add a new IDX block. If so, we * 79 * go to SPLITIDX which adds one more block and re-distributes * 80 * all existing entries among the new blocks. If we are already * 81 * at the maximum number of blocks we look to see if there is * 82 * a reasonable margin before the absolute capacity is reached. * 83 * If so, we just make the new entry in this block. If not * 84 * (only 100 slots left in the whole table of 253 blocks) we * 85 * return a table full error. * 86 * * 87 ********************************************************************************** 88 00003BDC 89 NOREAD LABEL 03BDC 60044B2F 0 IMM 90 LD R0 ADR CURIDXBUF((IDXECNT*80/100)*IDXLNTH) point to 80% entry 03BDD 5C160803 0 BASE 91 CMZ R0,IDXDIRDA is there an entry here? 03BDE FE023BE8 92 JEQ NOSPLIT jump if no split 93 * \ / 03BDF 61404028 5 94 LD R5 CURSECBUF(SECIDXSIZ) current number of buckets 03BE0 654400FD 5 IMM 95 CPR R5 MAXIDXSIZE check how many buckets 03BE1 FE063BE5 96 JGE QUITEFULL jump if to max possible blocks 97 03BE2 DC403C08 98 CALLNP SPLITIDX break up the IDX 03BE3 FE0E3BEC 99 JMP OOSRTN jump if out of disk space 03BE4 FE0E3BBC 100 JMP HASHACCT go rehash the account 101 * --- 102 00003BE5 103 QUITEFULL LABEL 03BE5 6000402A 0 104 LD R0 CURSECBUF(SECIDXENTS) get number of accounts 03BE6 6404C938 0 IMM 105 CPR R0 IDXECNT*MAXIDXSIZE-100 see if near max capacity 03BE7 FE043BEE 106 JGT TABFUL if so, call it full 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 171 (TRIDXMAN) F 24 IDX manager 107 * \ / 108 * We now have a bucket to place the entry into. 00003BE8 109 NOSPLIT LABEL 03BE8 DC403BF0 110 CALLNP ADDBKT look in the hashed bucket and add it 03BE9 FE0E3BED 111 JMP DUPRTN give bad return 112 03BEA D000402A 113 INC CURSECBUF(SECIDXENTS) say one more account 03BEB 19C40001 7 IMM 114 ADD R7 1 return address is P+4 00003BEC 115 OOSRTN LABEL 03BEC 19C40001 7 IMM 116 ADD R7 1 return address is P+3 00003BED 117 DUPRTN LABEL 03BED 19C40001 7 IMM 118 ADD R7 1 return address is P+2 00003BEE 119 TABFUL LABEL 03BEE 5D1F8002 6 STAK 120 LEAVE POP 121 * --- 122 00003BEF 123 BADDSK LABEL 03BEF 00023103 124 HALT HALTB3103 error reading IDX block 125 * --- 126 +ADDACT 00003BBB F 24 33 39= +ADDBKT UUUUUUUU F 24 110 BADDSK 00003BEF F 24 72j 123= +CURACTBUF 00004C00 F 24 41 41 +CURIDXADR 00006474 F 24 55s 62 66s 71 +CURIDXBUF 00004800 F 24 48a 68a 90a +CURIDXFBI 00006416 F 24 49a 52a 69a +CURSECBUF 00004000 F 24 41 44 56s 94 104 113s DUPRTN 00003BED F 24 111j 117= +GETFREBLK 00003AD8 F 24 47 HASHACCT 00003BBC F 24 40= 100j HAVBLK 00003BD3 F 24 45j 61= IDXRELBLK 00178801 F 24 36= 43s 53 NOREAD 00003BDC F 24 63j 89= NOSPLIT 00003BE8 F 24 58j 92j 109= OOSRTN 00003BEC F 24 51j 99j 115= +PAGIN UUUUUUUU F 24 67 QUITEFULL 00003BE5 F 24 96j 103= +SPLITIDX UUUUUUUU F 24 98 TABFUL 00003BEE F 24 106j 119= +WRITESEC 000031FE F 24 57 127 END of ADDACT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 172 (TRIDXMAN) F 24 IDX manager 129 130 ********************************************************************************** 131 * * 132 * ADDBKT * 133 * * 134 * This routine will scan the current bucket searching * 135 * for the next available spot in the bucket and also checking * 136 * for a duplicate account. * 137 * * 138 * Call: * 139 * CALLNP ADDBKT * 140 * JMP * 141 * * 142 * Eats: R0:R3. * 143 * * 144 ********************************************************************************** 145 146 BLOCK ADDBKT 147 ENTRY ADDBKT 148 149 BEGFRAME 150 ENDFRAME 151 03BF0 DD5F8001 6 STAK 152 ADDBKT ENTRNP PUSH 03BF1 62004C00 01 153 LD2 R0 CURACTBUF(UDACCT) get the account name 03BF2 60804C02 2 154 LD R2 CURACTBUF(UDPROJ) get the project name 03BF3 60C44800 3 IMM 155 LD R3 ADR CURIDXBUF point to the start of the block 00003BF4 156 NXTENT LABEL 03BF4 6A16C800 013 BASE 157 UCPR2 R0 R3,IDXACNO same account? 03BF5 FE0C3BF8 158 JNE CHKFORSPT jump if not 03BF6 6896C802 2 3 BASE 159 UCPR R2 R3,IDXACNOP same project? 03BF7 FE023C06 160 JEQ DUPACT jump if it is 161 * \ / 162 00003BF8 163 CHKFORSPT LABEL 03BF8 5C16C803 3 BASE 164 CMZ R3,IDXDIRDA is there an opening here? 03BF9 FE023BFC 165 JEQ FNDSPT jump if so 166 * \ / 167 03BFA 18C40005 3 IMM 168 ADD R3 IDXLNTH point to the next IDX entry 169 * overflow not possible, 80% check done 03BFB FE0E3BF4 170 JMP NXTENT and look at next entry 171 * --- 172 173 * We found a spot, make an entry and force it out. 00003BFC 174 FNDSPT LABEL 03BFC E616C800 013 BASE 175 ST2 R0 R3,IDXACNO put the account name in 03BFD E496C802 2 3 BASE 176 ST R2 R3,IDXACNOP and the project 03BFE 6000647E 0 177 LD R0 CURACTADR get ms address of DIR 03BFF E416C803 0 3 BASE 178 ST R0 R3,IDXDIRDA and finish off entry 03C00 EC16C804 3 BASE 179 STZ R3,IDXDIRDA2 no secondaries for now 180 03C01 DC003CF9 181 CALL PAGOUT force out the IDX block 03C02 41004800 182 PAR CURIDXBUF address of page 03C03 40006416 183 PARL CURIDXFBI address of FBI 03C04 FE0E3C07 184 JMP BADDSK jump on error 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 173 (TRIDXMAN) F 24 IDX manager 185 03C05 19C40001 7 IMM 186 ADD R7 1 return address will be P+2 00003C06 187 DUPACT LABEL 03C06 5D1F8001 6 STAK 188 LEAVE POP 189 * --- 190 00003C07 191 BADDSK LABEL 03C07 00023104 192 HALT HALTB3104 error writing IDX block 193 * --- 194 +ADDBKT 00003BF0 F 24 147 152= BADDSK 00003C07 F 24 184j 191= CHKFORSPT 00003BF8 F 24 158j 163= +CURACTADR 0000647E F 24 177 +CURACTBUF 00004C00 F 24 153 154 +CURIDXBUF 00004800 F 24 155a 182a +CURIDXFBI 00006416 F 24 183a DUPACT 00003C06 F 24 160j 187= FNDSPT 00003BFC F 24 165j 174= NXTENT 00003BF4 F 24 156= 170j +PAGOUT UUUUUUUU F 24 181 195 END of ADDBKT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 174 (TRIDXMAN) F 24 IDX manager 197 198 ********************************************************************************** 199 * * 200 * SPLITIDX * 201 * * 202 * When one of the IDX buckets is 80% full we will come * 203 * here to allocate a new table that is one block larger and * 204 * rehash the whole thing. * 205 * Assumptions: All IDX blocks have been forced to disk * 206 * when we get here. * 207 * Call: * 208 * CALLNP SPLITIDX * 209 * JMP * 210 * * 211 * Eats: R0:R5. * 212 * * 213 ********************************************************************************** 214 215 BLOCK SPLITIDX 216 ENTRY SPLITIDX 217 218 BEGFRAME 00178801 6 BASE 219 TMPBKTNUM BSS 1 place to store the current bucket number 00178802 6 BASE 220 OLDBKTCNT BSS 1 count of buckets in original IDX 221 ENDFRAME 222 03C08 DD5F8003 6 STAK 223 SPLITIDX ENTRNP PUSH 03C09 61404028 5 224 LD R5 CURSECBUF(SECIDXSIZ) current number of buckets 03C0A E5578802 5 6 BASE 225 ST R5 SP,OLDBKTCNT save old bucket count 226 * We will use TMPPAGBUF2 to hold the pointers for the old IDX. 03C0B 6004402C 0 IMM 227 LD R0 ADR CURSECBUF(SECIDXPTR) source of move 03C0C 604403F4 1 IMM 228 LD R1 MAXIDXSIZE*CPW number of chars. to move 03C0D 60845C00 2 IMM 229 LD R2 ADR TMPPAGBUF2 address for dest of move 03C0E FE400000 230 CMOVE move 'em out 231 * \ / 03C0F 604403F4 1 IMM 232 LD R1 MAXIDXSIZE*CPW number of chars. to do 03C10 6084402C 2 IMM 233 LD R2 ADR CURSECBUF(SECIDXPTR) place to start filling 03C11 FE580000 234 CFILL 00 zero out existing pointers 235 03C12 D0004028 236 INC CURSECBUF(SECIDXSIZ) indicate one more block 237 * \ / 238 * Rehash all the old into the new. 239 03C13 EC006475 240 STZ TMPIDXADR indicate no block present now 03C14 EC178801 6 BASE 241 STZ SP,TMPBKTNUM start with bucket zero 03C15 60178801 0 6 BASE 242 LD R0 SP,TMPBKTNUM ensure DOABKT call set up 00003C16 243 LOOP LABEL 03C16 DC403C24 244 CALLNP DOABKT re-hash the bucket 03C17 FE0E3C23 245 JMP OOSRTN out of disk space 03C18 BC178801 0 6 BASE 246 INCL R0 SP,TMPBKTNUM adjust for next one 03C19 64178802 0 6 BASE 247 CPR R0 SP,OLDBKTCNT we done all of them? 03C1A FE083C16 248 JLT LOOP jump if more to do 249 * \ / 250 251 ********************************************************************************** 252 * * 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 175 (TRIDXMAN) F 24 IDX manager 253 * We have just created a new IDX structure. Force out the * 254 * new security blocks (with new pointers) then free the old * 255 * IDX blocks. * 256 * * 257 ********************************************************************************** 258 03C1B DC4031FE 259 CALLNP WRITESEC write out the security blocks 03C1C 61578802 5 6 BASE 260 LD R5 SP,OLDBKTCNT get old bucket count 03C1D FE0E3C21 261 JMP LOOPEND enter loop at test and count 262 * --- 263 00003C1E 264 FRELOP LABEL 03C1E 602A5C00 0 5 265 LD R0 TMPPAGBUF2(R5) get old pointer 03C1F FA023C21 0 266 JEQZ R0 LOOPEND in case block not allocated 03C20 DC403B04 267 CALLNP PUTFREBLK return to free list 00003C21 268 LOOPEND LABEL 03C21 FB663C1E 5 269 JDR R5 FRELOP if more, jump 270 * \ / 271 03C22 19C40001 7 IMM 272 ADD R7 1 return to P+2 00003C23 273 OOSRTN LABEL 03C23 5D1F8003 6 STAK 274 LEAVE POP 275 * --- 276 +CURSECBUF 00004000 F 24 224 227a 233a 236s +DOABKT UUUUUUUU F 24 244 FRELOP 00003C1E F 24 264= 269j LOOP 00003C16 F 24 243= 248j LOOPEND 00003C21 F 24 261j 266j 268= OLDBKTCNT 00178802 F 24 220= 225s 247 260 OOSRTN 00003C23 F 24 245j 273= +PUTFREBLK 00003B04 F 24 267 +SPLITIDX 00003C08 F 24 216 223= TMPBKTNUM 00178801 F 24 219= 241s 242 246s +TMPIDXADR 00006475 F 24 240s +TMPPAGBUF2 00005C00 F 24 229a 265 +WRITESEC 000031FE F 24 259 277 END of SPLITIDX 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 176 (TRIDXMAN) F 24 IDX manager 279 280 ********************************************************************************** 281 * * 282 * DOABKT * 283 * * 284 * This routine will take a bucket from the old structure * 285 * and rehash all of its accounts into the new structure. * 286 * Call: * 287 * R0 = bucket index * 288 * CALLNP DOABKT * 289 * * 290 * * 291 * Eats: R0:R4. * 292 * * 293 ********************************************************************************** 294 295 BLOCK DOABKT 296 ENTRY DOABKT 297 298 BEGFRAME 00178801 6 BASE 299 TMPBKTNDX BSS 1 place to store index into old bucket 300 ENDFRAME 301 03C24 DD5F8002 6 STAK 302 DOABKT ENTRNP PUSH 303 * R0 = current bucket number 03C25 60605C00 1 0 304 LD R1 TMPPAGBUF2(R0) get pointer to bucket 03C26 64406475 1 305 CPR R1 TMPIDXADR is the IDX block already resident? 03C27 FE023C2F 306 JEQ NOREAD if so then save some time 307 * \ / 308 03C28 E4406475 1 309 ST R1 TMPIDXADR save the current in house IDX block 03C29 DC003CE1 310 CALL PAGIN read in the current bucket 03C2A 41005800 311 PAR TMPPAGBUF address of page 03C2B 41006442 312 PAR TMPPAGFBI address of FBI 03C2C 41440008 IMM 313 PARV FBITIDX type we expect 03C2D 40406475 314 PARVL TMPIDXADR ms address 03C2E FE0E3C3B 315 JMP BADDSK jump on disk error 316 00003C2F 317 NOREAD LABEL 03C2F 61045800 4 IMM 318 LD R4 ADR TMPPAGBUF point to beginning of bucket 03C30 E5178801 4 6 BASE 319 ST R4 SP,TMPBKTNDX remember for later 00003C31 320 ETYLOOP LABEL 03C31 5C170803 4 BASE 321 CMZ R4,IDXDIRDA is there an account here? 03C32 FE023C39 322 JEQ RETURN if not, all done with this bucket 323 * \ / 03C33 DC403C3C 324 CALLNP DOAACT rehash account into new structure 03C34 FE0E3C3A 325 JMP OOSRTN out of space 326 03C35 61040005 4 IMM 327 LD R4 IDXLNTH length of entries 03C36 B9178801 4 6 BASE 328 ADDB R4 SP,TMPBKTNDX move to next one 03C37 65045BFC 4 IMM 329 CPR R4 ADR TMPPAGBUF(IDXECNT*IDXLNTH) check for past end 03C38 FE083C31 330 JLT ETYLOOP look for next account, or end 331 * \ / 332 00003C39 333 RETURN LABEL 03C39 19C40001 7 IMM 334 ADD R7 1 advance to good return 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 177 (TRIDXMAN) F 24 IDX manager 00003C3A 335 OOSRTN LABEL 03C3A 5D1F8002 6 STAK 336 LEAVE POP 337 * --- 338 00003C3B 339 BADDSK LABEL 03C3B 00023106 340 HALT HALTB3106 error reading an IDX block 341 * --- 342 BADDSK 00003C3B F 24 315j 339= +DOAACT UUUUUUUU F 24 324 +DOABKT 00003C24 F 24 296 302= ETYLOOP 00003C31 F 24 320= 330j NOREAD 00003C2F F 24 306j 317= OOSRTN 00003C3A F 24 325j 335= +PAGIN UUUUUUUU F 24 310 RETURN 00003C39 F 24 322j 333= TMPBKTNDX 00178801 F 24 299= 319s 328s +TMPIDXADR 00006475 F 24 305 309s 314 +TMPPAGBUF 00005800 F 24 311a 318a 329a +TMPPAGBUF2 00005C00 F 24 304 +TMPPAGFBI 00006442 F 24 312a 343 END DOABKT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 178 (TRIDXMAN) F 24 IDX manager 345 346 ********************************************************************************** 347 * * 348 * DOAACT * 349 * * 350 * This routine will re-hash one account from the old * 351 * structure, and put it into the new structure. * 352 * * 353 * Call: * 354 * R4 -> old entry * 355 * CALLNP DOAACT * 356 * * 357 * * 358 * Eats: R0:R4. * 359 * * 360 ********************************************************************************** 361 362 BLOCK DOAACT 363 ENTRY DOAACT 364 365 BEGFRAME 00178801 6 BASE 366 OLDENTPTR BSS 1 pointer to entry in old structure 00178802 6 BASE 367 IDXRELBLK BSS 1 number of bucket being read 368 ENDFRAME 369 03C3C DD5F8003 6 STAK 370 DOAACT ENTRNP PUSH 03C3D E5178801 4 6 BASE 371 ST R4 SP,OLDENTPTR remember pointer to old entry 372 373 IDXHASH R0,R1,(R4,IDXACNO),(R4,IDXACNOP),(CURSECBUF(SECIDXSIZ)) 03C3E 62170800 014 BASE 373 LD2 R0 (R4,IDXACNO) get the account name into R0 and R1 03C3F 744A1000 1 0 CBM 373 XOR R1 R0/BITS 8:7 mix up the account number 03C40 60170802 0 4 BASE 373 LD R0 (R4,IDXACNOP) fetch up the project 03C41 744A2000 1 0 CBM 373 XOR R1 R0/BITS 16:15 mix in the project shifted 03C42 60040000 0 IMM 373 LD R0 0 initialize register for marth 03C43 58C40010 IMM 373 IORPSR PSRMODIF say that we want the remainder 03C44 14004028 0 373 DIV R0 (CURSECBUF(SECIDXSIZ)) divide by number of buckets 03C45 58840010 IMM 373 CLBPSR PSRMODIF restore normalcy 374 00003C46 375 READBKT LABEL 03C46 E4578802 1 6 BASE 376 ST R1 SP,IDXRELBLK save the hash value 03C47 60E2402C 3 1 377 LD R3 CURSECBUF(SECIDXPTR)(R1) get the pointer 03C48 FACC3C54 3 378 JNEZ R3 HAVBLK jump if there is a block there 379 * \ / 03C49 DC003AD8 380 CALL GETFREBLK get a free block 03C4A 41004800 381 PAR CURIDXBUF address of page 03C4B 41006416 382 PAR CURIDXFBI address of FBI 03C4C 40440008 IMM 383 PARVL FBITIDX type we want 03C4D FE0E3C74 384 JMP OOSRTN jump if out of free space 03C4E 60446416 1 IMM 385 LD R1 ADR CURIDXFBI get FBI address 03C4F 60178802 0 6 BASE 386 LD R0 SP,IDXRELBLK get the hash value 03C50 E4085184 0 1 ZBM 387 ST R0 R1,FBIRELBLK set the relative block number 03C51 E4C06474 3 388 ST R3 CURIDXADR save ms address of current bucket 03C52 E4E0402C 3 0 389 ST R3 CURSECBUF(SECIDXPTR)(R0) and into security block 03C53 FE0E3C5B 390 JMP CREATEDBKT skip reading new block 391 * --- 392 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 179 (TRIDXMAN) F 24 IDX manager 00003C54 393 HAVBLK LABEL 03C54 E4C06474 3 394 ST R3 CURIDXADR save ms address of current bucket 03C55 DC003CE1 395 CALL PAGIN read in the page 03C56 41004800 396 PAR CURIDXBUF address of buffer 03C57 41006416 397 PAR CURIDXFBI address of FBI 03C58 41440008 IMM 398 PARV FBITIDX type we expect 03C59 40406474 399 PARVL CURIDXADR ms address 03C5A FE0E3C75 400 JMP BADDSK jump on disk error 401 * \ / 00003C5B 402 CREATEDBKT LABEL 03C5B 38C04800 3 403 LEA R3 CURIDXBUF point to start of IDX block 00003C5C 404 NEWLOOP LABEL 03C5C 5C16C803 3 BASE 405 CMZ R3,IDXDIRDA is there an account here? 03C5D FE023C66 406 JEQ FNDSPOT jump if not 407 * \ / 03C5E 18C40005 3 IMM 408 ADD R3 IDXLNTH point to next entry 03C5F 64C44BFC 3 IMM 409 CPR R3 ADR CURIDXBUF(IDXECNT*IDXLNTH) check last entry spot 03C60 FE083C5C 410 JLT NEWLOOP try for next one 411 * \ / 412 413 * If the current bucket is full then try putting the 414 * entry in the next bucket. 415 416 * \ / 03C61 BC578802 1 6 BASE 417 INCL R1 SP,IDXRELBLK get the number of the last bucket 03C62 64404028 1 418 CPR R1 CURSECBUF(SECIDXSIZ) beyond the number of buckets? 03C63 FE083C46 419 JLT READBKT use it if not 03C64 60440000 1 IMM 420 LD R1 0 else wrap around 03C65 FE0E3C46 421 JMP READBKT go read this bucket 422 * --- 423 424 * We found a spot in the new structure, add the account. 00003C66 425 FNDSPOT LABEL 03C66 60978801 2 6 BASE 426 LD R2 SP,OLDENTPTR get pointer to old account 03C67 62168800 012 BASE 427 LD2 R0 R2,IDXACNO get name 03C68 E616C800 013 BASE 428 ST2 R0 R3,IDXACNO and put in new 03C69 60168802 0 2 BASE 429 LD R0 R2,IDXACNOP get project 03C6A E416C802 0 3 BASE 430 ST R0 R3,IDXACNOP and put in new 03C6B 60168803 0 2 BASE 431 LD R0 R2,IDXDIRDA address 03C6C E416C803 0 3 BASE 432 ST R0 R3,IDXDIRDA and put in new 03C6D 60168804 0 2 BASE 433 LD R0 R2,IDXDIRDA2 address 03C6E E416C804 0 3 BASE 434 ST R0 R3,IDXDIRDA2 and put in new 435 03C6F DC003CF9 436 CALL PAGOUT force out new table 03C70 41004800 437 PAR CURIDXBUF address of page 03C71 40006416 438 PARL CURIDXFBI address of FBI 03C72 FE0E3C75 439 JMP BADDSK jump on disk error 440 03C73 19C40001 7 IMM 441 ADD R7 1 advance to skip return 00003C74 442 OOSRTN LABEL 03C74 5D1F8003 6 STAK 443 LEAVE POP 444 * --- 445 00003C75 446 BADDSK LABEL 03C75 00023107 447 HALT HALTB3107 disk error on IDX block 448 * --- 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 180 (TRIDXMAN) F 24 IDX manager 449 BADDSK 00003C75 F 24 400j 439j 446= CREATEDBKT 00003C5B F 24 390j 402= +CURIDXADR 00006474 F 24 388s 394s 399 +CURIDXBUF 00004800 F 24 381a 396a 403a 409a 437a +CURIDXFBI 00006416 F 24 382a 385a 397a 438a +CURSECBUF 00004000 F 24 373 377 389s 418 +DOAACT 00003C3C F 24 363 370= FNDSPOT 00003C66 F 24 406j 425= +GETFREBLK 00003AD8 F 24 380 HAVBLK 00003C54 F 24 378j 393= IDXRELBLK 00178802 F 24 367= 376s 386 417s NEWLOOP 00003C5C F 24 404= 410j OLDENTPTR 00178801 F 24 366= 371s 426 OOSRTN 00003C74 F 24 384j 442= +PAGIN UUUUUUUU F 24 395 +PAGOUT UUUUUUUU F 24 436 READBKT 00003C46 F 24 375= 419j 421j 450 END of DOAACT 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 181 (TRIDXMAN) F 24 IDX manager 452 453 ********************************************************************************** 454 * * 455 * SETUPACT * 456 * * 457 * This routine will find an account in the IDX, and get * 458 * the UDIR block into memory. * 459 * * 460 * Call: * 461 * R2,R3 = account name * 462 * R4 = account project * 463 * CALLNP SETUPACT * 464 * * 465 * Eats: R0:R4. * 466 * * 467 ********************************************************************************** 468 469 BLOCK SETUPACT 470 ENTRY SETUPACT 471 472 BEGFRAME 00178801 6 BASE 473 TMPACT BSS2 1 temp to hold account name 00178803 6 BASE 474 TMPPRJ BSS 1 temp to hold project 00178804 6 BASE 475 IDXRELBLK BSS 1 bucket number 476 ENDFRAME 477 03C76 DD5F8005 6 STAK 478 SETUPACT ENTRNP PUSH 03C77 E6978801 236 BASE 479 ST2 R2 SP,TMPACT remember name for later 03C78 E5178803 4 6 BASE 480 ST R4 SP,TMPPRJ and also the project 481 482 IDXHASH R0,R1,PAIR R2,R4,CURSECBUF(SECIDXSIZ) 03C79 62148000 0123 PAIR 482 LD2 R0 PAIR R2 get the account name into R0 and R1 03C7A 744A1000 1 0 CBM 482 XOR R1 R0/BITS 8:7 mix up the account number 03C7B 60130000 0 4 REG 482 LD R0 R4 fetch up the project 03C7C 744A2000 1 0 CBM 482 XOR R1 R0/BITS 16:15 mix in the project shifted 03C7D 60040000 0 IMM 482 LD R0 0 initialize register for marth 03C7E 58C40010 IMM 482 IORPSR PSRMODIF say that we want the remainder 03C7F 14004028 0 482 DIV R0 CURSECBUF(SECIDXSIZ) divide by number of buckets 03C80 58840010 IMM 482 CLBPSR PSRMODIF restore normalcy 483 00003C81 484 TRYNEXT LABEL 03C81 E4578804 1 6 BASE 485 ST R1 SP,IDXRELBLK save the bucket number 03C82 6062402C 1 1 486 LD R1 CURSECBUF(SECIDXPTR)(R1) get pointer to IDX bucket 03C83 FA423CA9 1 487 JEQZ R1 NOSUCHACCT no such account jumps 03C84 64406474 1 488 CPR R1 CURIDXADR is this IDX already in? 03C85 FE023C8D 489 JEQ NOREAD if so skip the read 490 * \ / 491 03C86 E4406474 1 492 ST R1 CURIDXADR save the current IDX block number 03C87 DC003CE1 493 CALL PAGIN get the dir from the disk 03C88 41004800 494 PAR CURIDXBUF place for the page 03C89 41006416 495 PAR CURIDXFBI place for the FBI 03C8A 41440008 IMM 496 PARV FBITIDX type we expect 03C8B 40406474 497 PARVL CURIDXADR ms address 03C8C FE0E3CA7 498 JMP BADDSK jump on disk error 499 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 182 (TRIDXMAN) F 24 IDX manager 00003C8D 500 NOREAD LABEL 03C8D 62178801 016 BASE 501 LD2 R0 SP,TMPACT get the account 03C8E 60978803 2 6 BASE 502 LD R2 SP,TMPPRJ and the project 03C8F 38C04800 3 503 LEA R3 CURIDXBUF point to beginning of bucket 00003C90 504 LOOKLOOP LABEL 03C90 5E16C800 3 BASE 505 CMZ2 R3,IDXACNO is there an entry here? 03C91 FE0C3C94 506 JNE LLNTRFND jump if sure 03C92 5C16C802 3 BASE 507 CMZ R3,IDXACNOP null name, check project 03C93 FE023CA9 508 JEQ NOSUCHACCT jump if entry not found 00003C94 509 LLNTRFND LABEL 03C94 6A16C800 013 BASE 510 UCPR2 R0 R3,IDXACNO do the accounts match? 03C95 FE0C3C98 511 JNE NEXT jump if not 03C96 6896C802 2 3 BASE 512 UCPR R2 R3,IDXACNOP do the projects match? 03C97 FE023CA0 513 JEQ FOUND jump if they do 00003C98 514 NEXT LABEL 03C98 18C40005 3 IMM 515 ADD R3 IDXLNTH advance to next entry 03C99 64C44BFC 3 IMM 516 CPR R3 ADR CURIDXBUF(IDXECNT*IDXLNTH) are we to end of bucket? 03C9A FE083C90 517 JLT LOOKLOOP check next entry if not done 518 * \ / 519 * End of bucket with more entries to scan 03C9B BC578804 1 6 BASE 520 INCL R1 SP,IDXRELBLK move the bucket number up 03C9C 64404028 1 521 CPR R1 CURSECBUF(SECIDXSIZ) see if beyond the end 03C9D FE083C81 522 JLT TRYNEXT use this one if not 03C9E 60440000 1 IMM 523 LD R1 0 else wrap around 03C9F FE0E3C81 524 JMP TRYNEXT and look at the next one 525 * --- 526 00003CA0 527 FOUND LABEL 03CA0 DC003CE1 528 CALL PAGIN get the UDIR from disk 03CA1 41004C00 529 PAR CURACTBUF place to put the page 03CA2 41006421 530 PAR CURACTFBI and the FBI 03CA3 41440009 IMM 531 PARV FBITUDIR1 type we expect 03CA4 4056C803 3 BASE 532 PARVL R3,IDXDIRDA ms address 03CA5 FE0E3CA8 533 JMP DISKERROR jump on disk error 534 03CA6 5D1F8005 6 STAK 535 LEAVE POP 536 * --- 537 00003CA7 538 BADDSK LABEL 03CA7 00023108 539 HALT HALTB3108 disk error on IDX block 540 * --- 541 00003CA8 542 DISKERROR LABEL 03CA8 00023110 543 HALT HALTB3110 disk error on UDIR block 544 * --- 545 00003CA9 546 NOSUCHACCT LABEL 03CA9 00023111 547 HALT HALTB3111 account not present for latecomer 548 * --- 549 BADDSK 00003CA7 F 24 498j 538= +CURACTBUF 00004C00 F 24 529a +CURACTFBI 00006421 F 24 530a +CURIDXADR 00006474 F 24 488 492s 497 +CURIDXBUF 00004800 F 24 494a 503a 516a +CURIDXFBI 00006416 F 24 495a 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 183 (TRIDXMAN) F 24 IDX manager +CURSECBUF 00004000 F 24 482 486 521 DISKERROR 00003CA8 F 24 533j 542= FOUND 00003CA0 F 24 513j 527= IDXRELBLK 00178804 F 24 475= 485s 520s LLNTRFND 00003C94 F 24 506j 509= LOOKLOOP 00003C90 F 24 504= 517j NEXT 00003C98 F 24 511j 514= NOREAD 00003C8D F 24 489j 500= NOSUCHACCT 00003CA9 F 24 487j 508j 546= +PAGIN UUUUUUUU F 24 493 528 +SETUPACT 00003C76 F 24 470 478= TMPACT 00178801 F 24 473= 479s 501 TMPPRJ 00178803 F 24 474= 480s 502 TRYNEXT 00003C81 F 24 484= 522j 524j 550 END of SETUPACT +ADDACT 00003BBB F 24 11 33 39= ADDBKT 00003BF0 F 24 110 147 152= +CURACTADR 0000647E F 24 177 +CURACTBUF 00004C00 F 24 41 41 153 154 529a +CURACTFBI 00006421 F 24 530a +CURIDXADR 00006474 F 24 55s 62 66s 71 388s 394s 399 488 492s 497 +CURIDXBUF 00004800 F 24 48a 68a 90a 155a 182a 381a 396a 403a 409a 437a 494a 503a 516a +CURIDXFBI 00006416 F 24 49a 52a 69a 183a 382a 385a 397a 438a 495a +CURSECBUF 00004000 F 24 41 44 56s 94 104 113s 224 227a 233a 236s 373 377 389s 418 482 486 521 DOAACT 00003C3C F 24 324 363 370= DOABKT 00003C24 F 24 244 296 302= +GETFREBLK 00003AD8 F 24 47 380 +PAGIN UUUUUUUU F 24 67 310 395 493 528 +PAGOUT UUUUUUUU F 24 181 436 +PUTFREBLK 00003B04 F 24 267 +SETUPACT 00003C76 F 24 470 478= SPLITIDX 00003C08 F 24 98 216 223= +TMPIDXADR 00006475 F 24 240s 305 309s 314 +TMPPAGBUF 00005800 F 24 311a 318a 329a +TMPPAGBUF2 00005C00 F 24 229a 265 304 +TMPPAGFBI 00006442 F 24 312a +WRITESEC 000031FE F 24 57 259 551 END of IDX manager 793 INPUT TRGENSUB include the general subroutines 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 184 (TRGENSUB) F 25 General subroutines 3 4 ********************************************************************************** 5 * * 6 * ADDBZYLST * 7 * * 8 * This routine will add a file to the list of busy * 9 * files. The file name is found in the tape string. * 10 * Calling sequence: * 11 * CALLNP ADDBZYLST * 12 * JMP * 13 * * 14 * Eats: R0-R5. * 15 * * 16 ********************************************************************************** 17 18 BLOCK ADDBZYLST 19 ENTRY ADDBZYLST 20 21 BEGFRAME 22 ENDFRAME 23 03CAA DD5F8001 6 STAK 24 ADDBZYLST ENTRNP PUSH 03CAB 6000303B 0 25 LD R0 TAPSTRPTR point to the beginning of the string 03CAC 6044000D 1 IMM 26 LD R1 13 length of the string 03CAD 6084003A 2 IMM 27 LD R2 ":" char. to search for 03CAE FE560000 28 CSRCH move past the volume name 03CAF FE0C3CC2 29 JNE BADREC jump if not found 30 * \ / 03CB0 61120000 4 0 REG 31 LD R4 R0 copy the pointer 03CB1 D0930000 4 REG 32 INCP R4 point to start of account name 03CB2 EC12C000 3 REG 33 STZ R3 say no default extension 03CB3 3940653B 5 34 LEA R5 BZFPROT and point to the result block 03CB4 DC5013F6 @ 35 CALLNP @VFETCHFNM pack up the file name 03CB5 FA083CC2 0 36 JLTZ R0 BADREC jump on any error 37 * \ / 03CB6 6000E066 0 38 LD R0 BZYLSTPTR get pointer to end 03CB7 62406540 12 39 LD2 R1 BZFACT get the account name 03CB8 E6560800 120 BASE 40 ST2 R1 R0,BZYLSTACT and put in element 03CB9 60406542 1 41 LD R1 BZFPRJ get the project 03CBA E4560802 1 0 BASE 42 ST R1 R0,BZYLSTPRJ and put in element 03CBB 62406545 12 43 LD2 R1 BZFFIL get the file name 03CBC E6560803 120 BASE 44 ST2 R1 R0,BZYLSTFIL and put in element 03CBD 60406547 1 45 LD R1 BZFEXT get the extension 03CBE E4560805 1 0 BASE 46 ST R1 R0,BZYLSTEXT and put in element 47 03CBF 18040006 0 IMM 48 ADD R0 BZYLSTLEN point to next element 03CC0 E400E066 0 49 ST R0 BZYLSTPTR and make it next one 50 03CC1 19C40001 7 IMM 51 ADD R7 1 advance to normal return 00003CC2 52 BADREC LABEL 03CC2 5D1F8001 6 STAK 53 LEAVE POP 54 * --- 55 +ADDBZYLST 00003CAA F 25 19 24= BADREC 00003CC2 F 25 29j 36j 52= +BZFACT 00006540 F 25 39 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 185 (TRGENSUB) F 25 General subroutines +BZFEXT 00006547 F 25 45 +BZFFIL 00006545 F 25 43 +BZFPRJ 00006542 F 25 41 +BZFPROT 0000653B F 25 34a +BZYLSTACT 00160800 F 25 40s +BZYLSTEXT 00160805 F 25 46s +BZYLSTFIL 00160803 F 25 44s +BZYLSTLEN 00000006 F 25 48 +BZYLSTPRJ 00160802 F 25 42s +BZYLSTPTR 0000E066 F 25 38 49s +TAPSTRPTR 0000303B F 25 25 +VFETCHFNM 000013F6 F 25 35 56 END of ADDBZYLST 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 186 (TRGENSUB) F 25 General subroutines 58 59 ********************************************************************************** 60 * * 61 * PRTBZYFLS * 62 * * 63 * At the end of the recovery process this routine is * 64 * called and will tell the user about all the files that * 65 * haven't been recovered. * 66 * Calling sequence: * 67 * CALLNP PRTBZYFLS * 68 * * 69 * Eats: R0,R1,R5 * 70 * * 71 ********************************************************************************** 72 73 BLOCK PRTBZYFLS 74 ENTRY PRTBZYFLS 75 76 BEGFRAME 77 ENDFRAME 78 03CC3 DD5F8001 6 STAK 79 PRTBZYFLS ENTRNP PUSH 03CC4 6140E066 5 80 LD R5 BZYLSTPTR get the end of list pointer 00003CC5 81 NXTONE LABEL 03CC5 11440006 5 IMM 82 SUB R5 BZYLSTLEN move to last valid element 03CC6 6544E067 5 IMM 83 CPR R5 ADR BZYLSTPROT have we done all of the elements? 03CC7 FE083CE0 84 JLT ALLDONE jump if so 85 * \ / 03CC8 60174800 0 5 BASE 86 LD R0 R5,BZYLSTACT get the account name 03CC9 FA2C3CC5 0 87 JEQMW R0 NXTONE jump if this one recovered 88 * \ / 03CCA DC1013F9 @ 89 CALL @VPREPOUT tell the guy about this file 03CCB 41174800 5 BASE 90 PAR R5,BZYLSTACT pass account name 03CCC 41174802 5 BASE 91 PAR R5,BZYLSTPRJ and project 03CCD 41174803 5 BASE 92 PAR R5,BZYLSTFIL pass file name 03CCE 41174805 5 BASE 93 PAR R5,BZYLSTEXT and extension 03CCF 40003CD1 94 PARL BZYFILMSG 03CD0 FE0E3CC5 95 JMP NXTONE 96 * --- 97 03CD1 2046696C 98 BZYFILMSG TEXTZ " File \S1\.\R2\:\S3\.\R4\ was busy, and wasn't backed up." 99 00003CE0 100 ALLDONE LABEL 03CE0 5D1F8001 6 STAK 101 LEAVE POP 102 * --- 103 ALLDONE 00003CE0 F 25 84j 100= BZYFILMSG 00003CD1 F 25 94a 98= +BZYLSTACT 00160800 F 25 86 90a +BZYLSTEXT 00160805 F 25 93a +BZYLSTFIL 00160803 F 25 92a +BZYLSTLEN 00000006 F 25 82 +BZYLSTPRJ 00160802 F 25 91a +BZYLSTPROT 0000E067 F 25 83a +BZYLSTPTR 0000E066 F 25 80 NXTONE 00003CC5 F 25 81= 87j 95j 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 187 (TRGENSUB) F 25 General subroutines +PRTBZYFLS 00003CC3 F 25 74 79= +VPREPOUT 000013F9 F 25 89 104 END of PRTBZYFLS 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 188 (TRGENSUB) F 25 General subroutines 106 107 ********************************************************************************** 108 * * 109 * PAGIN * 110 * * 111 * Routine to read in the specified page. * 112 * * 113 * Calling sequence: * 114 * CALL PAGIN * 115 * PAR address of page * 116 * PAR address of FBI * 117 * PARV FBI type (0 if no type checking) * 118 * PARVL disk address * 119 * JMP error * 120 * * 121 * Eats: R0-R3 * 122 * * 123 ********************************************************************************** 124 125 BLOCK PAGIN 126 ENTRY PAGIN 127 128 BEGFRAME 00178801 6 BASE 129 TMPR4 BSS 1 temp. for R4 130 ENDFRAME 131 03CE1 DD1F8002 6 STAK 132 PAGIN ENTR PUSH 03CE2 C1006477 133 STP CURPAGADR pass address page 03CE3 C1006478 134 STP CURFBIADR pass address of FBI 03CE4 C1406479 135 STPV CURFBITYP pass type 03CE5 C0406476 136 STPVL CURDSKADR pass disk address 137 03CE6 60006476 0 138 LD R0 CURDSKADR get the address 03CE7 78003039 0 139 AND R0 MSBLKMASK chop address down to size 03CE8 E4006476 0 140 ST R0 CURDSKADR and then replace it 141 03CE9 60C06477 3 142 LD R3 CURPAGADR get the virtual address 03CEA 60CADE70 3 3 CBM 143 LD R3 R3/FLDPAGE get the page number in address 03CEB 18C40080 3 IMM 144 ADD R3 MONPF make it in the monitor 03CEC 8092C000 3 REG 145 PFRD R3 get page file for the page 03CED E4C06477 3 146 ST R3 CURPAGADR and put the page file in it's place 147 03CEE E5178801 4 6 BASE 148 ST R4 SP,TMPR4 remember R4 03CEF 6104C7F0 4 IMM 149 LD R4 ADR DSKCTLBLK point to our control block 03CF0 DC1013E0 @ 150 CALL @VREAD read in the page 03CF1 41406476 151 PARV CURDSKADR pass MS address 03CF2 41406477 152 PARV CURPAGADR pass page file 03CF3 41106478 @ 153 PAR @CURFBIADR pass address of FBI 03CF4 41406479 154 PARV CURFBITYP and pass type we are expecting 03CF5 40003CF7 155 PARL BADRTN where to go on error 03CF6 19C40001 7 IMM 156 ADD R7 1 make return address P+2 00003CF7 157 BADRTN LABEL 03CF7 61178801 4 6 BASE 158 LD R4 SP,TMPR4 restore R4 03CF8 5D1F8002 6 STAK 159 LEAVE POP 160 * --- 161 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 189 (TRGENSUB) F 25 General subroutines BADRTN 00003CF7 F 25 155a 157= +CURDSKADR 00006476 F 25 136s 138 140s 151 +CURFBIADR 00006478 F 25 134s 153a +CURFBITYP 00006479 F 25 135s 154 +CURPAGADR 00006477 F 25 133s 142 146s 152 +DSKCTLBLK 0000C7F0 F 25 149a +MSBLKMASK 00003039 F 25 139 +PAGIN 00003CE1 F 25 126 132= TMPR4 00178801 F 25 129= 148s 158 +VREAD 000013E0 F 25 150 162 END of PAGIN 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 190 (TRGENSUB) F 25 General subroutines 164 165 ********************************************************************************** 166 * * 167 * PAGOUT * 168 * * 169 * Routine to write out the specified page. We set * 170 * FBILCD (last change date). Rather than go to the clock * 171 * each time, we use the value that we got when the recovery * 172 * was started. We add one millisecond to it each time it is * 173 * used to help make various times unique. (N.B. FBILCD has a * 174 * resolution of only 4 seconds). The VWRITE routine * 175 * calculates the checksum. * 176 * Calling sequence: * 177 * CALL PAGOUT * 178 * PAR address of page * 179 * PARL address of FBI * 180 * JMP error * 181 * * 182 * Eats: R0-R3 * 183 * * 184 ********************************************************************************** 185 186 BLOCK PAGOUT 187 ENTRY PAGOUT 188 189 BEGFRAME 00178801 6 BASE 190 TMPR4 BSS 1 place to save R4 191 ENDFRAME 192 03CF9 DD1F8002 6 STAK 193 PAGOUT ENTR PUSH 03CFA C1006477 194 STP CURPAGADR pass the pages virtual address 03CFB C0006478 195 STPL CURFBIADR pass address of FBI 196 03CFC 60806478 2 197 LD R2 CURFBIADR point to the FBI 03CFD 60089181 0 2 ZBM 198 LD R0 R2,FBIDA get the address of the transfer 03CFE E4006476 0 199 ST R0 CURDSKADR and remember 200 03CFF D200647A 201 INC2 CURTIME make the time move 03D00 3800647A 0 202 LEA R0 CURTIME R0 -> double word time 03D01 60082800 0 0 ZBM 203 LD R0 R0,DATEHORD get the single word time 03D02 E4168803 0 2 BASE 204 ST R0 R2,FBILCD put in FBI 205 03D03 60C06477 3 206 LD R3 CURPAGADR get virtual address 03D04 60CADE70 3 3 CBM 207 LD R3 R3/FLDPAGE extract the page number 03D05 18C40080 3 IMM 208 ADD R3 MONPF make it in the monitor 03D06 8092C000 3 REG 209 PFRD R3 get the page file contents 03D07 E4C06477 3 210 ST R3 CURPAGADR put page file entry in it's place 211 03D08 E5178801 4 6 BASE 212 ST R4 SP,TMPR4 save this register 03D09 6104C7F0 4 IMM 213 LD R4 ADR DSKCTLBLK point to our control block 03D0A DC1013E1 @ 214 CALL @VWRITE write the page out to the disk 03D0B 41406476 215 PARV CURDSKADR ms address 03D0C 41006477 216 PAR CURPAGADR 03D0D 41106478 @ 217 PAR @CURFBIADR 03D0E 40003D10 218 PARL BADBLK 219 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 191 (TRGENSUB) F 25 General subroutines 03D0F 19C40001 7 IMM 220 ADD R7 1 return address will be P+2 00003D10 221 BADBLK LABEL 03D10 61178801 4 6 BASE 222 LD R4 SP,TMPR4 restore this register 03D11 5D1F8002 6 STAK 223 LEAVE POP 224 * --- 225 BADBLK 00003D10 F 25 218a 221= +CURDSKADR 00006476 F 25 199s 215 +CURFBIADR 00006478 F 25 195s 197 217a +CURPAGADR 00006477 F 25 194s 206 210s 216a +CURTIME 0000647A F 25 201s 202a +DSKCTLBLK 0000C7F0 F 25 213a +PAGOUT 00003CF9 F 25 187 193= TMPR4 00178801 F 25 190= 212s 222 +VWRITE 000013E1 F 25 214 226 END of PAGOUT 794 INPUT TRDECRYPT include the decrypter 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 192 (TRDECRYPT) F 26 Decryption subroutines 3 4 ********************************************************************************** 5 * * 6 * This routine is for use by misc utilities that need an * 7 * encrypt/decrypt sub-system. * 8 * The correct block length must be used for both the * 9 * encrypt and decrypt functions. * 10 * Several tradeoffs have been made, most notably these: * 11 * 1) speed is of the essence, especially during encrypt. * 12 * 2) the crypt function must have limited error propagation so * 13 * that it may be used for backup and software distribution. * 14 * Notes: * 15 * The buffer must be an integral number of words. This * 16 * is because this is faster (which is important). * 17 * The key can be any 64 bit number, but it should * 18 * be fairly well packed and/or scrambled. PAK12 is * 19 * preferred if the key must be remembered by a mere * 20 * human, although information destroying transformations * 21 * may be used starting from a longer key. ASCII should * 22 * not be used. * 23 * The indicator is (practically and functionally) * 24 * another part of the key. The separate indicator * 25 * field is provided to encourage its use. An * 26 * indicator is a more rapidly varying key. A typical * 27 * usage might be for the system owner to specify a * 28 * key that was to be used for all backups. The * 29 * indicator would be provided by the backup routine, * 30 * and would be different for each call, perhaps part * 31 * specified by the operator (generally not desirable) * 32 * and part (or all) chosen arbitrarily (a 44 bit time * 33 * word) and written to the backup tape. This implies * 34 * that the indicator is not especially secret. * 35 * This is correct, its primary purpose is to prevent * 36 * two calls to CRYPT from producing nearly identical * 37 * results, with a resulting weakness. * 38 * If desired, and appropriate for the application, * 39 * the indicator may just be treated as an extension * 40 * of the key. * 41 * The record number is used internally like the * 42 * indicator. It is provided explicitly so that a * 43 * backup program (for instance) need not decrypt * 44 * every record that it comes to. It must, however, * 45 * keep an accurate count of records (or write the * 46 * record number onto the backup medium). Record * 47 * numbers may be duplicated, if desired, but this * 48 * is not recommended. * 49 * If desired, and appropriate for the application, * 50 * the record number may just be treated as an * 51 * extension of the key. * 52 * * 53 ********************************************************************************** 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 193 (TRDECRYPT) F 26 Decryption subroutines 55 56 ********************************************************************************** 57 * * 58 * This small block contains the global variables for the * 59 * encrypt/decrypt routines. * 60 * The key components are used to create a larger buffer * 61 * full of pseudo-random numbers. This is done in the INIT * 62 * routine. Given all of the PRNs, it should be extremely * 63 * difficult to work back to the original key data. This * 64 * buffer (SEEDBUFFER) is used by the RANDOM macro as its * 65 * source of pre-digested numbers to use in creating the PRNs * 66 * that are used for the actual data encryption. * 67 * * 68 ********************************************************************************** 69 00003D12 70 BUFAD BSS 1 buffer address 00003D13 71 BUFLEN BSS 1 buffer length (words) 72 00003D14 73 KEY BSS2 1 key 00003D16 74 INDICATOR BSS2 1 indicator 00003D18 75 RECNUM BSS 1 callers record number 76 00000040 ABS 77 SBUFLEN EQU 64 number of seed values 00003D19 78 SEEDBUFFER BSS SBUFLEN buffer for seed values 79 BSS 1 to capture seed buffer overflow 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 194 (TRDECRYPT) F 26 Decryption subroutines 81 82 ********************************************************************************** 83 * * 84 * RANDOM macro. This macro is used to generate the * 85 * pseudo-random number stream that is used by the remainder * 86 * of the encryptor. We generate a random number in R0. * 87 * * 88 * Call: * 89 * R4 = word index * 90 * Modify arithmetic on * 91 * RANDOM * 92 * * 93 * * 94 * Eats R0:R2, R0 set as above * 95 * * 96 ********************************************************************************** 97 98 RANDOM MACRO 99 100 LD R2 R4/BITS 26:31 load right 6 bits of word index 101 LD R0 SEEDBUFFER(R2) get first seed value 102 LD R2 R4/BITS 20:25 load left 6 bits of word index 103 MUL R0 SEEDBUFFER(R2) multiply for spread 104 XOR R0 R1 combine two halves of product 105 106 EMAC 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 195 (TRDECRYPT) F 26 Decryption subroutines 108 109 ********************************************************************************** 110 * * 111 * DECRYPT * 112 * * 113 * This routine will decrypt a block of data. * 114 * * 115 * Calling sequence: * 116 * CALL DECRYPT call for decryption * 117 * PAR * 118 * PARV * 119 * PAR * 120 * PAR * 121 * PARVL * 122 * * 123 * Eats R0:R4 * 124 * * 125 ********************************************************************************** 126 127 BLOCK DECRYPT 128 ENTRY DECRYPT 129 130 BEGFRAME 131 ENDFRAME 132 03D5A DD1F8001 6 STAK 133 DECRYPT ENTR PUSH 03D5B C1003D12 134 STP BUFAD save the buffer address 03D5C C1403D13 135 STPV BUFLEN and its length 03D5D C1003D14 136 STP KEY save the field being used as key, 03D5E C1003D16 137 STP INDICATOR the indicator, 03D5F C0403D18 138 STPVL RECNUM and the record number 139 03D60 62103D14 01 @ 140 LD2 R0 @KEY Get the real key 03D61 E6003D14 01 141 ST2 R0 KEY And store it in the right place 03D62 62103D16 01 @ 142 LD2 R0 @INDICATOR Get the real indicator 03D63 E6003D16 01 143 ST2 R0 INDICATOR And store it also 144 03D64 60003D13 0 145 LD R0 BUFLEN get the buffer length for validity check 03D65 68041000 0 IMM 146 UCPR R0 4096 check against upper limit 03D66 FE043D87 147 JGT EXIT give error return 03D67 64040004 0 IMM 148 CPR R0 4 check against lower limit 03D68 FE083D87 149 JLT EXIT give error return 150 03D69 DC403D88 151 CALLNP INIT set up random number generator for this call 152 * start of the encryption loop 153 * \ / 03D6A DC403F03 154 CALLNP ALTERNATE flip to other state 155 * \ / 03D6B 60C03D12 3 156 LD R3 BUFAD get the buffer address 03D6C 61040000 4 IMM 157 LD R4 0 get the starting place 03D6D 58C40010 IMM 158 IORPSR PSRMODIF set modify arithmetic 159 * \ / 160 00003D6E 161 DECLOOP LABEL 03D6E 65003D13 4 162 CPR R4 BUFLEN check for arrival at buffer end 03D6F FE063D7B 163 JGE LOOPEND jump out when done 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 196 (TRDECRYPT) F 26 Decryption subroutines 164 RANDOM get the next random number 164 03D70 608B3460 2 4 CBM 164 LD R2 R4/BITS 26:31 load right 6 bits of word index 03D71 60243D19 0 2 164 LD R0 SEEDBUFFER(R2) get first seed value 03D72 608B2860 2 4 CBM 164 LD R2 R4/BITS 20:25 load left 6 bits of word index 03D73 1C243D19 0 2 164 MUL R0 SEEDBUFFER(R2) multiply for spread 03D74 74124000 0 1 REG 164 XOR R0 R1 combine two halves of product 164 03D75 62520000 120 REG 165 LD2 R1 R0 sign extend PRN 03D76 14403D13 1 166 DIV R1 BUFLEN produce a buffer address 03D77 601CD000 0 32 BASE 167 LD R0 R3,0(R2) get the word out of hiding 03D78 E01CE000 0 34 BASE 168 EXCH R0 R3,0(R4) swap with the other word 03D79 E41CD000 0 32 BASE 169 ST R0 R3,0(R2) and complete the exchange 03D7A FB203D6E 4 170 IRJ R4 DECLOOP back to process previous word 171 * --- 172 00003D7B 173 LOOPEND LABEL 03D7B DC403F03 174 CALLNP ALTERNATE flip to other state 175 * \ / 03D7C 61003D13 4 176 LD R4 BUFLEN get the buffer length 03D7D FE0E3D84 177 JMP DEDDEL go test for end 178 * --- 179 00003D7E 180 BEGDEL LABEL 181 RANDOM get the next random number 181 03D7E 608B3460 2 4 CBM 181 LD R2 R4/BITS 26:31 load right 6 bits of word index 03D7F 60243D19 0 2 181 LD R0 SEEDBUFFER(R2) get first seed value 03D80 608B2860 2 4 CBM 181 LD R2 R4/BITS 20:25 load left 6 bits of word index 03D81 1C243D19 0 2 181 MUL R0 SEEDBUFFER(R2) multiply for spread 03D82 74124000 0 1 REG 181 XOR R0 R1 combine two halves of product 181 03D83 F41CE000 0 34 BASE 182 XORM R0 R3,0(R4) remove the secrecy cloak 00003D84 183 DEDDEL LABEL 03D84 FB263D7E 4 184 JDR R4 BEGDEL count through buffer 185 * \ / 03D85 58840010 IMM 186 CLBPSR PSRMODIF restore normal arithmetic 187 03D86 60040000 0 IMM 188 LD R0 0 Say no error 00003D87 189 EXIT LABEL 03D87 5D1F8001 6 STAK 190 LEAVE POP return to caller, encrypted in place 191 * --- 192 +ALTERNATE UUUUUUUU F 26 154 174 BEGDEL 00003D7E F 26 180= 184j +BUFAD 00003D12 F 26 134s 156 +BUFLEN 00003D13 F 26 135s 145 162 166 176 DECLOOP 00003D6E F 26 161= 170j +DECRYPT 00003D5A F 26 128 133= DEDDEL 00003D84 F 26 177j 183= EXIT 00003D87 F 26 147j 149j 189= +INDICATOR 00003D16 F 26 137s 142 143s +INIT UUUUUUUU F 26 151 +KEY 00003D14 F 26 136s 140 141s LOOPEND 00003D7B F 26 163j 173= +RANDOM MACRO F 26 164 181 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 197 (TRDECRYPT) F 26 Decryption subroutines +RECNUM 00003D18 F 26 138s +SEEDBUFFER 00003D19 F 26 164 164 181 181 193 END 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 198 (TRDECRYPT) F 26 Decryption subroutines 195 196 BLOCK decrypt initialize block 197 198 ENTRY INIT to set up random 199 ENTRY ALTERNATE to specify alternate pass 200 201 BEGFRAME 202 ENDFRAME 203 204 ********************************************************************************** 205 * * 206 * This routine calculates the seed values for the random * 207 * number generator. * 208 * This routine provides pre-digested numbers that are a * 209 * function of each bit in the key. This is a time consuming * 210 * job, but by doing it once here we avoid doing it for each * 211 * of the random numbers that we generate. We try to make a * 212 * single bit change in the key (or indicators) produce * 213 * massive changes in these seed numbers. * 214 * Call: * 215 * CALLNP INIT * 216 * * 217 * * 218 * Eats R0:R3 * 219 * * 220 ********************************************************************************** 221 03D88 DD5F8001 6 STAK 222 INIT ENTRNP PUSH 223 224 ********************************************************************************** 225 *The PRMUT instructions currently blow up when fed a value of 0 in * 226 *the register. JEQZ Rx instructions have been added to avoid the * 227 *execution of this... * 228 ********************************************************************************** 229 03D89 60003D14 0 230 LD R0 KEY get the first word of the key 03D8A FA023D8C 0 231 JEQZ R0 L10 skip because of microcode ***** 03D8B F0003DC3 0 232 PRMUT R0 SHUFFLETAB re-arrange the bits 00003D8C 233 L10 LABEL 03D8C E4003D14 0 234 ST R0 KEY and place word back 03D8D 60003D15 0 235 LD R0 KEY(1) get word 1 of the key 03D8E FA023D90 0 236 JEQZ R0 L20 skip because of microcode ***** 03D8F F0003DC3 0 237 PRMUT R0 SHUFFLETAB re-arrange the bits 00003D90 238 L20 LABEL 03D90 E4003D15 0 239 ST R0 KEY(1) and place word back 03D91 60003D16 0 240 LD R0 INDICATOR get the first word of the indicator 03D92 FA023D94 0 241 JEQZ R0 L30 skip because of microcode ***** 03D93 F0003DC3 0 242 PRMUT R0 SHUFFLETAB re-arrange the bits 00003D94 243 L30 LABEL 03D94 E4003D16 0 244 ST R0 INDICATOR and place word back 03D95 60003D17 0 245 LD R0 INDICATOR(1) get word 1 of the indicator 03D96 FA023D98 0 246 JEQZ R0 L40 skip because of microcode ***** 03D97 F0003DC3 0 247 PRMUT R0 SHUFFLETAB re-arrange the bits 00003D98 248 L40 LABEL 03D98 E4003D17 0 249 ST R0 INDICATOR(1) and place word back 250 * we don't spread out the RECNUM bits, instead 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 199 (TRDECRYPT) F 26 Decryption subroutines 251 * it appears repeatedly in the SEEDBUFFER (at 252 * intervals of 11 bits) so it has a large effect. 253 * \ / 03D99 60440104 1 IMM 254 LD R1 (SBUFLEN+1)*CPW load size of seed buffer and overflow 03D9A 60843D19 2 IMM 255 LD R2 ADR SEEDBUFFER and its address 03D9B FE580000 256 CFILL 000 clear it out 257 * \ / 03D9C DC003DB8 258 CALL SBUFILL call to combine a key word with the seed buffer 03D9D 41403D14 259 PARV KEY(0) pass the first key word 03D9E 4044001D IMM 260 PARVL 29 number of bits to advance 03D9F DC003DB8 261 CALL SBUFILL for each word in the key 03DA0 41403D15 262 PARV KEY(1) pass the second key word 03DA1 4044001B IMM 263 PARVL 27 number of bits to advance 03DA2 DC003DB8 264 CALL SBUFILL for each word in the key 03DA3 41403D16 265 PARV INDICATOR(0) pass the first indicator word 03DA4 40440017 IMM 266 PARVL 23 number of bits to advance 03DA5 DC003DB8 267 CALL SBUFILL for each word in the key 03DA6 41403D17 268 PARV INDICATOR(1) pass the second indicator word 03DA7 40440015 IMM 269 PARVL 21 number of bits to advance 03DA8 DC003DB8 270 CALL SBUFILL for each word in key 03DA9 41403D18 271 PARV RECNUM pass the record number 03DAA 4044000B IMM 272 PARVL 11 repeat most often, since shortest 273 * \ / 03DAB 60843D19 2 IMM 274 LD R2 ADR SEEDBUFFER load address so we can use CACH mode 275 * this loop works on single characters 03DAC 604400FF 1 IMM 276 LD R1 SBUFLEN*CPW-1 get number of characters in seed buffer 00003DAD 277 SREPLP LABEL 03DAD 601A8800 0 21 CACH 278 LD R0 CACH R2,0(R1) get next character from seed buffer 03DAE 60203E03 0 0 279 LD R0 LOOKUP(R0) fetch its replacement 03DAF E41A8800 0 21 CACH 280 ST R0 CACH R2,0(R1) and place back 03DB0 FA663DAD 1 281 JDR R1 SREPLP scan entire buffer 282 * \ / 283 * this loop handles whole words 03DB1 6044003F 1 IMM 284 LD R1 SBUFLEN-1 load size of seed buffer 00003DB2 285 SBUPRMLP LABEL 03DB2 60223D19 0 1 286 LD R0 SEEDBUFFER(R1) get the next value 03DB3 FA023DB5 0 287 JEQZ R0 L50 skip because of microcode ***** 03DB4 F0003DE3 0 288 PRMUT R0 DESTAB move the bits around 00003DB5 289 L50 LABEL 03DB5 E4223D19 0 1 290 ST R0 SEEDBUFFER(R1) store altered word back 03DB6 FA663DB2 1 291 JDR R1 SBUPRMLP do each word in buffer 292 * \ / 03DB7 5D1F8001 6 STAK 293 LEAVE POP 294 * --- 295 296 ********************************************************************************** 297 * * 298 * SBUFILL. Routine to XOR each key word into the seed * 299 * buffer multiple times. The number of bits to advance the * 300 * pointer between XORs is a parameter. * 301 * Call: * 302 * CALL SBUFILL * 303 * PARV * 304 * PARVL * 305 * Eats R0:R3 * 306 * * 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 200 (TRDECRYPT) F 26 Decryption subroutines 307 ********************************************************************************** 308 03DB8 DD1F8001 6 STAK 309 SBUFILL ENTR PUSH 03DB9 C1524000 1 REG 310 STPV R1 get the word being laid down 03DBA C052C000 3 REG 311 STPVL R3 set bit advance into R3 312 * \ / 03DBB 38003D59 0 313 LEA R0 SEEDBUFFER(SBUFLEN) get end pointer 03DBC 38803D19 2 314 LEA R2 SEEDBUFFER get pointer to seed buffer 03DBD 38888000 2 2 ZBM 315 LEA R2 R2,0/BITS 0:31 make it into a ZBM pointer 00003DBE 316 SBUFILP LABEL 03DBE F4568400 1 2 @R 317 XORM R1 @R2 combine into buffer 03DBF 98CA9F60 3 2 CBM 318 ADDM R3 R2/FLDBITS advance pointer through seed buffer 03DC0 640A9F10 0 2 CBM 319 CPR R0 R2/FLDADRS are we to the end yet? 03DC1 FE043DBE 320 JGT SBUFILP jump if another word may be put in 03DC2 5D1F8001 6 STAK 321 LEAVE PUSH 322 * --- 323 324 ********************************************************************************** 325 * * 326 * This table is constructed for use with the PRMUT * 327 * instruction so that bits are redistributed within a word. * 328 * The table is random EXCEPT that each succeeding bits goes * 329 * into the next character of the output (cyclicly). * 330 * * 331 ********************************************************************************** 332 00003DC3 333 SHUFFLETAB LABEL 03DC3 20000000 334 VFD 020000000 03DC4 00800000 335 VFD 000800000 03DC5 00000800 336 VFD 000000800 03DC6 00000020 337 VFD 000000020 03DC7 40000000 338 VFD 040000000 03DC8 00020000 339 VFD 000020000 03DC9 00002000 340 VFD 000002000 03DCA 00000004 341 VFD 000000004 03DCB 04000000 342 VFD 004000000 03DCC 00400000 343 VFD 000400000 03DCD 00008000 344 VFD 000008000 03DCE 00000080 345 VFD 000000080 03DCF 02000000 346 VFD 002000000 03DD0 00200000 347 VFD 000200000 03DD1 00001000 348 VFD 000001000 03DD2 00000008 349 VFD 000000008 03DD3 08000000 350 VFD 008000000 03DD4 00010000 351 VFD 000010000 03DD5 00000400 352 VFD 000000400 03DD6 00000040 353 VFD 000000040 03DD7 80000000 354 VFD 080000000 03DD8 00100000 355 VFD 000100000 03DD9 00000100 356 VFD 000000100 03DDA 00000010 357 VFD 000000010 03DDB 10000000 358 VFD 010000000 03DDC 00080000 359 VFD 000080000 03DDD 00004000 360 VFD 000004000 03DDE 00000002 361 VFD 000000002 03DDF 01000000 362 VFD 001000000 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 201 (TRDECRYPT) F 26 Decryption subroutines 03DE0 00040000 363 VFD 000040000 03DE1 00000200 364 VFD 000000200 03DE2 00000001 365 VFD 000000001 366 367 ********************************************************************************** 368 * * 369 * This table is constructed for use with the PRMUT * 370 * instruction so that the original word can not be recovered * 371 * easily. This table is constructed of random digits. * 372 * If all 32 words are orthoganal (bit vectors), then the * 373 * original word could, in principle, be recovered. * 374 * * 375 ********************************************************************************** 376 00003DE3 377 DESTAB LABEL 03DE3 A17DA279 378 VFD 0A17DA279 03DE4 BE69C68A 379 VFD 0BE69C68A 03DE5 114C1CFB 380 VFD 0114C1CFB 03DE6 26C32BF9 381 VFD 026C32BF9 03DE7 70CEA339 382 VFD 070CEA339 03DE8 C4FCCF3D 383 VFD 0C4FCCF3D 03DE9 CD6F7FD0 384 VFD 0CD6F7FD0 03DEA A83B3DC2 385 VFD 0A83B3DC2 386 03DEB D9C9CA1A 387 VFD 0D9C9CA1A 03DEC 9C930E51 388 VFD 09C930E51 03DED 878C0390 389 VFD 0878C0390 03DEE D6288444 390 VFD 0D6288444 03DEF 5DBD6C85 391 VFD 05DBD6C85 03DF0 9475582D 392 VFD 09475582D 03DF1 5BF18D65 393 VFD 05BF18D65 03DF2 F4BCB9F3 394 VFD 0F4BCB9F3 395 03DF3 1F1976E6 396 VFD 01F1976E6 03DF4 16AF560D 397 VFD 016AF560D 03DF5 E19A1860 398 VFD 0E19A1860 03DF6 24B37189 399 VFD 024B37189 03DF7 B027C896 400 VFD 0B027C896 03DF8 910042E3 401 VFD 0910042E3 03DF9 8E0782B7 402 VFD 08E0782B7 03DFA 32E32082 403 VFD 032E32082 404 03DFB 475FEE40 405 VFD 0475FEE40 03DFC 83FDC73F 406 VFD 083FDC73F 03DFD 72F664EE 407 VFD 072F664EE 03DFE 60833A31 408 VFD 060833A31 03DFF 4D9D45DA 409 VFD 04D9D45DA 03E00 2A28DAE9 410 VFD 02A28DAE9 03E01 17403BED 411 VFD 017403BED 03E02 E205C23D 412 VFD 0E205C23D 413 414 * Lookup table to substitute each byte 00003E03 415 LOOKUP LABEL 03E0A 000000AC 416 VFD 086,0E5,0D9,0CD,070,011,0A1,0AC 03E12 0000007D 417 VFD 02F,054,0D2,0C9,06F,0CE,04C,07D 03E1A 0000001C 418 VFD 0A2,0DC,012,05E,0CA,07F,0A3,01C 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 202 (TRDECRYPT) F 26 Decryption subroutines 03E22 00000039 419 VFD 0FB,079,0C0,00A,0DD,01A,0D0,039 03E2A 000000A8 420 VFD 0C4,026,0BE,0BA,02A,07B,09C,0A8 03E32 00000093 421 VFD 03B,0FC,0C3,069,081,07C,014,093 03E3A 00000068 422 VFD 00E,0ED,0CF,02B,0C6,0D3,00B,068 03E42 000000F8 423 VFD 0E2,051,0C2,03D,0F9,08A,009,0F8 424 03E4A 00000087 425 VFD 0E8,061,002,098,01F,05B,05D,087 03E52 000000BD 426 VFD 08C,06E,099,015,07E,019,0F1,0BD 03E5A 0000008D 427 VFD 06C,003,0C5,0B4,0EB,062,076,08D 03E62 000000E6 428 VFD 065,085,090,034,049,057,0AB,0E6 03E6A 000000DE 429 VFD 016,0F4,094,0D6,05A,073,06D,0DE 03E72 000000E7 430 VFD 0A7,0AF,0BC,075,028,077,09B,0E7 03E7A 000000F5 431 VFD 0A4,0D5,056,0B9,058,084,0BB,0F5 03E82 0000005C 432 VFD 01B,050,0B2,00D,0F3,02D,044,05C 433 03E8A 0000001D 434 VFD 0AA,0B0,0E1,0F0,080,024,0DF,01D 03E92 0000004A 435 VFD 0E4,027,0AE,09A,088,023,0B3,04A 03E9A 00000071 436 VFD 0EC,0C8,047,0EF,018,0AD,0FF,071 03EA2 00000041 437 VFD 089,096,05F,048,038,060,04B,041 03EAA 000000F7 438 VFD 0C1,0EE,0FA,046,0D8,0FD,083,0F7 03EB2 000000F2 439 VFD 017,040,064,02C,0C7,031,03A,0F2 03EBA 0000004D 440 VFD 0B5,08B,0F6,03F,0DA,045,09D,04D 03EC2 00000055 441 VFD 008,072,0DB,0B8,08F,035,0E0,055 442 03ECA 0000006B 443 VFD 091,078,09E,005,08E,0D7,036,06B 03ED2 000000FE 444 VFD 02E,000,053,0B6,007,04E,010,0FE 03EDA 00000066 445 VFD 092,029,042,0B7,082,074,004,066 03EE2 000000CB 446 VFD 07A,052,043,03E,020,067,0D1,0CB 03EEA 0000006A 447 VFD 0A9,037,0BF,033,059,0E3,09F,06A 03EF2 00000001 448 VFD 013,0B1,022,006,0E9,021,032,001 03EFA 00000097 449 VFD 01E,0EA,030,00F,03C,095,063,097 03F02 0000004F 450 VFD 00C,0D4,0A6,025,0CC,0A0,0A5,04F 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 203 (TRDECRYPT) F 26 Decryption subroutines 452 453 ********************************************************************************** 454 * * 455 * ALTERNATE. The random number generator is called twice * 456 * for each word index. We want different numbers to appear each * 457 * time, so this routine is used to alter some of the seed values. * 458 * The effect is reversed if this routine is called twice. * 459 * Call: * 460 * CALLNP ALTERNATE * 461 * * 462 ********************************************************************************** 463 03F03 DD5F8001 6 STAK 464 ALTERNATE ENTRNP PUSH 03F04 6044003F 1 IMM 465 LD R1 SBUFLEN-1 size of seed buffer 03F05 60003F09 0 466 LD R0 ALTVALUE get the value to xor 00003F06 467 ALTLOOP LABEL 03F06 F4223D19 0 1 468 XORM R0 SEEDBUFFER(R1) diddle a word 03F07 FA663F06 1 469 JDR R1 ALTLOOP and scan entire buffer 470 * \ / 03F08 5D1F8001 6 STAK 471 LEAVE POP 472 * --- 473 03F09 CA596A53 474 ALTVALUE VFD 0CA596A53 475 +ALTERNATE 00003F03 F 26 199 464= ALTLOOP 00003F06 F 26 467= 469j ALTVALUE 00003F09 F 26 466 474= DESTAB 00003DE3 F 26 288 377= +INDICATOR 00003D16 F 26 240 244s 245 249s 265 268 +INIT 00003D88 F 26 198 222= +KEY 00003D14 F 26 230 234s 235 239s 259 262 L10 00003D8C F 26 231j 233= L20 00003D90 F 26 236j 238= L30 00003D94 F 26 241j 243= L40 00003D98 F 26 246j 248= L50 00003DB5 F 26 287j 289= LOOKUP 00003E03 F 26 279 415= +RECNUM 00003D18 F 26 271 SBUFILL 00003DB8 F 26 258 261 264 267 270 309= SBUFILP 00003DBE F 26 316= 320j +SBUFLEN 00000040 F 26 254 276 284 313a 465 SBUPRMLP 00003DB2 F 26 285= 291j +SEEDBUFFER 00003D19 F 26 255a 274a 286 290s 313a 314a 468s SHUFFLETAB 00003DC3 F 26 232 237 242 247 333= SREPLP 00003DAD F 26 277= 281j 476 END of decrypt INIT block 795 ACTFILLEN 00000004 F 16 260= 261 ACTHDR 00160800 F 16 256= ACTHDRFAST 00160804 F 16 259= ACTHDRFILL 00160805 F 16 261= ACTHDRNAME 00160809 F 16 262= ACTHDRNOSL 00160803 F 16 258= ACTHDRSER 00160801 F 16 257= F 18 50 ACTRECLEN 00000009 F 16 264= F 21 988x ADDACT 00003BBB F 18 101 495 F 24 11 33 39= 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 204 F 0 Decryption subroutines ADDBZYLST 00003CAA F 19 95 F 25 19 24= ADDRESSTMP 00006558 F 0 324= F 23 228s 230a ALTERNATE 00003F03 F 26 154 174 199 464= ARRAYW 0000C7FC F 0 358= F 23 195a ARYCHRLEN 000061A8 F 0 357= F 23 194 ASKIFEND 00003A1E F 21 748 1373 1384= ASSERTEQ MACRO F 0 177= F 21 880 994 BEGINNING 00003000 F 0 139a 406 412= BITARRAY 0040C7FC F 0 359= F 23 17a BKUPHDRLEN 00000002 F 0 164= 269 F 17 33 F 18 62 F 19 202 F 21 107 114 BKUPHDRW1 00160800 F 0 164= BKUPHDRW2 00160801 F 0 164= F 18 256 337 F 19 380 753 1017 1030 BKUPREV 00001F10 F 0 164= BMPPSTHDR2 0000394C F 21 315 1072 1077= BOOTFLAG 00006553 F 0 312= 595 F 21 1297s BOOTINFO 00160805 F 16 179= F 21 1296 BTXDSKADR 0000C7FA F 0 354= 708s 717 F 23 221 BUFAD 00003D12 F 26 70= 134s 156 BUFFER 000067F0 F 0 332= F 22 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 BUFLEN 00003D13 F 26 71= 135s 145 162 166 176 BZFACT 00006540 F 0 290= F 18 454 F 20 42 68 F 25 39 BZFEXT 00006547 F 0 294= F 19 1421 F 20 59 F 25 45 BZFFIL 00006545 F 0 293= F 19 1420 F 20 58 F 25 43 BZFPRJ 00006542 F 0 291= F 18 455 F 20 43 69 F 25 41 BZFPROT 0000653B F 0 287= F 18 451a F 19 1417a F 20 36a F 25 34a BZYLSTACT 00160800 F 0 377= F 20 44 66s F 25 40s 86 90a BZYLSTEXT 00160805 F 0 380= F 20 63 F 25 46s 93a BZYLSTFIL 00160803 F 0 379= F 20 60 F 25 44s 92a BZYLSTLEN 00000006 F 0 382= F 20 48 F 25 48 82 BZYLSTPRJ 00160802 F 0 378= F 20 55 F 25 42s 91a BZYLSTPROT 0000E067 F 0 376= 382e 383a 452a F 20 40a F 25 83a BZYLSTPTR 0000E066 F 0 374= 453s F 20 49 F 25 38 49s 80 CHECK4MORE 00003467 F 19 477 483= 580 606 748 1011 CHECKSUM 00003A48 F 21 526 F 22 23= 24 28= 179 COMRAFPRC 0000358E F 19 835 882 1023 1107 1114= CR 0000000D F 0 182= F 21 1129 CRTADTOUT 00003B3F F 17 293 F 23 13 255 265= CURACCTASN 0000647F F 0 271= 451s F 18 51s 163 491s F 19 56 80s CURACTADR 0000647E F 0 270= F 18 58s 207 427s 527 F 24 177 CURACTBUF 00004C00 F 0 199= F 18 54a 66a 70 79a 80a 84 86 88 91a 94s 95a 98a 117 135a 177a 178a 188a 189a 198a 199a 209 210 219a 220a 273 275 277 288s 290a 356 358 360 370s 372a 423a 481s 482s 492s 493s 501a 502a 505a 507s 529 530 F 19 81s 121a 122a 136a 137a 156a 157a 247 249 260a 342a 343a 399 401 425a 514a 712a 964 966 973a 1203 1205 1215a 1254a 1255a F 20 108a 165a 180 284a 410a 415a 475a 481 483 485 488a 492a 495a 511a 555 557 559 601a 636a 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 205 F 0 Decryption subroutines 678a 682a F 21 559a 560a F 24 41 41 153 154 529a CURACTFBI 00006421 F 0 209= F 18 55a 83a 424a 483a F 20 679a F 24 530a CURADTBUF 00004400 F 0 197= F 23 324s 333a 383a 426a 431a 484a 489a CURADTFBI 0000640B F 0 207= F 23 334a 374a 377a 427a 434a 480a 485a 492a CURADTLST 0000C7FB F 0 355= F 23 283s 287 325 442s 500 CURDSKADR 00006476 F 0 257= F 25 136s 138 140s 151 199s 215 CURFBIADR 00006478 F 0 259= F 25 134s 153a 195s 197 217a CURFBITYP 00006479 F 0 260= F 25 135s 154 CURFDEPTR 00006499 F 0 273= F 19 45s 283 512 575 629 638 650 684 705 755 856 888 901 971 1051 1078 1193 1336 F 20 132s 201 235 237 248 CURFILADR 0000649C F 0 276= F 19 244s CURFILBUF 00005400 F 0 201= F 18 467a F 19 586a 620a 1125a 1145a 1274a CURFILEXT 000064A1 F 0 279= F 19 47s 124a 139a 159a 227s 345a 1260s 1319s 1333a F 20 107 351 F 21 562a CURFILFBI 00006437 F 0 211= F 18 470a 474a F 19 590a 595a 614a 621a 662a 1129a 1135a 1146a 1278a 1284a CURFILNAM 0000649F F 0 278= F 19 46s 123a 138a 158a 225s 344a 1259s 1318s 1332a F 20 106 350 F 21 561a CURFILSN 0000649D F 0 277= F 19 223s 251 403 603 968 1141 1207 CURFPPTR 0000654C F 0 305= F 19 502s F 21 129 185 194s 220 234 236s 242 244s CURHDRBUF 00006522 F 0 283= F 18 49a 429a 486a F 19 48a 55a 494a F 21 973a CURIDXADR 00006474 F 0 248= F 24 55s 62 66s 71 388s 394s 399 488 492s 497 CURIDXBUF 00004800 F 0 198= F 24 48a 68a 90a 155a 182a 381a 396a 403a 409a 437a 494a 503a 516a CURIDXFBI 00006416 F 0 208= F 24 49a 52a 69a 183a 382a 385a 397a 438a 495a CURPAGADR 00006477 F 0 258= F 25 133s 142 146s 152 194s 206 210s 216a CURRECPTR 0000654A F 0 303= F 19 501s 503s 506s F 21 40 52 56s 104 130s 182 221s 235s 243s 292s 545s CURRECTYP 0000654E F 0 307= F 18 145 156 F 19 72 541 F 21 305s 318 864 970 1021 1078 1464s CURSECBUF 00004000 F 0 196= F 17 91a 102a 113s 296s 297s 356a 364a F 23 272s 273s 274s 288 326s 443s 444s 445s 501s 502s F 24 41 44 56s 94 104 113s 224 227a 233a 236s 373 377 389s 418 482 486 521 CURSECFBI 00006400 F 0 206= F 17 92a 96a 352a 357a 360a 365a CURTIME 0000647A F 0 261= 438s F 17 295 F 25 201s 202a CURUD1POS 0000649A F 0 274= F 20 193 300s 581 637 645 CURUD2BLK 0000649B F 0 275= F 20 302 306s 315 473s CURUD2BUF 00005000 F 0 200= F 20 169 308a 312a 352a 357a 468a 477a 496a 507a 562a 573a 577a 687a CURUD2FBI 0000642C F 0 210= F 20 309a 313a 469a 480a 508a 578a 688a CVTLRGDIR 00003711 F 20 172 540 546= CVTRAFLRG 000035AC F 19 767 1181 1186= CVTSMLDIR 000036E7 F 20 183 460 466= DATAACTSER 00160801 F 16 318= DATAFILL 00160805 F 16 325= DATAFILLEN 00000003 F 16 324= 325 DATAHDR 00160800 F 16 317= 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 206 F 0 Decryption subroutines DATALOST 00006556 F 0 315= F 19 40s 630s 857s 1052s 1330s F 21 594s 647s DATAPAGESN 00081184 F 16 322= DATASEQNUM 00160803 F 16 319= DCBBTRAX 00081187 F 14 27= DCBFILLADR 00160802 F 14 15= 28e DCBFILLLEN 00000006 F 14 28= DCBLEN 00000008 F 0 350 F 14 30= DCBLUN 0016001C F 14 26= DCBMAIMNT 00080216 F 14 22= DCBNORETRY 00080416 F 14 23= DCBNOSUBS 00080016 F 14 21= DCBPFILE 00160800 F 14 13= DCBSCSI 00080816 F 14 25= DCBSECPTRK 00160802 F 14 16= DCBSUBLIST 00160804 F 0 698s F 14 18= DCBTRKPCYL 00160803 F 14 17= DCBUNIT 00160801 F 14 14= DCBVERIFY 00080616 F 14 24= DCBVOLSIZE 00160805 F 0 351e F 14 19= DCBWORD 00160806 F 14 20= 21e 22e 23e 24e 25e DECRYPT 00003D5A F 21 823 F 26 128 133= DECRYPTIT 000038DB F 21 518 784 794= DISKCTLBLK 00000400 F 14 12= 30e 31a DOACCT 00003216 F 0 461 F 18 34 44= DOANY 000038FA F 21 309 858 863= DOFILE 00003356 F 18 146 F 19 33 38= DOFILSHL 00003439 F 19 229 372 378= DOTBTI 0000303A F 0 493= F 18 71 DSKBLKNUM 0000C7F8 F 0 352= 709s F 17 107s 112s F 23 107s 122s 124s DSKCTLBLK 0000C7F0 F 0 350= 351e 680a F 25 149a 213a DUMMYACCT 0000330C F 18 167 414 421= DUMMYFILE 000035E0 F 19 87 1244 1252= ECBLKREUS 0000000D F 14 74= ECCHAN 00000003 F 14 64= ECDA 0000000C F 14 73= ECDATA 00000001 F 14 62= ECFBI 00000002 F 14 63= ECFBIACCT 00000009 F 14 70= ECFBIBDAT 00000019 F 14 86= ECFBIBLNE 00000011 F 14 78= ECFBIBLNK 0000000B F 14 72= ECFBIFDAT 00000013 F 14 80= ECFBIFLAG 0000000F F 14 76= ECFBIFLNK 0000000E F 14 75= ECFBIFSN 0000000A F 14 71= ECFBINBAN 00000015 F 14 82= ECFBINBFS 00000018 F 14 85= ECFBINBPJ 00000016 F 14 83= ECFBIODAT 00000012 F 14 79= ECFBIPROJ 00000017 F 14 84= ECFBIRBN 00000014 F 14 81= ECFBISUB 00000010 F 14 77= ECFBITYPE 00000008 F 14 69= ECMPE 00000007 F 14 68= ECNOCODE 00000000 F 14 61= 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 207 F 0 Decryption subroutines ECNOTRDY 00000005 F 14 66= ECRECBAD 0000001D F 14 90= ECSAFBAD 0000001C F 14 89= ECSEEK 00000004 F 14 65= ECSUBENT 0000001B F 14 88= ECUDIRORD 0000001A F 14 87= ECWRPROT 00000006 F 14 67= ENCTYP 00080101 F 16 171= ENDFILLEN 00000004 F 16 202= 203 ENDFILLER 00160803 F 16 203= ENDHEADER 00160800 F 16 200= ENDRECPTR 0000654B F 0 304= F 19 504 F 21 39 106 288 509s 1321s ENDTIME 00160801 F 16 201= ERRHDR 00160800 F 16 340= ERRRECLEN 00000001 F 16 342= F 21 991x EXPECTENC 0000645E F 0 228= F 18 120s 508s F 21 514 1141s EXPTAPNUM 00006552 F 0 311= F 21 1139s 1196a 1292 1322s EXTRAPAGE 00006000 F 0 204= F 21 132a 215a FAKEEND 00003A36 F 18 180 222 F 19 126 F 21 1413 1444 1449= FAKENAME 0000362E F 19 1314 1379 1392= FILEFILLEN 00000004 F 16 285= 286 FILEINFOT 000000F0 F 0 164= FILEINFOTA 00000001 F 0 164= FILEINFOTD 00000003 F 0 164= FILEINFOTF 00000002 F 0 164= FILEINFOTM 00000004 F 0 164= FILEINFOTV 00000000 F 0 164= FILENAME 02006536 F 0 285= F 19 1390a FILHDR 00160800 F 16 275= FILHDRASER 00160801 F 16 276= F 18 487 F 19 58 79 FILHDRBDAT 0016080C F 16 283= FILHDRCDAT 0016080A F 16 282= FILHDRFILL 0016080F F 16 286= FILHDRGOST 0016080E F 16 284= FILHDRNAME 00160813 F 16 287= FILHDRNOSL 00160803 F 16 277= FILHDRRDAT 00160806 F 16 280= FILHDRSIZE 00160805 F 16 279= FILHDRTYPE 00160804 F 16 278= FILHDRWDAT 00160808 F 16 281= FILLERHDR 00160800 F 16 352= FILLERRECL 00000001 F 16 354= F 21 992x FILRECLEN 00000013 F 0 283 F 16 289= F 21 989x FINISHOFF 000031DA F 0 468 F 17 281 289= FIPRECLEN 00000008 F 0 329a 329a F 16 327= F 21 990x FNAMBLKLEN 0000000A F 14 100= FNBLKPROT 00000400 F 14 92= 100e 101a FNDDIRENT 00003669 F 19 274 1323 F 20 100 105= 188 FNDUDR2BLK 000036A6 F 20 112 278 283= FNDUDR2ENT 000036C3 F 20 115 344 349= FNDUDRENT 000036D6 F 20 122 404 409= FNDVOLREC 00003074 F 0 440 589 594= FSTBKUPLEN 000000F0 F 0 164= F 18 256 F 19 380 GETFLSREC 000039C5 F 21 1142 1217 1266 1273= GETFREADR 00003AEA F 17 108 F 18 302 384 F 19 438 573 610 659 703 1118 F 23 14 56 100 105= 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 208 F 0 Decryption subroutines GETFREBLK 00003AD8 F 17 67 90 F 18 53 259 341 422 F 19 239 391 954 1073 1187 F 20 467 547 F 23 11 41 49= F 24 47 380 GETOSHDR 00003775 F 19 510 F 21 96= 98 103= 138 GETRECHDR 00003924 F 21 306 964 969= GETTAPSTR 00003936 F 21 312 1015 1020= HAVEPAGE 00006555 F 0 314= 450s F 18 473s F 19 702s 920s 1072s 1122s 1265 HDR1000BUF 00006535 F 0 284= F 21 1082a HDRPROTO 00000400 F 0 164a 164= 164e HDRTYP0 00000400 F 16 168= 189e 190a HDRTYP1 00000400 F 16 199= 205e 206a HDRTYP2 00000400 F 16 222= 229e 230a HDRTYP3 00000400 F 16 239= 245e 246a HDRTYP4 00000400 F 16 255= 264e 265a HDRTYP5 00000400 F 16 274= 289e 290a HDRTYP6 00000400 F 16 316= 327e 328a HDRTYP7 00000400 F 16 339= 342e 343a HDRTYP8 00000400 F 16 351= 354e 355a HDRTYPWRD1 00160801 F 16 170= 171e 173e INDICATOR 00003D16 F 26 74= 137s 142 143s 240 244s 245 249s 265 268 INIT 00003D88 F 26 151 198 222= INITFPAGES 00003481 F 18 463 F 19 478 540= 1269 INSDIRENT 0000367D F 19 278 1326 F 20 159 164= KEY 00003D14 F 26 73= 136s 140 141s 230 234s 235 239s 259 262 LF 0000000A F 0 183= F 21 1132 LOGHDRLEN 00000001 F 16 100= 169 200 223 240 256 275 317 340 352 LOGRECBZY 00080210 F 16 86= F 19 49 LOGRECCWD 00160800 F 16 84= 85e 86e 87e 98e LOGRECHDR 00000400 F 16 83= 100e 101a LOGRECIFL 00082100 F 16 98= F 21 296 1466s LOGRECOSQ 00080010 F 16 85= F 19 52 LOGRECTYP 00081650 F 16 87= F 18 430 F 21 299 353a 704 1286 1463s LOOKUPACT 00003647 F 19 112 F 20 22 27= LSTDSKADR 0000C7F9 F 0 353= F 23 267s 532 540s MAKEMINOR 0000354C F 19 805 897 945 951= MAXBLK 00030D40 F 0 356= 357e 359 MAXDSKADR 0000C7F5 F 0 351= F 23 108 125 205 266 278 MAXENCRSIZ 00001000 F 16 58= F 21 799 800 MAXRECTYP 00000008 F 16 97= F 21 300 880 880 994 994 MAXTRAX 00000004 F 0 184= F 21 725 MOVEFP 0000378B F 18 466 F 19 585 1124 1273 F 21 170 175= MOVLOGREC 0000375B F 17 31 54 101 212 217 F 18 60 65 267 350 469 F 19 200 205 263 407 589 1128 1277 F 21 28 35= 112 131 225 237 972 1030 1039 1081 MRKBLKS 00003B0B F 0 723 F 23 15 188 193= MSBLKMASK 00003039 F 0 492= F 19 330 F 23 158 203 222 F 25 139 NAME 00000005 F 14 96= NAMEEXT 00000007 F 14 97= NEWTAPE 0000398F F 21 736 1180 1188= 1421 NUMBERWORD 00160804 F 16 320= 321e 322e NUMBFP 0000654D F 0 306= F 19 39s 145s 484s 496s F 21 123 178 NUMBPAGES 00080084 F 16 321= F 19 495 NVMPWDLEN 00000008 F 0 224= 226 528 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 209 F 0 Decryption subroutines NXTHDRPTR 0000654F F 0 308= F 21 54 287 291 297s 554s 1320s NXTLOGREC 000037BC F 0 455 607 F 18 123 F 19 97 147 315 488 F 21 275 283= NXTPHSNUM 00006551 F 0 310= F 21 424 457 475 536 542s 566s 590a 596s 649s 716s 939a 1140s 1318s NXTPHSREC 000037F1 F 21 44 325 401 413= ODBADNAME 00000001 F 0 684 F 14 41= ODBADPL 00000004 F 0 659x 690 F 14 44= ODBADSB 00000006 F 0 659x F 14 46= ODBADVL 00000005 F 0 659x F 14 45= ODISYR 0000000B F 14 51= ODNOTDISK 00000002 F 0 686 F 14 42= ODOFFLINE 00000003 F 0 688 F 14 43= ODOOPS 00000008 F 14 48= ODPFM 0000000A F 14 50= ODSUBBIG 00000007 F 0 659x F 14 47= ODVIU 00000009 F 14 49= OPENHOLE 00003698 F 20 198 229 234= OPENUDIR1 00003743 F 20 589 630 635= OPHSREQCNT 00160801 F 16 50= F 21 552 1454s OPLVECTPC! 00000400 F 12 10= 54a OSINFO 00160801 F 16 139= OSINFOSIZ 00160800 F 16 138= OURTIMSTMP 0000645C F 0 227= F 21 827a 1145s 1220 PAGEFLAG 00006554 F 0 313= 449s F 21 128s 180 214s PAGIN 00003CE1 F 0 700 713 F 17 222 301 F 19 666 791 F 20 311 F 24 67 310 395 493 528 F 25 126 132= PAGOUT 00003CF9 F 17 76 147 236 310 355 363 F 18 281 364 F 19 268 414 619 675 783 813 850 1045 1144 1210 F 20 307 506 567 576 677 686 F 23 317 332 425 483 F 24 181 436 F 25 187 193= PHSCKSUM 00160804 F 16 62= PHSDSEQNUM 00160803 F 16 60= 70e F 21 533 1452s PHSEHDRSIZ 00000004 F 16 70= F 21 508 PHSENCSTRT 00160803 F 16 59= F 21 796a PHSFILEDO 00080212 F 16 54= F 21 1456s PHSFILLER 00160806 F 16 68= F 21 1457a PHSFILLSIZ 00000001 F 16 67= 68 F 21 1458 PHSFLAGWRD 00160802 F 16 52= 53e 54e PHSHDRLEN 00000007 F 0 329a 329a F 16 73= F 21 703a PHSLOGDATA 00160807 F 16 71= F 21 57a 186a 293a 1285a 1309a 1461a PHSNCRYPTD 00080012 F 16 53= F 18 74 F 21 515 1453s PHSNOESIZE 00000003 F 16 56= F 21 506 PHSRECHDR 00000400 F 16 48= 73e 74a PHSRECWDS 00006550 F 0 309= F 21 507s 798 804 PHSREQCNT 00160805 F 16 64= F 21 547 1455s PHSSEQNUM 00160800 F 16 49= 56e F 21 354a 532 537 541 589a 828 1451s PHSTAPBUF 000067F0 F 0 330= 332e F 18 73a F 21 57a 186a 293a 354a 425a 458a 485a 513a 698a 703a 796a 828 1281a 1285a 1304a 1309a 1450a 1461a PHYSRECSZ 00160806 F 16 180= PRCFILMRK 000038AF F 21 433 689 694= PRNTERR 00003907 F 21 877 901 906= PRNTPHYS 00003916 F 19 141 1257 F 21 623 643 932 937= PRTBZYFLS 00003CC3 F 0 466 F 25 74 79= PUTFREBLK 00003B04 F 18 208 528 F 19 326 331 F 23 12 151 157= 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 210 F 0 Decryption subroutines F 24 267 RANDOM MACRO F 26 98= 164 181 RCVCODE 00003563 F 19 306 1003 1009= RCVCODEFAKE 00003584 F 19 1004 1071= 1356 RCVRAF 000034E7 F 19 305 737 745= RCVRAFFAKE 00003549 F 19 738 919= 1355 RCVRAUTL 000032DB F 18 110 329 335= RCVRFIL 000033C2 F 19 63 194 199= RCVRSHL 000032B4 F 18 106 248 254= RCVRVOL 00003115 F 0 446 F 17 21 29= RCVSAF 00003484 F 19 304 564 572= RCVSAFFAKE 000034D9 F 19 565 701= 1354 RECNUM 00003D18 F 26 75= 138s 271 RTYPEACC 00000004 F 16 92= F 18 45 124 RTYPEERR 00000007 F 16 95= RTYPEESET 00000001 F 0 459 F 16 89= F 21 705 1462 RTYPEFIL 00000005 F 16 93= F 18 148 431 F 19 41 RTYPEFLR 00000008 F 16 96= F 21 302 RTYPEFP 00000006 F 16 94= F 18 433 F 19 148 490 RTYPESET 00000000 F 16 88= F 21 1287 RTYPESWCH 00000002 F 16 90= F 21 709 RTYPEVOL 00000003 F 0 609 F 16 91= SAVESETFIL 0016080B F 16 186= SAVSETFMT 00082101 F 16 173= F 21 1311 SAVSETNAME 00160810 F 16 187= SBUFLEN 00000040 F 26 77= 78 254 276 284 313a 465 SECBLK2DA 00006459 F 0 216= F 17 111s 361 SECBLKDA 00006458 F 0 215= F 17 99s 353 SEEDBUFFER 00003D19 F 26 78= 164 164 181 181 255a 274a 286 290s 313a 314a 468s SETTAPNUM 00160802 F 16 177= F 21 1291 SETTIMSTP 00160803 F 16 178= F 21 1310 SETUPACT 00003C76 F 18 211 531 F 20 70 F 24 470 478= SETUPDECRP 0000304B F 0 435 513 522= SETUPDSK 000030A4 F 0 443 652 663= SETUPTAPE 00003965 F 0 432 F 21 1116 1123= SNDBKUPLEN 00001F10 F 0 164= F 18 337 SSENCRFN 00000001 F 16 172= SSFILLEN 00000005 F 16 185= 186 SSOWNER 00160809 F 16 184= SSSSN 00160808 F 16 183= SSTAPEFN 00000006 F 16 176= SSTAPEFN5 00000005 F 16 174= F 21 714 1313 SSTAPEFN6 00000006 F 16 175= F 21 521 550 SVERECLEN 00000007 F 16 205= F 21 985x 1465 SVSRECLEN 00000010 F 16 189= F 21 984x SYSACCT 00000000 F 14 93= SYSKEY 0000645A F 0 225= 527s 553 554s F 21 826a SYSKEYCHR 0200645A F 0 226= 520a SYSPROJ 00000002 F 14 94= TALPH 00003C10 F 0 550 677j F 12 48= TAPECTLBLK 00000400 F 15 14= 26e 27a TAPEFORM 0000645F F 0 230= F 21 520 549 713 1312s TAPENDFIL 00160804 F 16 227= TAPENDHDR 00160800 F 16 223= TAPENDNUM 00160801 F 16 224= 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 211 F 0 Decryption subroutines TAPENDTIME 00160802 F 16 225= TAPHDR1000 00000400 F 16 137= 141e 142a TAPHDR1000L 00000001 F 0 284 329a F 16 141= F 21 1083 TAPSTRBUF 000064A2 F 0 280= F 21 1027a 1031a 1035a 1040a TAPSTRBUFL 00000200 F 0 282= F 21 1026 TAPSTRCBUF 020064A2 F 0 281= 282e 494a TAPSTRCHS 00160000 F 16 123= F 21 1036 TAPSTRDEF 00000400 F 16 122= 125a TAPSTRPTR 0000303B F 0 407 494= F 18 442 F 20 28 F 25 25 TBLNK 00003610 F 12 51= TDELM 00003A10 F 12 49= TEOL 00003810 F 12 50= TERR 00000000 F 12 52= TERRBCN 00000002 F 15 36= TERRBSN 00000003 F 15 37= TERRBUN 00000001 F 15 35= TERRDCS 0000000B F 15 45= TERRDNR 00000006 F 15 40= TERRDNT 00000004 F 15 38= TERREOF 00000008 F 15 42= F 21 430 TERRFNF 00000009 F 15 43= TERRHCS 0000000A F 15 44= TERRITE 00000007 F 15 41= TERRNBT 0000000D F 15 47= TERRNOL 00000005 F 15 39= TERRWPRT 0000000C F 15 46= TMPFDEBUF 00006481 F 0 272= F 19 206a 210a 233a 254a 333a 383a 421a 1261a 1283a 1315a F 20 199a TMPIDXADR 00006475 F 0 249= F 24 240s 305 309s 314 TMPOSHDR 0000647C F 0 269= F 17 32a F 18 61a 255a 336a F 19 201a 379a 752a 1016a 1029a F 21 113a TMPPAGBUF 00005800 F 0 202= 701a 707 714a 720 F 17 41a 55a 72s 95s 110s 117 120 126 128s 144s 145s 148a 213a 230 237a 302a 308a 311a F 18 260a 268a 282a 342a 351a 365a F 19 240a 264a 269a 392a 408a 415a 784a 792a 833 843s 851a 904s 955a 1020 1034s 1046a 1074a F 23 200 318a 389a F 24 311a 318a 329a TMPPAGBUF2 00005C00 F 0 203= F 17 68a 77a 223a 231 F 19 667a 676a 777 810s 814a 1188a 1196s 1211a F 20 548a 564a 568a 591a F 24 229a 265 304 TMPPAGFBI 00006442 F 0 212= 702a 715a F 17 44a 46a 149a 218a 238a 303a 312a F 18 261a 272a 283a 304a 343a 355a 366a 386a F 19 241a 246a 270a 393a 398a 416a 441a 785a 793a 852a 956a 962a 1047a 1075a F 23 314a 319a 392a 394a F 24 312a TMPPAGFBI2 0000644D F 0 213= F 17 69a 73a 78a 224a F 19 668a 673a 677a 815a 1189a 1202a 1212a F 20 549a 554a 569a TMTEMP1 00006557 F 0 323= F 21 617s 619a TNUM 00003E10 F 12 47= TPCBDENSE 00160803 F 15 20= TPCBLEN 00000008 F 15 26= TPCBPFILE 00160800 F 15 15= TPCBTRACK 00160802 F 15 17= F 21 721 724s 1189 1192s TPCBUNIT 00160801 F 15 16= TPENDFILLN 00000004 F 16 226= 227 TPERECLEN 00000008 F 16 229= F 21 986x TPEVECTPC! 00000400 F 13 10= 31a TRMBUF 00006460 F 0 239= 429a 541a 548a 669a 675a F 21 1200a 1207a 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 212 F 0 Decryption subroutines 1394a 1401a TRMBUFLEN 00000050 F 0 238= 240 428 540 544 668 671 F 21 1199 1202 1393 1397 TRMBUFPTR 0000303C F 0 408 495= 546s 674s F 21 1206s 1399s TRMCHRBUF 02006460 F 0 240= 495a TS 00000000 F 16 119= 187 243 262 287 UPDBOTBLK 0000319A F 17 36 206 211= VCHECKDATA 000013DB F 13 25= VCHECKHDR 000013DA F 13 24= VCLOSEDISK 000013EC F 12 26= VDISKCB 000013E4 F 12 18= VDISPLAY 000013E3 F 0 420 469 F 12 17= VDISPTERR 000013DE F 13 28= VDONEEXIT 000013F0 F 0 472 478 F 12 32= VERRLOGPT1 000013FA F 12 42= VERRLOGPTR 000013EA F 12 24= VEXTRACPUS 000013FC F 12 44= VFETCHFNM 000013F6 F 12 38= F 18 452 F 19 1419 F 20 37 F 25 35 VFETCHITEM 000013F5 F 0 676 F 12 37= F 21 1208 VFETCHITMH 000013F8 F 0 549 F 12 40= F 21 1402 VGETDATE 000013FB F 0 437 F 12 43= F 19 1393 VMEMPF 000013E6 F 12 20= VMEMSPACE 000013ED F 12 27= VOLFILLEN 00000004 F 16 241= 242 VOLRECFILL 00160801 F 16 242= VOLRECLEN 00000005 F 16 245= F 21 987x VOLRECNAME 00160805 F 16 243= VOPENDISK 000013EB F 0 682 F 12 25= VOPENTAPE 000013D1 F 13 15= VPF4SSU 000013E5 F 12 19= VPFWNDO1 000013E8 F 12 22= VPFWNDO2 000013E9 F 12 23= VPPUIWAIT 000013D9 F 13 23= VPREPOUT 000013F9 F 0 424 476 537 564 619 627 665 732 741 750 759 768 777 F 12 41= F 17 159 167 175 183 248 256 290 315 323 F 18 78 176 187 197 218 500 F 19 120 135 155 341 1253 1331 F 21 352 558 588 618 641 746 907 938 1125 1154 1195 1228 1237 1335 1344 1385 1389 F 23 162 229 343 F 25 89 VREAD 000013E0 F 12 14= F 25 150 VREADCHAR 000013F1 F 12 33= F 21 1128 VREADLINE 000013F3 F 0 542 670 F 12 35= F 21 1201 1395 VREADTAPE 000013D3 F 13 17= F 21 423 456 474 696 1279 1302 VREWIND 000013D4 F 13 18= F 21 735 751 1136 1214 VSCANOVER 000013F7 F 12 39= VSEFB 000013D6 F 13 20= VSEFF 000013D5 F 0 600 603 F 13 19= VSETTAPE 000013D8 F 13 22= F 21 729 1193 VSLOTWRU 000013E7 F 12 21= VSRCHDIR 000013E2 F 12 16= VSRCHDIRSN 000013EE F 12 28= VTAPECB 000013D0 F 0 599 F 13 14= F 21 422 444 452 455 470 473 624 695 720 734 1135 1213 1278 VTAPEFUNC 000013D7 F 13 21= F 21 446 454 472 626 VTAPELOAD 000013D2 F 13 16= VWRITE 000013E1 F 12 15= F 25 214 VWRITECHAR 000013F2 F 12 34= F 21 1133 1 Assembler C9208 TAPERECOVER - offline disk volume recoverer 28-Sep-93 11:11 PAGE 213 F 0 Decryption subroutines VWRITEFM 000013DD F 13 27= VWRITELINE 000013F4 F 12 36= VWRITETAPE 000013DC F 13 26= WHODONE 00160807 F 16 181= WRITESEC 000031FE F 17 299 346 351= F 24 57 259 WRITEUDIR 0000374E F 18 143 154 165 F 19 110 F 20 671 676= XTRABUF 000097F0 F 0 331= F 21 476a 486a 796 END of TAPERECOVER