Trailing-Edge
-
PDP-10 Archives
-
bb-bt99g-bb
-
backup.c08
There is 1 other file named backup.c08 in the archive. Click here to see a list.
REP 1/1 ;08C1
TITLE BACKUP -- MODULE TO SCAN COMMANDS FOR BACKUP -- %4(440)
SUBTTL P.F.CONKLIN/PFC/KCM/JEF/MEB/CLRH/VLR/CGN/WMG/DC/BPK/MS/BAH 18-Jun-82
DECVER==4 ;MAJOR VERSION
DECMVR==0 ;MINOR VERSION
DECEVR==440 ;EDIT NUMBER
WIT
TITLE BACKUP -- MODULE TO SCAN COMMANDS FOR BACKUP -- %4A(514)
SUBTTL P.F.CONKLIN/PFC/KCM/JEF/MEB/CLRH/VLR/CGN/WMG/DC/BPK/MS/BAH/EDS 13-Apr-83
DECVER==4 ;MAJOR VERSION
DECMVR==1 ;MINOR VERSION
DECEVR==514 ;EDIT NUMBER
REP 15/1 ;08C2
;.SKIP 1.CENTER;^VERSION 4
WIT
;.SKIP 1.CENTER;^VERSION 4A
REP 134/1 ;08C3
ND NM$TBF,4 ;NUMBER OF TAPE BUFFERS
WIT
ND NM$TBF,6 ;[507] NUMBER OF TAPE BUFFERS
INS 147/1 ;08C4
DM ERM,377777,^D100,^D100 ;[506] DEFAULT TAPE ERROR MAXIMUM
INS 828/1 ;08C5
;***** Begin Version 4A *****
;
;500 None. BAH 15-Apr-82
; Set up for version 4A.
;
;501 10-31514 EDS 23-Apr-82
; Fix problems with restoring files when the user has the
; /SCAN switch set. Scanning should not be used during the
; check to see if the file should be superseded.
;
;502 10-31437 BAH 28-Apr-82
; Many commands to BACKUP can cause routines in SCAN's hi-seg to be
; called. If BACKUP is execute only, every entry point to SCAN needs
; a PORTAL because BACKUP throws away its hi-seg. If execute only,
; don't throw away the hi-seg.
;
;503 10-32094 EDS 13-May-82
; Fix problems with restoring files which were saved from
; ERSATZ devices. The DEVNAM UUO does not translate ERSATZ
; device names to physical device names so use the DSKCHR UUO.
;
;504 10-32738 BAH 26-Aug-82
; Edit 373 took too many features away. Restore the check for batch
; jobs before reporting error messages in order to precede them with
; a $ sign. Restore allowing the operator to type any runtime command.
; Solve the original problem (see routine OPRCHS) of allowing numeric
; characters to cause breaks. Only comment characters, spaces, tabs and
; real break characters will stop parsing. Delete the E$$ICG error, since
; it was redundant.
;
;505 10-32868 BAH 17-Sep-82
; Make LSTVER know about minor version numbers greater than 26 ("Z").
;
;506 10-32867 BAH 22-Sep-82
; Implement the status-setting verb, ERRMAX, which allows the user to set
; the maximum number of tape errors allowed before giving a fatal error
; message ?BKPRTE. Default still remains 100 decimal. Argument is a
; decimal number.
;
;507 10-32858 BAH 24-Sep-82
; Make NM$TBF definitions in BACKUP.MAC and BACKRS.MAC agree.
;
;510 10-32866 BAH 5-Oct-82
; Files written in a customer-specific data mode cannot be restored on
; another system without getting an "Illegal data mode for device"
; error message. Give a warning and restore the file in image mode.
;
;511 10-32915 BAH 13-Oct-82
; P$MBF and P$MSN storage areas need to be defined IMMEDIATELY after
; their matching F$xxx storage areas. (SCAN stored switch values of
; new switches in addr and addr-2 if the storage location was defined
; as addr at the end of the SCAN block.)
;
;512 10-31851 BAH 4-Nov-82
; New. Listing the version number of files during a /LIST or PRINT
; command is useful to our customers.
;
;513 10-33182 BAH 4-Mar-83
; Fix the method of computing length of files for the PRINT command.
; Base the computation on the byte size instead of the mode of the
; file. Used DIRECT's formula.
;
;514 10-33253 BAH 13-Apr-83
; Prevent a SKIP n, where n is greater than the number of tape marks
; on a tape, from spinning the tape off the reel. Only done for
; USER-EOT labelled tapes.
;
;***** End of Version 4A *****
;
INS 7/2 ;08C6
S.EMAX::BLOCK 1 ;[506] MAXIMUM NUMBER OF TAPE ERRORS
REP 47/2 ;08C7
P$MBF: BLOCK 1 ;STICKY /MBEFORE
P$MSN: BLOCK 1 ;STICKY /MSINCE
F$MBF: BLOCK 1 ;CURRENT /MBEFORE
F$MSN: BLOCK 1 ;CURRENT /MSINCE
WIT
;**;[511] @ S.TPFG + 1L, Move 2 definitions after F$MSN, BAH, 13-Oct-82
F$MBF: BLOCK 1 ;[511] CURRENT /MBEFORE ****************
F$MSN: BLOCK 1 ;[511] CURRENT /MSINCE *Do NOT change *
P$MBF: BLOCK 1 ;[511] STICKY /MBEFORE * ordering!! *
P$MSN: BLOCK 1 ;[511] STICKY /MSINCE ****************
INS 54/4 ;08C8
HRROI T1,.GTSTS ;[502] GET THE JOB'S STATUS
GETTAB T1, ;[502]
SKIPA ;[502] IF ERROR, DON'T THROW AWAY HI-SEG
TXNE T1,JS.XO ;[502] IS BACKUP EXECUTE ONLY?
SETOM SAVDSK ;[502] YES.
INS 16/5 ;08C9
SETOM S.EMAX ;[506] MAXIMUM TAPE ERRORS
REP 36/5 ;08C10
WIT
INS 57/5 ;08C11
SETUP$ (S.EMAX,AD.ERM) ;[506] MAXIMUM TAPE ERRORS
INS 11/8 ;08C12
SP ERRMAX,S.EMAX,.SWDEC##,ERM,FS.VRQ ;;[506]
REP 29/14 ;08C13
SKPLO1: XCT T2 ;DO THE FUNCTION ONCE
STATZ F.MTAP,IO.ERR ;[367] DID IT WORK?
JRST [MOVE T1,['BKPSKF'] ;[367] PREFIX
HRLI T2,"?" ;[367] FATAL ERROR
HRRI T2,[ASCIZ /SKIP failed, tape position error/] ;[367]
PUSHJ P,.ERMSG## ;[367] ISSUE ERROR MESSAGE
PUSHJ P,.TCRLF## ;[367]
PUSHJ P,.TCRLF## ;[367]
JRST .POPJ1##] ;[367] AND RETURN
SOJG T1,SKPLO1 ;DO IT THE RIGHT NUMBER
WIT
;**;[514] @ SKPLOP + 11L, Insert 8L, BAH, 13-Apr-83
SKPLO3: MOVE T3,TAPLBL ;[514] GET THE LABEL TYPE
CAIN T3,.TFLNV ;[514] DO WE NEED TO HANDLE OUR OWN EOT?
SKIPG N ;[514] YES. IS THE SKIP IN THE FORWARD DIRECTION?
JRST SKPLO1 ;[514] NO NEED TO DO SPECIAL EOT CHECKING
MTSKR. F.MTAP, ;[514] SKIP A RECORD (MONITOR READ OPERATION)
MTWAT. F.MTAP, ;[514] WAIT FOR THE OPERATION TO COMPLETE
STATZ F.MTAP,IO.EOF ;[514] DID WE READ A TAPE MARK?
JRST E$$AMP ;[514] YES. TELL THE USER
MTBSR. F.MTAP, ;[514] NO. UNDO THE MTSKR. AND EXECUTE THE SKIP
SKPLO1: XCT T2 ;DO THE FUNCTION ONCE
;**;[514] @ SKPLO1 + 1L, Replace 9L, BAH, 13-Apr-83
MTWAT. F.MTAP, ;[514] WAIT IN CASE OF AN ERROR FOR THIS SKIP
STATZ F.MTAP,IO.ERR ;[514] ANY ERROR?
JRST E$$SKF ;[514] YES. REPORT A SKIP FAILED -- FATAL
SOJG T1,SKPLO3 ;[514] DO IT THE RIGHT NUMBER
REP 44/14 ;08C14
RELEAS F.MTAP, ;FREE THE CHANNEL
JUMPG C,SKPLOP ;LOOP TO END OF COMMAND
JRST .POPJ1## ;RETURN WITHOUT STORE
WIT
;**;[514] @ SKPLO1 + 10L, Add label SKPLO2, BAH, 13-Apr-83
SKPLO2: RELEAS F.MTAP, ;[514] FREE THE CHANNEL
JUMPG C,SKPLOP ;LOOP TO END OF COMMAND
JRST .POPJ1## ;RETURN WITHOUT STORE
;**;[514] @ End of routine SKPLOP, Insert 2 error routines, BAH, 13-Apr-83
;HERE IF ANY IO.ERR BITS HAVE BEEN LIT ON A SINGLE SKIP
E$$SKF::MOVEI T1,'SKF' ;[514] PREFIX
MOVEI T2,[ASCIZ \SKIP failed, tape position error\]
RELEAS F.MTAP, ;[514] RELEASE THE CHANNEL FIRST
JRST SCNERR ;[514]
;HERE IF ANOTHER READ OPERATION ON THE TAPE WILL MOVE THE TAPE OFF THE REEL
E$$AMP::MTBSF. F.MTAP, ;[514] BACKSPACE OVER THE LAST TAPE MARK
MOVE T1,['BKPAMP'] ;[514]
MOVE T2,["%",,[ASCIZ \Attempt to move past logical EOT
\]] ;[514]
PUSHJ P,.ERMSG## ;[514]
JRST SKPLO2 ;[514] CONTINUE WITH ARG LIST
INS 35/23 ;08C15
JRST [PUSH P,0 ;[504] ERROR RETURNS EXPECT THIS
JRST E$$IRC] ;[504] ILLEGAL COMMAND
PUSHJ P,OPRSKL ;[504] SKIP TO THE END OF LINE (ALL COMMANDS
;[504] HAVE NO ARGS)
REP 38/23 ;08C16
TXNN T4,JB.LBT ;[373] BATCH ?
JRST OPRCM2 ;[373] NO, CONTINUE NORMALLY
CAME T2,[SIXBIT \GO\] ;[373] YES, ONLY ACCEPT GO
JRST E$$ICG ;[373] WASN'T GO
CLRBFI ;[373] IGNORE ANY SUCCEEDING LINES FROM OPR
JRST OPRCM3 ;[373]
OPRCM2: CAIE T1,12 ;[373] IF NOT 0 OR LF THEN ERROR
JUMPN T1,[ ;[373]
PUSH P,[0] ;[373] DUMMY UP STACK
JRST E$$IRC] ;[373] GIVE THE ERROR
PUSHJ P,OPRSKL ;[412] SKIP TO END OF LINE (ALL COMMANDS
; HAVE NO ARGUMENTS)
JUMPE T2,OPRCDN ;IF NO COMMAND, JUST END
OPRCM3: PUSH P,[0] ;[412] PRESET NO MATCH
WIT
TXNE T4,JB.LBT ;[504] IF BATCH JOB
JUMPE T2,[PUSH P,0 ;[504] ERROR ROUTINES EXPECT THIS
JRST E$$IRC] ;[504] REPORT NO COMMAND AS AN ERROR
JUMPE T2,OPRCDN ;IF NO COMMAND, JUST END
PUSH P,[0] ;[412] PRESET NO MATCH
DEL 3/25 ;08C17
;<E$$ICG REPORTS OPERATOR (UNDER BATCH JOB) MADE A RESPONSE OTHER THAN <GO.
DEL 11/25 ;08C18
E$$ICG::MOVEI T1,[ASCIZ \$?BKPICG Invalid command, please make sure that tape is ready then respond GO
\] ;[373]
JRST OPRER1 ;[373] GIVE ERROR (WITHOUT DIDDLING STACK)
REP 22/25 ;08C19
OPRERR: POP P,(P) ;[373] CLEAR STACK
OPRER1: CLRBFI ;[373] CLEAR TYPE-AHEAD
OUTSTR (T1) ;[373] OUTPUT MESSAGE
WIT
OPRERR: CLRBFI ;[504] CLEAR TYPE-AHEAD
MOVEI T2,"$" ;[504] IF BATCH JOB, PRECEDE BY $
HRROI T3,.GTLIM ;[504] WANT BATCH STATUS TABLE
GETTAB T3, ;[504] SEE IF BATCH JOB
SETZ T3, ;[504] ASSUME NOT
TXNE T3,JB.LBT ;[504] ARE WE A BATCH JOB?
OUTCHR T2 ;[504] YES TELL OPERATOR
OPRER1: OUTSTR (T1) ;[504] OUTPUT MESSAGE
POP P,(P) ;[504] CLEAR STACK
DEL 20/39 ;08C20
DEL 27/39 ;08C21
DEL 35/39 ;08C22
DEL 42/39 ;08C23
REP 107/41 ;08C24
;Here when device is not a magtape
WIT
;Here when device is not a magtape
DEL 6/42 ;08C25
REP 3/46 ;08C26
;SKIPPING LEADING BLANKS. ^IT RETURNS THE BREAK
;CHARACTER IN ^T1, THE SIXBIT WORD IN ^T2, AND A MASK OF THE
;WORD IN ^T3. ^IT ALSO CLOBBERS ^T4.
WIT
;SKIPPING LEADING BLANKS. ^IT SKIP-RETURNS THE BREAK
;CHARACTER IN ^T1, THE SIXBIT WORD IN ^T2, AND A MASK OF THE
;WORD IN ^T3. ^IT ALSO CLOBBERS ^T4. NON-SKIP RETURN IF AN ILLEGAL CHARACTER TYPED.
REP 11/46 ;08C27
OPRGS1: CAIL T1,"A"+40 ;SEE IF
CAILE T1,"Z"+40 ; LOWER CASE
SKIPA ;NO--LEAVE ALONE
SUBI T1,40 ;YES--CONVERT TO UPPER
CAIL T1,"A" ;SEE IF
CAILE T1,"Z" ; ALPHABETIC
JRST OPRCLN ;[373] CHECK FOR LINE TERMINATOR AND RETURN
WIT
OPRGS1: PUSHJ P,OPRCKS ;[504] CHECK CHARACTER - CONVERT IF NECESSARY
CAIN T1,40 ;[504] SPACE (OR TAB)?
JRST CPOPJ1 ;[504] YES DONE PARSING
CAIN T1,";" ;[504] COMMENT?
JRST CPOPJ1 ;[504] YES. DONE PARSING
CAIN T1,.CHLFD ;[504] LINE TERMINATOR?
JRST CPOPJ1 ;[504] YES. DONE PARSING
CAIL T1,"0" ;[504] IF BELOW NUMERICS
CAILE T1,"Z" ;[504] OR ABOVE ALPHABETICS
POPJ P, ;[504] GIVE "ILLEGAL COMMAND" RETURN
CAILE T1,"9" ;[504] IF NOT NUMERIC
CAIL T1,"A" ;[504] OR NOT ALPHABETIC
SKIPA ;[504] YES IT IS
POPJ P, ;[504] GIVE ERROR RETURN
INS 26/46 ;08C28
;+
;<OPRCKS USED BY <OPRGSX TO DO SOME CHECKS ON THE CHARACTER IN ^T1. <OPRCLN
;HAS ALREADY BEEN EXECUTED SO LINE TERMINATORS AND NULL-TYPE CHARACTERS DON'T
;NEED TO BE CHECKED. ^THE FOLLOWING CONVERSIONS ARE DONE TO SIMPLIFY CHECKING
;IN UPPER LEVEL ROUTINES:
; 1. ^COMMENT CHARACTERS (; AND !) ARE CONVERTED TO SEMI-COLON.
; 2. ^TABS AND SPACES ARE CONVERTED TO SPACE.
; 3. ^LOWER CASE IS CONVERTED TO UPPER CASE.
;^CALLED WITH THE CHARACTER IN T1. ^RETURNS THE APPROPRIATE CHARACTER IN ^T1
;AND DOES NOT USE ANY OTHER <AC.
;-
OPRCKS: CAIN T1,"!" ;IF EXCLAMATION POINT
MOVEI T1,";" ;CONVERT TO SEMI-COLON
CAIN T1,.CHTAB ;IF TAB
MOVEI T1,40 ;CONVERT TO SPACE
CAIL T1,"A"+40 ;IF NOT LOWERCASE
CAILE T1,"Z"+40 ; THEN JUST RETURN WITH
POPJ P, ; CHARACTER
SUBI T1,40 ;ELSE CONVERT TO UPPERCASE AND
POPJ P, ; THEN RETURN
SUM 255228