Google
 

Trailing-Edge - PDP-10 Archives - bb-kl11f-bm_tops20_v7_0_atpch1_19 - autopatch/cblio.c11
There are 2 other files named cblio.c11 in the archive. Click here to see a list.
 INS 29/1	;11C1
	;JSM	22-APR-85 [1143] Change where progs. fail if missing ISAM files
	;MJC	28-MAR-85 [1141] Search 9 char VALUE OF ID for a separator before
	;				assuming it is the old style.
	;BCM	27-Mar-85 [1140] Make PA1050 allocate buffers in prealloc area.
	;KWS	28-MAR-85 [1137] Fix the lookup of overlay files.
 REP 79/5	;11C2
		MOVX	AC3,<<FLD .JSAOF,JS%DEV>!<FLD .JSAOF,DIR>!<FLD .JSAOF,JS%NAM>!<FLD .JSAOF,JS%TYP>!<FLD .JSAOF,JS%GEN>!JS%PAF>
 WIT
		MOVX	AC3,<<FLD .JSAOF,JS%DEV>!<FLD .JSAOF,JS%DIR>!<FLD .JSAOF,JS%NAM>!<FLD .JSAOF,JS%TYP>!<FLD .JSAOF,JS%GEN>!JS%PAF>	;[1137]
 REP 35/19	;11C3
		 JRST	[CAIE	AC1,600130	;INVALID SMU ACCESS?
			JRST	[OUTSTR	[ASCIZ /RESET time /]
				JRST	OCPERR	]
 WIT
			JRST [CAIE AC1,OPNX9 ;[1143] INVALID SMU ACCESS
				JRST RSTID1 ;[1143] IF FNF,GO SET FLAG AND LET USER GO TO OPEN
 REP 75/19	;11C4
	RSTID1:	HLLZ	AC1,D.F1(I16)	;[377] GET FLG1 PARMS
		TXNN	AC1,B%OPTF	;[374] OPTIONAL FILE?
		JRST	RSTID8		;[323] NO, FATAL
 WIT
	RSTID1:	POP	PP,AC1		;[1143] GET BACK TO RIGHT PLACE ON STACK
 REP 81/19	;11C5
		POP	PP,.JBFF	;RESTORE THE STACK
 WIT
		POP	PP,.JBFF	;RESTORE THE STACK ;[1143] ACTUALLY RESTORES
					;.JBFF FROM STACK
 REP 18/23	;11C6
		MOVX	AC3,<<FLD .JSAOF,JS%DEV>!<FLD .JSAOF,DIR>!JS%PAF>
 WIT
		MOVX	AC3,<<FLD .JSAOF,JS%DEV>!<FLD .JSAOF,JS%DIR>!JS%PAF>	;[1137]
 REP 28/23	;11C7
		BLT	AC1,.GJJFN(AC3)
 WIT
		BLT	AC1,.GJF2(AC3)	;[1137] 
 REP 5/24	;11C8
		EXP	0,0,0
 WIT
		EXP	0,0,0,0		;[1137]
 REP 91/40	;11C9
		COMPT.	AC1,		;DO IT
 WIT
	;**;[1140] At OPNFNF+6L
		TXNN	AC16,OPN%EX	;[1140] IF OPEN EXTEND
		  JRST	UNXTND		;[1140] ELSE SKIP
		PUSH	PP,.JBFF	;[1140] SAVE .JBFF
		HLRZ	AC11,D.BL(I16)	;[1140] PNT TO BUFFER LOCATION
		MOVEM	AC11,.JBFF	;[1140] SO PA1050 STARTS THERE
	UNXTND:	COMPT.	AC1,		;DO IT
		  TDZA	AC11,AC11	;[1140] CLEAR FOR FAILURE
		SETOI	AC11,		;[1140] ELSE WE SUCCEED
		TXNE	AC16,OPN%EX	;[1140] OPEN EXTEND?
		  POP	PP,.JBFF	;[1140] YES, RESTORE END-OF-CORE PNTR
		SKIPN	AC11		;[1140] SKIP FOR SUCCESS
 REP 87/63	;11C10
		IBP	AC1			;DELETE "<"
	OCPT1P:	ILDB	AC0,AC1
		IDPB	AC0,AC5
		CAIE	AC0,">"			;END OF DIRECTORY?
 WIT
		IBP	AC1			;DELETE LEFT ANGLE BRACKET
	OCPT1P:	ILDB	AC0,AC1
		IDPB	AC0,AC5
		CAIE	AC0,^O76		;END OF DIRECTORY?
 REP 108/63	;11C11
		CAIE	AC6,9		;IS IT 9 EXACTLY?
		JRST	OCPT7		;NO, CONVERT STRING TO ASCIZ
		JRST	OCPT9		;YES, USE OLD METHOD

	;HERE FOR ISAM .IDA FILE
	OCPT4A:	MOVE	AC5,[POINT 6,DFILNM(I12)]; [431] .IDA - SO VALUE-ID IS HERE
		MOVE	AC10,FID.PT	;GET STORAGE POINTER
		MOVEI	AC6,9		;ASSUME 9 CHAR FOR NOW
					;USE OLD METHOD BY DEFAULT

	OCPT9:	TLNN	AC5,600		; IS VID EBCDIC?
		JRST	OCPT9E		;YES
		TLNN	AC5,100		;IS VID ASCII?
		JRST	OCPT9S		;NO, MUST BE SIXBIT
	;	JRST	OCPT9A		;YES

	OCPT9A:	ILDB	C,AC5		;PICK UP A CHAR
		CAIE	C," "		;IGNORE SPACES
		IDPB	C,AC10		;OTHERWISE STORE 
		CAIE	AC6,4		;IS IT TIME FOR "."?
		SOJN	AC6,OCPT9A	;NO, LOOP 'TIL DONE
		JUMPE	AC6,OCPT7Z	;ALL DONE
		MOVEI	C,"."
		IDPB	C,AC10
		SOJN	AC6,OCPT9A	;BACK FOR EXTENSION

	OCPT9E:	ILDB	C,AC5		;PICK UP A CHAR
		LDB	C,PTR.97##	; CONVERT TO ASCII
		CAIE	C," "		;IGNORE SPACES
		IDPB	C,AC10		;STORE IN E BLOCK
		CAIE	AC6,4		;IS IT TIME FOR "."?
		SOJN	AC6,OCPT9E	;NO, LOOP 'TIL DONE
		JUMPE	AC6,OCPT7Z	;ALL DONE
		MOVEI	C,"."
		IDPB	C,AC10
		SOJN	AC6,OCPT9E	;BACK FOR EXTENSION

	OCPT9S:	ILDB	C,AC5		;PICK UP A CHAR
		LDB	C,PTR.67##	; CONVERT TO ASCII
		CAIE	C," "		;IGNORE SPACES
		IDPB	C,AC10		;STORE IN E BLOCK
		CAIE	AC6,4		;IS IT TIME FOR "."?
		SOJN	AC6,OCPT9S	;NO, LOOP 'TIL DONE
		JUMPE	AC6,OCPT7Z	;ALL DONE
		MOVEI	C,"."
		IDPB	C,AC10
		SOJN	AC6,OCPT9S	;BACK FOR EXTENSION

	OCPT7:	TLNN	AC5,600		; IS VID EBCDIC?
 WIT

	;[1141]CONVERT SIXBIT OR EBCDIC FILENAME TO ASCII SO WE CAN SCAN IT FOR
	;[1141]FILENAME SEPARATOR CHARACTERS

	OPCT7:	TLNN	AC5,600		; IS VID EBCDIC?
 INS 180/63	;11C12
		LDB	AC6,F.BSID	;[1141]GET SIZE OF VALUE OF ID
		SKIPN	AC6		;[1141]
		MOVEI	AC6,9		;[1141]ASSUME 9 BY DEFAULT
		CAIE	AC6,9		;[1141]IS IT 9 EXACTLY?
		JRST	OCPT2		;[1141]NO, DONE - GO SET UP FOR GTJFN

	;[1141]LOOK FOR SEPARATORS
	;[1141]USE OLD METHOD IF NONE FOUND

		MOVE	AC10,FID.PT	;[1141]GET STORAGE POINTER
	OCPTSP:	ILDB	C,AC10		;[1141]PICK UP A CHAR
		CAIE	C,"."		;[1141]PERIOD?
		CAIN	C,":"		;[1141]OR COLON?
		JRST	OCPT2		;[1141]YES DON'T CONVERT
		CAIE	C,^O74		;[1141]LEFT ANGLE BRACKET?
		CAIN	C,"["		;[1141]OR LEFT SQUARE BRACKET?
		JRST	OCPT2		;[1141]YES DON'T CONVERT
		CAIN	C,";"		;[1141]OR MAYBE ";"
		JRST	OCPT2		;[1141]YES DON'T CONVERT
		SOJN	AC6,OCPTSP	;[1141]LOOP TILL DONE OR SEPARATOR FOUND

	;[1141]NO SEPARATOR. USE OLD METHOD.

		MOVE	AC5,F.WVID(I16)	;[1141]BYTE-PTR TO VALUE OF ID
		MOVE	AC10,FID.PT	;[1141]GET STORAGE POINTER
		MOVEI	AC6,9		;[1141]LENGTH 9
		JRST	OCPT9		;[1141]CONVERT AGAIN

	;HERE FOR ISAM .IDA FILE
	OCPT4A:	MOVE	AC5,[POINT 6,DFILNM(I12)]; [431] .IDA - SO VALUE-ID IS HERE
		MOVE	AC10,FID.PT	;GET STORAGE POINTER
		MOVEI	AC6,9		;ASSUME 9 CHAR FOR NOW
					;USE OLD METHOD BY DEFAULT

	OCPT9:	TLNN	AC5,600		; IS VID EBCDIC?
		JRST	OCPT9E		;YES
		TLNN	AC5,100		;IS VID ASCII?
		JRST	OCPT9S		;NO, MUST BE SIXBIT
	;	JRST	OCPT9A		;YES

	OCPT9A:	ILDB	C,AC5		;PICK UP A CHAR
		CAIE	C," "		;IGNORE SPACES
		IDPB	C,AC10		;OTHERWISE STORE 
		CAIE	AC6,4		;IS IT TIME FOR "."?
		SOJN	AC6,OCPT9A	;NO, LOOP 'TIL DONE
		JUMPE	AC6,OCPT9Z	;[1141]ALL DONE
		MOVEI	C,"."
		IDPB	C,AC10
		SOJN	AC6,OCPT9A	;BACK FOR EXTENSION
		JRST	OCPT9Z		;[1141]DONE

	OCPT9E:	ILDB	C,AC5		;PICK UP A CHAR
		LDB	C,PTR.97##	; CONVERT TO ASCII
		CAIE	C," "		;IGNORE SPACES
		IDPB	C,AC10		;STORE IN E BLOCK
		CAIE	AC6,4		;IS IT TIME FOR "."?
		SOJN	AC6,OCPT9E	;NO, LOOP 'TIL DONE
		JUMPE	AC6,OCPT9Z	;[1141]ALL DONE
		MOVEI	C,"."
		IDPB	C,AC10
		SOJN	AC6,OCPT9E	;BACK FOR EXTENSION
		JRST	OCPT9Z		;[1141]DONE

	OCPT9S:	ILDB	C,AC5		;PICK UP A CHAR
		LDB	C,PTR.67##	; CONVERT TO ASCII
		CAIE	C," "		;IGNORE SPACES
		IDPB	C,AC10		;STORE IN E BLOCK
		CAIE	AC6,4		;IS IT TIME FOR "."?
		SOJN	AC6,OCPT9S	;NO, LOOP 'TIL DONE
		JUMPE	AC6,OCPT9Z	;[1141]ALL DONE
		MOVEI	C,"."
		IDPB	C,AC10
		SOJN	AC6,OCPT9S	;BACK FOR EXTENSION
	OCPT9Z:	SETZ	C,		;[1141]
		IDPB	C,AC10		;[1141]STORE NUL AT END

 REP 260/63	;11C13
		COMPT.	AC1,			; [431] OPEN FILE
 WIT
	;**;[1140] At OCPT10+55L
		TXNN	AC16,OPN%EX		;[1140] IF OPEN EXTEND
		  JRST	NOXTND			;[1140] ELSE SKIP
		PUSH	PP,.JBFF		;[1140] SAVE .JBFF
		HLRZ	AC11,D.BL(I16)		;[1140] AND PNT IT TO BUFFER LOCATION
		MOVEM	AC11,.JBFF		;[1140] PA1050 MAKES BUFFER RING THERE
	NOXTND:	COMPT.	AC1,			; [431] OPEN FILE
		  TDZA	AC11,AC11		;[1140] CLEAR AC11 TO FLAG FAILURE
		SETOI	AC11,			;[1140] ELSE, FLAG SUCCESS
		TXNE	AC16,OPN%EX		;[1140] OPEN EXTEND?
		  POP	PP,.JBFF		;[1140] RESTORE END OF CORE PNTR
		SKIPN	AC11			;[1140] SKIP RETURN IF SUCCESS
 SUM 115500