Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99g-bb - mount.c09
There is 1 other file named mount.c09 in the archive. Click here to see a list.
 REP 39/1	;09C1
		MOUEDT==:0056			;EDIT LEVEL
 WIT
		MOUEDT==:0057			;EDIT LEVEL
 INS 128/3	;09C2
	0057	Redo code on TTYRSC to handle line continuation.
		SPR 10-34857 GCO 10091 13-Sep-84 /LWS

 REP 4/4	;09C3
		XP	TTYSIZ,<^D200/5>+1 ;TTY buffer size (200 characters)
 WIT
		XP	TTYSIZ,<^D500/5>+1 ;[57] TTY buffer size (500 characters)
 INS 12/26	;09C4
	;**;[57] Redo code in TTYRSC to handle line continuation. /LWS
 REP 18/26	;09C5
		MOVEI	T3,TTYSIZ*5		;SET UP BYTE COUNT
 WIT
		MOVEI	T3,<TTYSIZ*5>-1		;[57] SET BYTE COUNT W/ROOM FOR <LF>
 REP 24/26	;09C6
		MOVEI	T4,1			;GET A BIT
		LSH	T4,(T1)			;POSITION IT
		CAIE	T1,.CHDEL		;<RUBOUT>?
		TDNE	T4,[$BCS <3,7,12,13,14,22,24,25,27,32,33>] ;A BREAK CHARACTER?
		JRST	TTYR.2			;YES - FINISH UP
		IDPB	T1,T2			;STORE IT
		SOJG	T3,TTYR.1		;LOOP FOR MORE

	TTYR.2:	MOVEI	T1,.CHLFD		;GET A LINE FEED
		IDPB	T1,T2			;TERMINATE COMMAND
		POPJ	P,			;RETURN
 WIT
		CAIN	T1,"-"			;[57] NO, POSSIBLE LINE CONTINUATION?
		JRST	TTYR.2			;[57] YES, GO PROCESS NEXT CHAR
		PUSHJ	P,BRKCHR		;[57] NO, CHECK FOR BREAK CHAR
		JUMPT	TTYR.4			;[57] IF SO, GO TERMINATE COMMAND
		PUSHJ	P,PUTCHR		;[57] ELSE PUT CHAR IN BUFFER
		JRST	TTYR.1			;[57] GET NEXT CHAR

	;Here on possible line continuation.

	TTYR.2:	INCHWL	T1			;[57] GET NEXT CHAR
		CAIE	T1," "			;[57] EAT SPACES,
		CAIN	T1,.CHTAB		;[57] TABS, AND
		JRST	TTYR.2			;[57] CARRIAGE RETURNS.
		CAIN	T1,.CHCRT		;[57]
		JRST	TTYR.2			;[57]
		PUSHJ	P,BRKCHR		;[57] REAL LINE CONTINUATION?
		JUMPF	TTYR.3			;[57] IF NOT, GO PUT DASH IN BUFFER
		OUTCHR	["#"]			;[57] IT IS, OUTPUT CONTINUATION PROMPT
		JRST	TTYR.1			;[57] GO GET MORE INPUT

	;Here to put dash in buffer that wasn't start of line continuation

	TTYR.3:	MOVE	T4,T1			;[57] SAVE NON-BREAK CHAR
		MOVEI	T1,"-"			;[57] GET DASH
		PUSHJ	P,PUTCHR		;[57] PUT IT IN BUFFER
		MOVE	T1,T4			;[57] GET NON-BREAK CHAR BACK
		PUSHJ	P,PUTCHR		;[57] PUT IT IN BUFFER, TOO
		JRST	TTYR.1			;[57] LOOP FOR MORE CHARS

	;Terminate command buffer with <LF> for parser.

	TTYR.4:	MOVEI	T1,.CHLFD		;[57] GET A LINE FEED
		IDPB	T1,T2			;TERMINATE COMMAND
		POPJ	P,			;RETURN

	;Put char in T1 into command buffer.

	PUTCHR:	IDPB	T1,T2			;[57] STORE CHAR
		SOSL	T3			;[57] LAST CHAR ALREADY STORED?
		POPJ	P,			;[57] NO, RETURN
		OUTSTR	[ASCIZ\
	?MOUNT command too long.\]		;[57] TELL POOR GUY
		CLRBFI				;[57] FLUSH REST OF INPUT (TYPEAHEAD TOO)
		MONRT.				;[57] EXIT
		JRST	.-1			;[57] PREVENT CONTINUES

	;[57] Routine to check if char in T1 is a break character

	BRKCHR:	MOVEI	T4,1			;[57] GET A BIT
		LSH	T4,(T1)			;[57] POSITION IT
		CAIE	T1,.CHDEL		;[57] <RUBOUT>?
		TDNN	T4,[$BCS <3,7,12,13,14,22,24,25,27,32,33>] ;[57] A BREAK CHARACTER?
		TDZA	TF,TF			;[57] NO
		SETOM	TF			;[57] YES
		POPJ	P,			;[57] RETURN
 SUM 117460