Google
 

Trailing-Edge - PDP-10 Archives - BB-Y393J-SM - monitor-sources/ttptdv.mac
There are 19 other files named ttptdv.mac in the archive. Click here to see a list.
;<4-1-FIELD-IMAGE.MONITOR>TTPTDV.MAC.2, 25-Feb-82 20:51:17, EDIT BY DONAHUE
;UPDATE COPYRIGHT DATE
;<4.MONITOR>TTPTDV.MAC.12,  3-Jan-80 08:10:41, EDIT BY R.ACE
;UPDATE COPYRIGHT DATE
;<4.MONITOR>TTPTDV.MAC.11,  2-Nov-79 16:58:47, EDIT BY MURPHY
;<4.MONITOR>TTPTDV.MAC.10,  2-Nov-79 13:41:23, EDIT BY MILLER
;ACCOUNT FOR STADYN SKIPPING IN PTYCTM
;<4.MONITOR>TTPTDV.MAC.9, 31-Oct-79 14:55:40, EDIT BY MURPHY
;FASTER WAKEUP FOR OUTPUT EVENTS
;<4.MONITOR>TTPTDV.MAC.7, 19-Sep-79 14:53:21, EDIT BY MURPHY
;CHANGE VECTOR OFFSET NAMES
;<4.MONITOR>TTPTDV.MAC.6, 11-May-79 15:34:27, EDIT BY MILLER
;SET PARITY AT VOPAR	;TCOUT - ADD PARITY TO CHARACTER

;<4.MONITOR>TTPTDV.MAC.5, 11-Mar-79 13:16:49, EDIT BY KONEN
;UPDATE COPYRIGHT FOR RELEASE 4
;<4.MONITOR>TTPTDV.MAC.4,  2-Feb-79 23:41:59, Edit by MCLEAN
;ADD VSFEXO FOR FRONT-END XOFF RECOGNITION	;ENABLE/DISABLE FRONT-END XOFF RECOGNITION

;<4.MONITOR>TTPTDV.MAC.3, 28-Dec-78 22:46:20, Edit by MCLEAN
;ADD VSTPLN STOP LINE	;STOP LINE

;<4.MONITOR>TTPTDV.MAC.2, 24-Oct-78 13:32:10, Edit by MCLEAN
;MAKE STRTO2 GO OKSKD1


;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1976,1977,1978,1979,1980,1981,1982 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

	SUBTTL PTY DEVICE DEPENDENT CODE

; THIS MODULE CONTAINS THE CODE REQUIRED TO SUPPORT PTY'S.
; IT MUST BE THE LAST MODULE IN TTYSRV BECAUSE IT CONTAINS
; THE END STATEMENTS AND IT IS ALWAYS REQUIRED TO HAVE
; PTY'S.


	RESCD
TTPTVT=.
	TTDDLN			;LENGTH OF DYNAMIC DATA FOR THIS TYPE
	-1			;FIRST LINE OF THIS TYPE/-1 NO LINES
	IFIW!R			;VITBLS - INITALIZATION	;INITIALIZE TABLES AT SYSTEM STARTUP

	IFIW!R			;RESTART
	IFIW!TTCOB5		;CLEAR OUTPUT BUFFER
	IFIW!R			;SET LINE SPEED
	IFIW!TTRSP2		;READ TTY SPEED
	IFIW!R			;SET NON-TERM STATUS
	IFIW!R			;READ NON-TERM STATUS
	IFIW!TTSTO5		;REMOVE CHAR FROM OUTPUT BUFFER
	IFIW!STPAR5		;STPAR JSYS
	IFIW!R			;CHECK PHYSICAL LINE
	IFIW!TTXON2		;VXON - XON	;PROCESS XON FROM TERMINAL

	IFIW!TTYDE0		;DEASIGN DYNAMIC DATA
	TRO T1,200		;SET PARITY BIT
	IFIW!STRTO2		;START OUTPUT LINE
	IFIW!R			;XOFF
	IFIW!R			;XON
	IFIW!TTCQ1		;EMPTY BUFFER
	IFIW!R			;CARRIER ON
	IFIW!TTCH7		;CARRIER OFF
	IFIW!R			;HANGUP
	IFIW!R			;VXOFF - ^S	;PROCESS XOFF FROM TERMINAL

	IFIW!TTC7S2		;NO LOGINS
	IFIW!R			;STORE CHARACTER
	IFIW!R			;SEND CHARACTER
	IFIW!TTDAL7		;DEALLOCATE LINE
	IFIW!DLSSX2		;BUFFER OVERFLOW
	IFIW!R			;EMPTY BUFFER
	IFIW!R			;VTTMSG - DON'T DO TTMSG FOR SINGLE LINE	;DO TTMSG FOR ONE LINE?

	IFIW!R			;ENABLE/DISABLE DATASETS
	IFIW!R			;INIT
	IFIW!R			;30  CLEAR INPUT BUFFER
	IFIW!R			;31  DOBE
	IFIW!TCIPTY		;32  INPUT GA
	IFIW!TTSET1		;33  SET INIT. VALUES FOR A LINE
	IFIW!TTSBE1		;34  SOBE
	IFIW!TTOBE1		;35  WAKEUP IF OUTPUT BUFFER EMPTY
	IFIW!R			;VSNDA1 - DON'T DO TTMSG FOR SINGLE LINE	;SENDALL FOR ONE LINE

	IFIW!R			;VSNDAL - DON'T DO TTMSG FOR ALL LINES	;SENDALL FOR ALL LINES

				;VAJWCL - ADJUST WAKEUP CLASS	;ADJUST WAKEUP CLASS

	TRO T3,FC		;FORCE WAKEUP ON FORMATTING CONTROLS
	IFIW!R			;VSTPLN - STOP LINE	;STOP LINE

	IFIW!R			;VSFEXO - XOFF RECOGNTION	;ENABLE/DISABLE FRONT-END XOFF RECOGNITION


   IFN <.-TTVTMX>-TTPTVT,<PRINTX %%INVALID DEVICE DEPENDENT TABLE SIZE>
	SWAPCD

