Trailing-Edge
-
PDP-10 Archives
-
bb-d549g-sb
-
backrs.fix
There are no other files named backrs.fix in the archive.
.EDIT 321
.DATE 22-JAN-79
.MODULE BACKRS
REMARK THIS EDIT FIXES VARIOUS PROBLEMS WITH READING REPEATER RECORDS
.INSERT CNTFIL+21,REPLACE:5,<CAML T1,THSRDB>
CAMN T1,THSRDB ;BLOCK EXPECTED?
JRST XFR1 ;YES - GO USE IT
MOVE T2,THSRDB ;LOAD NEEDED DISK BLOCK NUMBER
CAML T2,T1 ;NEEDED BLOCK GE FIRST BLOCK IN RECORD?
CAIL T2,N(T1) ;AND ALSO LT FIRST BLOCK IN NEXT RECORD?
JRST NOTINB ;NO - GO RESET DISK POINTERS
.ENDI
.INSERT NEWDAT,REPLACE:6,<TLNN 40>
NOTINB: CAML T1,THSRDB ;PREVIOUS BLOCK?
JRST RSTMSD ;NO - WE MISSED A BLOCK
MOVEM T1,THSRDB ;YES - RESET FILE INDEX
PUSHJ P,WRNMSG ;WARN USER
JRST E$$PBR
OUTSTR [ASCIZ\BKPPBR\]
OUTSTR [ASCIZ\PRIOR BLOCK REPEATED
\]
E$$PBR::MOVEI T2,[ASCIZ/REWRITING FROM /] ;MESSAGE
TLNE F,40 ;CHECKING?
MOVEI T2,[ASCIZ/REREADING FROM /] ;YES - OTHER MSG
OUTSTR @T2 ;PUT OUT MESSAGE
PUSHJ P,TYEFIL ;TELL USER FILE AND BLOCK
JRST RSTUST ;GO USE IT
RSTMSD: PUSH P,T1 ;SAVE THIS RDB
PUSHJ P,WRNMSG ;WARN USER
JRST E$$BMT
OUTSTR [ASCIZ\BKPBMT\]
OUTSTR [ASCIZ\BLOCK MISSED ON TAPE, EXPECTED
\]
E$$BMT::PUSHJ P,TYEFIL ;DISPLAY FILE AND BLOCK
POP P,THSRDB ;UPDATE FILE INDEX
PUSHJ P,WRNMSG ;WARN USER
JRST E$$FLC
OUTSTR [ASCIZ\BKPFLC\]
OUTSTR [ASCIZ\FILE CONTINUING WITH
\]
E$$FLC::PUSHJ P,TYEFIL ;DISPLAY FILE AND BLOCK
RSTUST: MOVE T1,THSRDB ;GET BLOCK NUMBER
TLNN F,40 ;CHECKING?
JRST [USETO FILE,(T1) ;NO - USETO DISK FILE
JRST XFR1] ;GO USE THE BLOCK
MOVSI T2,400000 ;CHECKING -MUST RESET INPUT BUFFERS
IORB T2,DSKHDR ;FLAG BUFFER RING AS EMPTY
MOVEI T3,NDSKBF ;PREPARE TO INVALIDATE ALL BUFFERS
RSTUS1: SOJL T3,RSTUS2 ;ANY MORE BUFFERS?
MOVE T4,(T2) ;YES - GET NEXT .BFHDR
TLZ T4,400000 ;CLEAR THE USE BIT
MOVEM T4,(T2) ;PUT IT BACK
MOVE T2,T4 ;POINT TO NEXT BUFFER IN RING
JRST RSTUS1 ;GO CHECK FOR MORE
RSTUS2: USETI FILE,(T1) ;RING INVALIDATED - USETI DISK FILE
PUSHJ P,@DSKIO ;READ THE NEEDED DISK BLOCK
JRST XFRERR ;PROBLEM WITH DISK
JRST DSKEO1 ;NO MORE DISK FILE
JRST XFR1 ;GO COMPARE
.ENDI
.INSERT USEREC,REPLACE:^D8,<PUSHJ P,RPTNXT>
;8 INSTRUCTIONS REMOVED
.ENDI
.INSERT RPTNXT+1,REPLACE:2,<INPUT F.MTAP,>
TRON F,400000 ;FLAG INPUT DONE
INPUT F.MTAP ;AND INPUT IF NEEDED
.ENDI
.INSERT TSTRPT+13,REPLACE:2,<TDNE T1,G$FLAG(P1)>
TDNN T1,G$FLAG(P1) ;SEE IF ON
POPJ P, ;RETURN
MOVE T1,F$RDW(P1) ;GET REPEATER'S RDW
CAMN T1,F$RDW(MH) ;MATCHES THE OTHER BUFFER?
AOS (P) ;YES - ADVANCE RETURN
.ENDI
.ENDE