Google
 

Trailing-Edge - PDP-10 Archives - BB-L014E-BM - autopatch/cblio.c05
There are 2 other files named cblio.c05 in the archive. Click here to see a list.
 REP 4/2	;05C1
	;WTK	20-JAN-82 [1013] SEQ ASC REL FILE - NULL RECORD CAUSES REST OF BLOCK 
	;			 TO BE SKIPPED
	;JSM	22-OCT-81 [1011] FIX CLOSE WITH DELETE FOR NON-SMU OUTPUT
	;JEH/JM	13-OCT-81 [1010] LOOKUP ERROR MSG IS INCORRECT
 WIT
	;SMI	13-SEP-82 [1043] Process end-of-file errors.
	;SMI	30-AUG-82 [1042] Pop stack if error on blocked file open.
	;RLF	26-JUL-82 [1037] Change error message to "for OUTPUT only".
	;RLF	21-JUL-82 [1036] Zero out right half of UOUT. after checkpointing
	;RLF	20-JUL-82 [1035] READ NEXT after DELETE get correct record
	;JEH	15-JUL-82 [1034] Zero out end of data block after deleting a record
	;SMI    06-JUL-82 [1033] Do abort close on labeled tapes during fatal error
	;                        processing
	;LEM	07-JUN-82 [1031] FIX RECORDS MISSING WHEN READING AN ASCII FILE SEQUENTIALLY
	;RJD	08-JUN-82 [1030] Check for use of ersatz device when opening a SMU
	;			 file from a SFD
	;JEH	04-JUN-82 [1027] Zero buffer address to force FAKE READ to get block
	;				number for a RETAIN of a LOW-VALUE key
	;JEH	01-JUN-82 [1026] APPEND FILOP. doesn't reset buffer ptr if file ended
	;			 on a block boundary
	;RJD	14-MAY-82 [1024] USE COUNT ON LAST BLOCK TO CHECK FOR END OF RECORD
	;RLF	07-MAY-82 [1023] UPDATE POINTER FOR READ AFTER REWRITE
	;LEM	27-MAR-82 [1021] make READ NEXT return correct record as ANSI standard states
	;RJD	17-MAR-82 [1016] TEST FOR ISAM FILES CHECKPOINTING EVERY n RECORDS
	;LEM	02-MAR-82 [1015] ALLOW COMPT. UUO TO RETURN CORRECT FILE STATUS ERROR NO
	;LEM	16-FEB-82 [1014] ALLOW ASCII FILE ON MTA TO HAVE EXTRA <CR>
	;WTK	20-JAN-82 [1013] SEQ REL ASCII FILE: NULL REC IN BLK CAUSES
	;			 REST OF BLOCK TO BE SKIPPED
	;JSM	22-OCT-81 [1011] FIX CLOSE WITH DELETE FOR NON-SMU OUTPUT
	;JEH/JM	13-OCT-81 [1010] LOOKUP ERROR MSG IS INCORRECT
	;DMN	09-OCT-81 [1007] TURN ON TOPS2X SWITCH FOR TOPS-20 VERSION 5
 REP 29/3	;05C2
		IFNDEF	TOPS2X,<TOPS2X==0>	; [667] THIS CODE HAS NOT BEEN TESTED YET
 WIT
	;[D1007]	IFNDEF	TOPS2X,<TOPS2X==0>	; [667] THIS CODE HAS NOT BEEN TESTED YET
		TOPS2X==TOPS20			;[1007] TURN ON TOPS2X FOR VERSION 5
 REP 18/29	;05C3
		JRST	KILL4			;[444] NO, CHECK NEXT ONE
		MOVE	AC13,D.DC(I16)		;[444] GET DEV CHARACTERISTICS
 WIT
		SKIPA				;[1033] SKIP IF INPUT FILE
		JRST	KILL1A			;[1033] JUMP IF OUTPUT ONLY
		MOVE	AC13,D.DC(I16)		;[1033] GET DEV CHARACTERISTICS
		TXNE	AC13,DV.MTA		;[1033] MAG TAPE?
		JRST	KILL2A			;[1033] YES, DO ABORT CLOSE
		JRST	KILL4			;[444] NO, CHECK NEXT ONE
	KILL1A:	MOVE	AC13,D.DC(I16)		;[1033][444] GET DEV CHARACTERISTICS
 REP 42/29	;05C4
		LDB	AC4,DTCN.		;[444] GET CHANNEL NUMBER
 WIT
	KILL2A:	LDB	AC4,DTCN.		;[1033][444] GET CHANNEL NUMBER
 INS 347/47	;05C5
		SETZM	D.OBB(I16)	;[1026] ZERO BUFFER POINTER
 REP 351/47	;05C6
			  JUMPN	AC0,OFERR	; JUMP IF BLOCKED
			  POP	PP,(PP)		; DISCARD .JBFF SAV
 WIT
			  SKIPE	AC0		;[1042] JUMP IF NOT BLOCKED
			  TLNN	FLG,IOFIL+RANFIL+IDXFIL	;[1042] SEQUENTIAL FILE?
			  POP	PP,(PP)		;[1042] YES, DISCARD .JBFF SAV
 REP 16/49	;05C7
		TLNE	FLG,IOFIL!OPNOUT ;[667] IF OPEN READ ONLY OR
 WIT
		TLNE	FLG,OPNOUT	;[1007][667] IF OPEN READ ONLY OR
 REP 15/50	;05C8
		TLNN	FLG,IOFIL!OPNOUT ;[667] IF OPEN READ ONLY OR
 WIT
		TLNN	FLG,OPNOUT	;[1007] [667] OR OPEN READ ONLY 
 INS 17/61	;05C9
		TRNA			;[1007] NOT
		JRST	OPNLU3		;[1007] YES IT IS, ULBLK. IS CORRECT
 INS 30/63	;05C10
		MOVE	AC1,UOBLK.+1	;[1030] GET SIXBIT NAME
		DEVNAM	AC1,		;[1030] IS DEVICE AN ERSATZ?
		 JRST	OPNF2A		;[1030] NO CONTINUE
		CAME	AC1,UOBLK.+1	;[1030] SAME NAME?
		JRST	OPNF2A		;[1030] NO, CONTINUE
		DEVPPN	AC1,		;[1030] GET PPN
		 JRST	OPNF2A		;[1030] CONTINUE
		CAME	AC1,PTH.BK+2	;[1030] SAME PPN?
		SETZM	PTH.BK+3	;[1030] NO, MUST BE ERSATZ SO CLEAR SFD
	OPNF2A:				;[1030] 
 REP 7/64	;05C11
		E.MCPT==^D8000000	; [431] MONITOR COMPT. UUO ERROR
 WIT
		E.MCPT==^D2000000	; [431] [1015] MONITOR COMPT. UUO ERROR
 REP 14/104	;05C12
		OUTSTR	[ASCIZ/ for OUTPUT./]			;11
 WIT
		OUTSTR	[ASCIZ/ for OUTPUT only./]		;[1037] 11
 REP 39/109	;05C13
		TXNE	AC13,DV.MTA	;MTA?
		JRST	CLOSE2		; YES, SKIP FUNNY EXTRA 'CR'
 WIT
	;	TXNE	AC13,DV.MTA	;[1014]MTA? allow mta to have extra 'CR'
	;	JRST	CLOSE2		;[1014] YES, SKIP FUNNY EXTRA 'CR'
 REP 89/147	;05C14
	IFN ANS74,<
		TXNE	AC16,V%RWRT	; IS THIS RERIT?
		JRST	RANXI0		; YES,SKIP CURRENT POSITION RESET
	>
 WIT
	;IFN ANS74,<			;[1023]test is taken out
	;	TXNE	AC16,V%RWRT	; IS THIS RERIT?
	;	JRST	RANXI0		; YES,SKIP CURRENT POSITION RESET
	;				;[1023] to update pointer
	;>
 REP 105/147	;05C15
		AOJA	AC5,RNWR2X	;UPDATE THE RECORD POINTER & SIGNAL ACTIVE DATA
 WIT
		MOVE	AC0,R.BPNR(I12)	;[1035] CURRENT RECORD
		MOVEM 	AC0,R.BPLR(I12)	;[1035] LAST RECORD
		HRRI	AC0,(AC5)	;[1035] ADR OF 1ST WRD OF NEXT REC
		MOVEM	AC0,R.BPNR(I12)	;[1035] BP TO NEXT RECORD
		SETOM	R.DATA(I12)	;[1035] THERE IS ACTIVE DATA IN BUFFER
		SETOM	R.WRIT(I12)	;[1035] THE LAST COBOL UUO WAS A WRITE
		AOJA	AC5,RANXI0	;[1035] UPDATE REC POINTER & SIGNAL ACTIVE DATA
 REP 30/148	;05C16
		JUMPN	AC4,RANREN	;[1013] IF SEQUENTIAL
		MOVE	AC5,D.WPR(I16)	;[1013]   ADD WORDS/RECORD TO BYTE PTR
		ADDB	AC5,R.BPNR(I12)	;[1013]   SO IT POINTS TO NEXT RECORD
		JRST	RANDOM		;[1013]   AND TRY AGAIN
 WIT
		JUMPN	AC4,RANREN	;[1013]IF SEQUENTIAL
		MOVE	AC5,D.WPR(I16)	;[1013]  ADD WORDS/RECORD TO BYTE PTR
		ADDB	AC5,R.BPNR(I12)	;[1013]  SO IT POINTS TO NEXT RECORD
		JRST	RANDOM		;[1013]  AND TRY AGAIN
 INS 11/149	;05C17
		CAIE	11,15		;[1031] EXCLUDE <CR> <LF> WHEN DECREMENTING 
		CAIN	11,12		;[1031] THE CHRCNT
		JRST	RANRE8		;[1031]
 REP 88/149	;05C18
	REPEAT 0,<			; THIS PATCH IS NOT WORTH IT
					; THERE ARE OTHER PLACES WHERE THE COUNT CAN RUN OUT
 WIT
	REPEAT 1,<			;[1024] THIS PATCH IS NOT WORTH IT
					; THERE ARE OTHER PLACES WHERE THE COUNT CAN RUN OUT
	;[1024] THE PATCH IS NECESSARY FOR THE LAST BLOCK OF A FILE
		MOVE	AC1,D.LBN(I16)	;[1024] GET LAST BLOCK NO.
		CAME	AC1,D.CBN(I16)	;[1024] SAME AS CURRENT BLOCK?
		JRST	RNR13D		;[1024] NO, SKIP CALCULATION
 REP 114/149	;05C19
	>

	REPEAT 1,<			; THIS IS THE ORIGINAL CODE
 WIT
		JRST	RANR14		;[1024] CONT
	>
	RNR13D:	ILDB	C,AC5		;[1024] GET A CHAR
		XCT	AC10		;[1024] CONVERT IT
		JUMPGE	C,RNR13D	;[1024]	SCAN TO EOR CHAR
	REPEAT 0,<			;[1024] THIS IS THE ORIGINAL CODE
 INS 52/156	;05C20
		SETZM	CNTRY(I12)	;[1027] ZERO BUFFER ADDRESS
 REP 7/167	;05C21
		;  CLEAR SAVED NEXT RECORD POSITION FLAG
		HRRZ	AC0,D.RFLG(I16)	; GET SOME FLAGS
		TRZE	AC0,SAVNXT	; CLEAR FLAG FOR NXT REC POS SAVED
		HRRM	AC0,D.RFLG(I16)	; PUT IT BACK IF WAS SET
 WIT
		PUSHJ	PP,SVDLRW	;[1021] SAVE CURRENT RECORD POSITION AND CONTINUE
 INS 55/168	;05C22
	IFN ANS74,<
		SETZM	NNTRY(I12)	;[1021] CLEAR NEXT REC FLAG, NO CURRENT REC
		SETZM	CNTRY(I12)	;[1021] CLEAR CURRNET DATA ENTRY TO INDICATE
					;[1021]SEQ READ CURRENT ENTRY IS NOT SET
	>; END IFN ANS74
 INS 21/197	;05C23
		MOVE	AC5,LRW(I12)	;[1034] SAVE OLD LRW
 INS 26/197	;05C24
		MOVEI	AC3,1(AC2)	;[1034] SET UP SOURCE
		HRL	AC3,AC3		;[1034] 
		ADDI	AC3,1		;[1034] ADJUST DESTINATION
		BLT	AC3,(AC5)	;[1034] ZERO UNUSED BLOCK AREA
 INS 30/205	;05C25
		TLNN	FLG,IDXFIL	; [1016] SKIP IF ISAM FILE
 INS 37/205	;05C26
		HLLZS	UOUT.		; [1036] ZEROES RIGHT HALF
 REP 32/210	;05C27
	IFN ANS74,<
		MOVE	AC1,FS.FS	;GET ERROR CODE
		CAIN	AC1,^D10	;END-OF-FILE ONLY?
		JRST	IGTST2		;YES
	>
 WIT

	;[1043] END-OF-FILE ERRORS ARE NOT TO BE IGNORED 
	;[1043] IFN ANS74,<
	;[1043]	MOVE	AC1,FS.FS	;GET ERROR CODE
	;[1043]	CAIN	AC1,^D10	;END-OF-FILE ONLY?
	;[1043]	JRST	IGTST2		;YES
	;[1043]>

 SUM 250007