; STPAR JSYS DEVICE DEPENDENT CODE

STPAR5:	TXZ A,TT%PGM		;YES. CAN'T SET PAGE MODE THEN
	RET

	RESCD

;DEVICE DEPENDENT CODE FOR START OUTPUT LINE
;LINE IS PTY. 

STRTO2:	OKSKD1			;SET OK SKED
	LDB T1,TTOIN(T2)	;CHECK CHAR BEING OUTPUT
	ANDI T1,177
	CAIE T1,.CHLFD		;END OF LINE?
	JRST [	DYNST		;NO, DON'T START OUTPUT NOW
		IDIVI T2,^D36
		MOVE T3,BITS(T3)
		IORM T3,TTSOQ(T2) ;REQUEST LATER CHECK
		RET]
CHKPT1:	CALL CHKBKO		;PERHAPS WAKEUP FORK WAITING FOR OUTPUT
	DYNST			;YES. GET INTERNAL LINE NUMBER
	MOVE T1,T2		;T1/ LINE NUMBER
	IDIVI T2,^D36
	MOVE T3,BITS(T3)
	ANDCAM T3,TTSOQ(T2)	;CLEAR START NEEDED BIT
	CALL TTYPTY		;CONVERT OT PTY NUMBER
	CALL PTYFOU		;NOTE PTY OUTPUT EVENT
	RET

;PTYCTM - CALLED PERIODICALLY BY TTCH7 TO SEE IF OUTPUT START NEEDED
; T2/ DYNAMIC DATA PTR

PTYCTM:	SKIPG TTOCT(T2)		;YES, ANY OUTPUT HERE?
	RET			;NO
	JRST CHKPT1

;CHKPTA - CALLED WHEN FORK IS BLOCKING TO WAIT FOR SOME OUTPUT ACTIVITY
; IF LINE IS PTY, OUTPUT SHOULD BE STARTED IMMEDIATELY
; T2/ DYNAMIC DATA PTR

CHKPTA:	SAVET
	LOAD T1,TLTYP,(T2)
	CAME T1,TTLINV+TT.PTY	;A PTY?
	RET			;NO
	JRST CHKPT1		;YES, START IT
;LINE IS A PTY. SEE IF PTY LOGINS ARE ALLOWED

TTC7S2:	TXNE T1,SF%PTY		;SEE IF PTY LOGINS ALLOWED
	JRST TTC7SK		;YES, GO LOGIN IN
	HRROI 1,[ASCIZ/
?LOGGING IN OVER PTY'S IS CURRENTLY DISALLOWED.
/]
	CALLRET TTEMSS

;DEVICE DEPENDENT CODE FOR TCI

TCIPTY:	PUSH P,T2		;SAVE ADDRESS OF DYNAMIC DATA
	DYNST			;GET LINE NUMBER
	MOVE T1,T2		;T1/LINE NUMBER
	CALL TTYPTY		;CONVERT TO PTY NUMBER IN T1
	CALL PTYFIN		;NOTE PTY INPUT EVENT
	POP P,T2		;RESTORE ADDRESS OF DYNAMIC DATA
	RET

	TNXEND
	END