Trailing-Edge
-
PDP-10 Archives
-
SRI_NIC_PERM_SRC_3_19910112
-
mit/monitor/ttptdv.mac
There are 19 other files named ttptdv.mac in the archive. Click here to see a list.
;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 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
; THIS MODULE CONTAINS THE CODE REQUIRED TO SUPPORT PTY'S.
IFN .PTFLG,< ;IF THIS CODE WANTED
SUBTTL PTY DEVICE DEPENDENT CODE
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: MOVE T3,TTOCT(T2) ;GET OUTPUT COUNT
CAIN T3,1 ;BUFFER WAS EMPTY BEFORE THIS CHAR?
JRST [ SETONE TTDD1,(T2) ;NOTE OUTPUT EVENT
JRST .+1]
LDB T1,TTOIN(T2) ;CHECK CHAR BEING OUTPUT
ANDI T1,177
CAIN T1,.CHLFD ;END OF LINE?
CALL CHKPT1 ;MAYBE POKE CONTROLLING JOB
RET
;PTYCTM - CALLED PERIODICALLY BY TTCH7 TO SEE IF OUTPUT START NEEDED
; T2/ DYNAMIC DATA PTR
; RETURN +2 TO PREVENT NORMAL OUTPUT START SEQUENCE
PTYCTM: SKIPG TTOCT(T2) ;YES, ANY OUTPUT HERE?
RETSKP ;NO
CALL CHKPT1 ;DO THE WORK
RETSKP
CHKPT1: CALL CHKBKO ;PERHAPS WAKEUP FORK WAITING FOR OUTPUT
JE TTDD1,(T2),R ;RETURN IF NO OUTPUT EVENT RECENTLY
SETZRO TTDD1,(T2) ;ONCE ONLY
LOAD T1,TINTL,(T2) ;GET LINE NUMBER
CALL TTYPTY ;CONVERT OT PTY NUMBER
CALL PTYFOU ;NOTE PTY OUTPUT EVENT
RET
;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
JRST CHKPT1 ;YES, START IT
;CHECK PTY FOR OUTPUT POSSIBLE
;IF THE PTY HAS BEEN CLOSED, OUTPUT SHOULD NOT BE DONE BECAUSE
;NOTHING WILL EVER EMPTY THE OUTPUT BUFFER
; T2/ DYNAMIC PT
; RETURN +1: NO OUTPUT
; +2: OUTPUT OK
CKPTOU: SAVEAC <T2>
DYNST ;GET LINE NUMBER
CALL PTYSKO ;IS IT OPEN?
RET
RETSKP
;LINE IS A PTY. SEE IF PTY LOGINS ARE ALLOWED
TTC7S2: TXNE T1,SF%PTY ;SEE IF PTY LOGINS ALLOWED
JRST RTRUE ;YES, GO LOGIN IN
HRROI 1,[ASCIZ/
?LOGGING IN OVER PTY'S IS CURRENTLY DISALLOWED.
/]
CALL TTEMSS
JRST RFALSE ;FAIL
;DEVICE DEPENDENT CODE FOR TCI
TCIPTY: CALL CHKPTA ;POKE OUTPUT FIRST
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
> ;END IFN .PTFLG SEVERAL PAGES BACK