Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99g-bb - forio.c12
There is 1 other file named forio.c12 in the archive. Click here to see a list.
 REP 3/1	;12C1
		TV	FORIO	I/O ROUTINES,10(4215)
 WIT
		TV	FORIO	I/O ROUTINES,10(4221)
 INS 870/2	;12C2
	4217	RJD	16-Jul-85	SPR:10-35226
		When BACKSPACing a very large record, a half word calculation
		for the file pointer is insufficient.

	4220	JLC	22-July-85
		Fix initial TTY output, which was throwing away all vertical
		motion control, instead of reducing the number of LFs by 1,
		as in V7.

	4221	MRB	25-JUL-85	SPR:10-35231
		When processing format specifier FOROTS realizes that ORBUF 
		must be expanded. When expanding ORBUF we neglected to ask 
		for enough space. Routine: OMEXP

 REP 75/15	;12C3
	OMEXP:	PUSHJ	P,%PUSHT	;SAVE T ACS
 WIT
	OMEXP:	PUSHJ	P,%PUSHT	;SAVE T ACS 
		MOVM	T3,T5		;[4221]T5 CONTAINS THE  MIN # CHARS TO EXPAND.
 REP 89/30	;12C4
		MOVE	T1,CCCTAB-" "(T3) ;[4100]GET COMPATIBILITY FLAGS
		TDNE	T1,%FLIDX	;[4100]ANY FLAGS THE SAME?
		 $ECALL	CFC		;[4100]YES. OUTPUT MESSAGE IF INCOMPATIBLE
	NOSCC:	CAIG	T3,"3"		;IF OUT OF RANGE, TREAT AS SPACE
 WIT
	NOSCC:	MOVE	T1,CCCTAB-" "(T3) ;[4100]GET COMPATIBILITY FLAGS
		TDNE	T1,%FLIDX	;[4100]ANY FLAGS THE SAME?
		 $ECALL	CFC		;[4100]YES. OUTPUT MESSAGE IF INCOMPATIBLE
		CAIG	T3,"3"		;IF OUT OF RANGE, TREAT AS SPACE
 REP 98/30	;12C5
		JUMPE	T5,%POPJ	;NO OUTPUT IF NO CHARS
 WIT
		TXNN	T1,D%SEOL	;[4220] CRLF PRECEDING THIS RECORD?
		 JRST	NOALTC		;[4220] NO
		MOVE	T4,CCALTP-" "(T3) ;[4220] GET ALT PNTR TO CC STRING
		MOVE	T5,CCALTL-" "(T3) ;[4220] AND ALT COUNT
	NOALTC:	JUMPE	T5,%POPJ	;[4220] NO OUTPUT IF NO CHARS
 REP 85/31	;12C6
	;ROUTINE TO NORMALIZE CRLF POSITION, BY TYPING PENDING CRLF, IF ANY
	;
	;WHEN WRITING A FILE WITH CC=TRANSLATED, THE CRLFS COME BEFORE THE
	;RECORDS INSTEAD OF AFTER THEM.  THE REST OF THE WORLD PUTS CRLFS
	;AFTER THEIR RECORDS.  THIS ROUTINE IS CALLED TO GET IN SYNC WITH THE
	;OUTSIDE WORLD WHEN NECESSARY.
	;
	;CALLED:
	;	WHEN SWITCHING FROM OUTPUT TO INPUT ON TTY IF $ FORMAT NOT SPECIFIED.
	;	WHEN CLOSING THE TTY.
	;	WHEN DIVERTING ERROR MESSAGES TO A FILE

	%OCRLF:	MOVX	T0,D%SEOL	;Suppress next CRLF
		IORM	T0,FLAGS(D)

		MOVEI	T1,2		;SET BYTE COUNT, PTR
		MOVEM	T1,CHRCNT
		MOVE	T1,[POINT 7,%CRLF] ;POINT TO CRLF
		MOVEM	T1,CHRPTR

		SETZM	G.PRP		;SET NO PROMPT STRING AVAILABLE
		PJRST	PUTSTR		;OUTPUT THE CRLF
 WIT
	;[4220] THE FOLLOWING POINTERS AND COUNTS ARE USED IF DOLLAR FORMAT
	;[4220] HAS BEEN SPECIFIED. THE CR AND ONE LF (IF ANY) IS REMOVED FROM
	;[4220] EACH STRING.
	CCALTP:	0				;[4220] SPACE :
		0				;[4220] ! :
		0				;[4220] " :
		0				;[4220] # :
		0				;[4220] $ :
		0				;[4220] % :
		0				;[4220] & :
		0				;[4220] ' :
		0				;[4220] ( :
		0				;[4220] ) :
		POINT 7,[BYTE(7)%DC3]		;[4220] * : DC3
		0				;[4220] + : 
		POINT 7,[BYTE(7)%DC1]		;[4220] , : DC1
		POINT 7,[BYTE(7)%LF,%LF]	;[4220] - : LF,LF
		POINT 7,[BYTE(7)%DC2]		;[4220] . : DC2
		POINT 7,[BYTE(7)%DC4]		;[4220] / : DC4
		POINT 7,[BYTE(7)%LF]		;[4220] 0 : LF
		POINT 7,[BYTE(7)%FF]		;[4220] 1 : FF
		POINT 7,[BYTE(7)%DC0]		;[4220] 2 : DC0
		POINT 7,[BYTE(7)%VT]		;[4220] 3 : VT
		0				;[4220] SPACE : 

	CCALTL:	0	;[4220] SPACE :
		0	;[4220] ! :
		0	;[4220] " :
		0	;[4220] # :
		0	;[4220] $ :
		0	;[4220] % :
		0	;[4220] & :
		0	;[4220] ' :
		0	;[4220] ( :
		0	;[4220] ) :
		1	;[4220] * : DC3
		0	;[4220] + : 
		1	;[4220] , : DC1
		2	;[4220] - : LF,LF
		1	;[4220] . : DC2
		1	;[4220] / : DC4
		1	;[4220] 0 : LF
		1	;[4220] 1 : FF
		1	;[4220] 2 : DC0
		1	;[4220] 3 : VT
		0	;[4220] SPACE : LF
 INS 2/33	;12C7
	;ROUTINE TO NORMALIZE CRLF POSITION, BY TYPING PENDING CRLF, IF ANY
	;
	;WHEN WRITING A FILE WITH CC=TRANSLATED, THE CRLFS COME BEFORE THE
	;RECORDS INSTEAD OF AFTER THEM.  THE REST OF THE WORLD PUTS CRLFS
	;AFTER THEIR RECORDS.  THIS ROUTINE IS CALLED TO GET IN SYNC WITH THE
	;OUTSIDE WORLD WHEN NECESSARY.
	;
	;CALLED:
	;	WHEN SWITCHING FROM OUTPUT TO INPUT ON TTY IF $ FORMAT NOT SPECIFIED.
	;	WHEN CLOSING THE TTY.
	;	WHEN DIVERTING ERROR MESSAGES TO A FILE

	%OCRLF:	MOVX	T0,D%SEOL	;Suppress next CRLF
		IORM	T0,FLAGS(D)

		MOVEI	T1,2		;SET BYTE COUNT, PTR
		MOVEM	T1,CHRCNT
		MOVE	T1,[POINT 7,%CRLF] ;POINT TO CRLF
		MOVEM	T1,CHRPTR

		SETZM	G.PRP		;SET NO PROMPT STRING AVAILABLE
		PJRST	PUTSTR		;OUTPUT THE CRLF

 REP 72/57	;12C8
		SUBI	T1,(P3)		;CALC DESIRED FILE POINTER
 WIT
		SUB	T1,P3		;[4217] CALC DESIRED FILE POINTER
 SUM 172059