Google
 

Trailing-Edge - PDP-10 Archives - bb-m080z-sm - monitor-sources/ttydef.mac
There are 19 other files named ttydef.mac in the archive. Click here to see a list.
; Edit= 8977 to TTYDEF.MAC on 4-Oct-88 by JROSSELL, for SPR #21689
;Add support for optionally not flushing NULs when a terminal is in ASCII
;mode. 
; UPD ID= 8636, RIP:<7.MONITOR>TTYDEF.MAC.3,  11-Feb-88 18:55:32 by GSCOTT
;TCO 7.1218 - Update copyright date.
; *** Edit 7427 to TTYDEF.MAC by RASPUZZI on 31-Mar-87, for SPR #21551
; Prevent half duplex lines from hanging by changing the arbitrary value of
; MINCT1 so that TTFKW will be set before an XOFF shuts off TTY. This will
; allow the fork to wakeup and process the characters so that an XON can be
; sent.
; UPD ID= 2247, SNARK:<6.1.MONITOR>TTYDEF.MAC.26,  19-Jun-85 20:47:29 by MELOHN
;Add bit for CTERM mode switching markers.
; UPD ID= 1617, SNARK:<6.1.MONITOR>TTYDEF.MAC.25,  12-Mar-85 11:44:27 by NICHOLS
;Add a new word, TTLNUW, to the TDB for NRT's NRB pointer.  Sharing TTULL with
;TTLMAX worked in 5.1 by luck, no longer.
; UPD ID= 960, SNARK:<6.1.MONITOR>TTYDEF.MAC.24,   5-Nov-84 19:46:10 by PRATT
;TCO 6.1.1032 - Make TTYSRV compile independently:
;  Move conditional assembly code to TTYSRV
;  Remove DC, RP, and DZ terminal types
;  Remove TDCALx, put it back in TTYSRV
; UPD ID= 942, SNARK:<6.1.MONITOR>TTYDEF.MAC.23,   1-Nov-84 14:50:54 by PRATT
;Merge M60: tco 6.2238
;TCO 6.2238 - handle speed setting properly.
; UPD ID= 904, SNARK:<6.1.MONITOR>TTYDEF.MAC.22,  20-Oct-84 12:12:51 by PRATT
;TCO 6.1.1010 - Make sure TVTLEN is defined properly
; UPD ID= 741, SNARK:<6.1.MONITOR>TTYDEF.MAC.18,  17-Aug-84 09:45:14 by PAETZOLD
;TCO 6.1733 - No more NTTNVT and friends.
; UPD ID= 649, SNARK:<6.1.MONITOR>TTYDEF.MAC.17,   2-Jul-84 14:57:31 by MCINTEE
;Remove some obsolete CTERM flags, and add one new one.
; UPD ID= 480, SNARK:<6.1.MONITOR>TTYDEF.MAC.16,  30-Apr-84 09:40:27 by WEISBACH
;~6.0 - Add LAT Host terminal type to TDCALL definition. Add .LHFLG definition.
; UPD ID= 312, SNARK:<6.1.MONITOR>TTYDEF.MAC.15,   1-Feb-84 09:09:00 by MCINTEE
;Merge from M60:
; UPD ID= 3612, SNARK:<6.MONITOR>TTYSRV.MAC.141,   1-Feb-84 08:50:41 by MCINTEE
;TCO 6.1959 - Add support for two chracter escape sequences.
; UPD ID= 294, SNARK:<6.1.MONITOR>TTYDEF.MAC.14,  16-Jan-84 08:40:09 by MCINTEE
;Merge from M60:
; UPD ID= 3318, SNARK:<6.MONITOR>TTYSRV.MAC.138,  14-Dec-83 14:37:13 by PRATT
;TCO 6.1796 - Add TT%NTM and TT%NUM code for TLINK and TTMSG
; UPD ID= 181, SNARK:<6.1.MONITOR>TTYDEF.MAC.13,  27-Jul-83 15:00:54 by PAETZOLD
;More TCO 6.1733 - TCP Changes
; UPD ID= 180, SNARK:<6.1.MONITOR>TTYDEF.MAC.12,  26-Jul-83 16:28:10 by PAETZOLD
;TCO 6.1733 - TCP Changes
; UPD ID= 161, SNARK:<6.1.MONITOR>TTYDEF.MAC.11,  14-Jul-83 16:11:10 by CHALL
;Remove CSFLG (obsolete Cterm server flag)
; UPD ID= 107, SNARK:<6.1.MONITOR>TTYDEF.MAC.10,  18-Apr-83 13:14:40 by PAETZOLD
;TCO 6.1557 - TCP Merge
; UPD ID= 105, SNARK:<6.1.MONITOR>TTYDEF.MAC.9,  18-Apr-83 13:12:30 by PAETZOLD
; UPD ID= 1975, SNARK:<6.MONITOR>TTYSRV.MAC.127,  11-Mar-83 00:33:59 by MOSER
;TCO 5.1510 WAKE UP ON CR FOR HALF DUPLEX LINES
; UPD ID= 1883, SNARK:<6.MONITOR>TTYSRV.MAC.122,  27-Feb-83 22:09:45 by MURPHY
; Set page mode from bit in TTYPE1.
; UPD ID= 8, SNARK:<6.1.MONITOR>TTYDEF.MAC.6,   3-Feb-83 09:07:04 by MCI
;Put the MSKSTR definition of TTDBA under FTCTS also
; UPD ID= 7, SNARK:<6.1.MONITOR>TTYDEF.MAC.5,   2-Feb-83 09:14:22 by CHALL
;Make TT%XFF conflict with TT%DBA; put the latter under FTCTS
; UPD ID= 6, SNARK:<6.1.MONITOR>TTYDEF.MAC.3,   2-Feb-83 07:49:08 by MCINTEE
;TT%XFF conflict
; UPD ID= 5, SNARK:<6.1.MONITOR>TTYDEF.MAC.2,   2-Feb-83 07:39:16 by MCINTEE
;TCO 6.1485 - Fix TCO 6.1480, put TT%XFF in dynamic storage block.

;	COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1984, 1988.
;	ALL RIGHTS RESERVED.
;
;	THIS SOFTWARE IS FURNISHED UNDER A  LICENSE AND MAY BE USED AND  COPIED
;	ONLY IN  ACCORDANCE  WITH  THE  TERMS OF  SUCH  LICENSE  AND  WITH  THE
;	INCLUSION OF THE ABOVE  COPYRIGHT NOTICE.  THIS  SOFTWARE OR ANY  OTHER
;	COPIES THEREOF MAY NOT BE PROVIDED  OR OTHERWISE MADE AVAILABLE TO  ANY
;	OTHER PERSON.  NO  TITLE TO  AND OWNERSHIP  OF THE  SOFTWARE IS  HEREBY
;	TRANSFERRED.
;
;	THE INFORMATION IN THIS  SOFTWARE IS SUBJECT  TO CHANGE WITHOUT  NOTICE
;	AND SHOULD  NOT  BE CONSTRUED  AS  A COMMITMENT  BY  DIGITAL  EQUIPMENT
;	CORPORATION.
;
;	DIGITAL ASSUMES NO  RESPONSIBILITY FOR  THE USE OR  RELIABILITY OF  ITS
;	SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY DIGITAL.


;TTYDEF - DEFINITIONS FOR TERMINAL DRIVERS

	UNIVERSAL TTYDEF
	SALL
	SEARCH MACSYM,MONSYM,PROLOG
	SUBTTL DATA DEFINITIONS

;AC DEFINITIONS USED HEREIN

DEFAC (FX,Q3)			;FORK INDEX
;SAVELN - MACRO TO SAVE AC2 UPON ENTRY TO A ROUTINE AND RESTORE
;IT UPON EXIT. USED TO SAVE INTERNAL LINE NUMBER OR ADDRESS OF DYNAMIC
;DATA BECAUSE CALLERS ASSUME IT IS PRESERVED

;NOTE THAT IF A ROUTINE HAS BOTH SAVELN AND STKVAR, THE SAVELN MUST
;COME FIRST

	DEFINE SAVELN <
	JSP CX,.SAV22>		;SAVE T2

;MACRO TO GET STATIC LINE NUMBER FROM DYNAMIC DATA BASE.
;ASSUMES THAT T2/ ADDRESS OF DYNAMIC DATA
;PRESERVES ALL REGISTERS EXCEPT T2

DEFINE DYNST (AREG) <
   IFB <AREG>,<LOAD T2,TINTL,(T2)> ;;SIMPLE PROCEDURE
   IFNB <AREG>,<LOAD AREG,TINTL,(T2)> ;;FOR SPECIAL CASES
   >

;VARIENTS OF LOAD AND STOR WHICH AUTOMATICALLY CONVERT FROM
;DYNAMIC TO STATIC

DEFINE STALOD (AC,STR,XR)<
	LOAD CX,TINTL,XR	;;GET LINE NUMBER
	LOAD AC,STR,(CX)>	;;THEN DO LOAD

DEFINE STASTO (AC,STR,XR)<
	LOAD CX,TINTL,XR
	STOR AC,STR,(CX)>
;STATIC STORAGE - ONE WORD PER DEFINED LINE, WHETHER ACTIVE OR NOT
;WORDS ARE ACTUALLY DEFINED IN STG

;RS TTSTAT,NLINES
TT%FEM==1B0			;LINE IS REMOTE
TT%NTS==1B1			;DON'T SEND SYSTEM MESSAGES
TT%FXO==1B2			;LINE NEEDS XON
TT%CON==1B3			;CARRIER IS ON
TT%FSP==1B4			;LINE NEEDS SPEED SET
TT%FXF==1B5			;LINE NEEDS XOF
TT%IGI==1B6			;IGNORE INPUT WHEN LINE IS INACTIVE
TT%AUT==1B7			;LINE IS AUTO-SPEED
TT%XOC==1B8			;LINE NEEDS XON/XOFF CHARACTER (2020)
TT%FPK==1B8			; WAITING FOR FE POST (KL)
TT%SHU==1B9			;LINE IS SHUT OFF
TT%WSO==1B10			;LINE WAS SHUT OFF
TT%NTM==1B11			;LINE DOES NOT WANT MISC TERMINAL MESSAGES
TT%NUM==1B12			;LINE DOES NOT WANT UNPRIV'D TTMSG'S
MSKSTR TTFEM,TTSTAT,TT%FEM
MSKSTR TTNTS,TTSTAT,TT%NTS
MSKSTR TTFXO,TTSTAT,TT%FXO
MSKSTR TTCON,TTSTAT,TT%CON
MSKSTR TTFSP,TTSTAT,TT%FSP
MSKSTR TTFXF,TTSTAT,TT%FXF
MSKSTR TTIGI,TTSTAT,TT%IGI	;IGNORE INPUT WHEN LINE IS INACTIVE
MSKSTR TTAUT,TTSTAT,TT%AUT	;LINE IS AUTO-SPEED
MSKSTR TTXOC,TTSTAT,TT%XOC	;LINE NEEDS XON/XOFF CHARACTER OUTPUT
MSKSTR TTFPK,TTSTAT,TT%FPK	; FE TO POST
MSKSTR TTSHU,TTSTAT,TT%SHU
MSKSTR TTWSO,TTSTAT,TT%WSO	;LINE WAS SHUT OFF
MSKSTR TTNTM,TTSTAT,TT%NTM	;LINE DOES NOT WANT MISC TERMINAL MESSAGES
				; *NOTE* FOR FE LINES TTNTS CAN BE
				;	 SET/CLEARED WHEN USING TTNTM
MSKSTR TTNUM,TTSTAT,TT%NUM	;LINE DOES NOT UNPRIVD TTMSG'S
; 13 IS FREE
DEFSTR TTSTY,TTSTAT,17,4	;LINE TYPE
DEFSTR TTNOI,TTSTAT,19,2	;COUNT OF NOISE CHARACTERS ON INACTIVE LINE
DEFSTR TSFMC,TTSTAT,27,8	;MAX COUNT FOR FRONT END BUFFER
DEFSTR TTFBB,TTSTAT,35,8	;NUMBER OF ENTRIES IN TTBBUF
;RS TTSPWD,NLINES		;(INPUT SPEED,,OUTPUT SPEED
DEFSTR TTISP,TTSPWD,17,18	;INPUT SPEED
DEFSTR TTOSP,TTSPWD,35,18	;OUTPUT SPEED
;RS TTACTL,NLINES		;ADDRESS OF DYNAMIC DATA IF ACTIVE
				; OR -1 IF BECOMING ACTIVE
				; OR 0 IF INACTIVE
TTSHBK==1B0			;SHORT BLOCK
;RS TTCSAD,NLINES		;BITS FOR FUNCTIONS NEEDED
;RS TTCSTM,NLINES		;TIME FOR SCHEDULER TO CALL ROUTINE
;OFFSETS IN DYNAMIC DATA

TTFLG1==:0
TT%SAL==:1B0			;SENDALL BEING DONE TO THIS LINE
TT%SHT==1B1			;THIS IS A SHORT BLOCK
TT%MES==1B2			;THIS IS A SYSTEM MESSAGE BLOCK
TT%OTP==1B3			;OUTPUT IS ENROUTE TO THE LINE
TT%FWK==1B4			;FORCED WAKEUP
TT%SFG==1B5			;STOPPED ON END-OF-PAGE
TT%RFG==1B6			;REPEAT LAST CHARACTER (BKJFN)
TT%WFG==1B7			;BLOCKED ON INPUT
TT%PRM==1B8			;DON'T DEALLOCATE DYNAMIC DATA
TT%BAC==1B9			;PERMANENT AND BECOMING ACTIVE
TT%NXO==1B10			;PAUSE ON END-OF-PAGE MODE
TT%BKO==1B11			;FORK BLOCKED FOR OUTPUT EVENT ON THIS LINE
TT%NUS==1B12			;NET USER STATE
TT%DD1==1B13			;DEVICE DEPENDENT BIT
TT%NPM==1B14			;MCB NVT OLD PAGE MODE
TT%RXF==1B15			;HAVE RECEIVED XOFF ON LINE
TT%FLO==1B16			;FLUSHING OUTPUT AT TTSND
TT%HPO==1B17			;HIGH PRIORITY OUTPUT QUEUED
TT%DAL==1B18			;DEALLOCATE OF BLOCK REQUESTED
   FTCTS <
TT%DBA==1B19			;CTS Terminal Data Base is Active
				;**** OVERLAP !!!
   >
TT%XFF==1B19			;FORCE XOFF/XON STATUS TO FRONT-END
TT%SEC==1B20			;SERVER SHOULD ECHO
				;(CTERM CLEARS NORMAL ECHO BIT - TT%ECO)
TT%WKC==1B21			;WAKE-UP SET HAS CHANGED
TT%SPG==1B22			;PAGE STOP IS TURNED ON IN THE SERVER
				;(CTERM CLEARS NORMAL PAGE STOP BIT - TT%PGM)
TT%BIN==1B23			;(CTHSRV) CURRENT DATA MODE IS BINARY (0=ASCII)
TT%NUL==1B24			;[8977]ASCII mode NUL passthrough 
TT%LCK==77B35			;(30-35) COUNT OF LOCKS ON THIS BLOCK
MSKSTR TTSAL,TTFLG1,TT%SAL
MSKSTR TTSHT,TTFLG1,TT%SHT
MSKSTR TTMES,TTFLG1,TT%MES
MSKSTR TTOTP,TTFLG1,TT%OTP
MSKSTR TTFWK,TTFLG1,TT%FWK
MSKSTR TTSFG,TTFLG1,TT%SFG
MSKSTR TTRFG,TTFLG1,TT%RFG
MSKSTR TTWFG,TTFLG1,TT%WFG
MSKSTR TTPRM,TTFLG1,TT%PRM
MSKSTR TTBAC,TTFLG1,TT%BAC
MSKSTR TTNXO,TTFLG1,TT%NXO
MSKSTR TTBKO,TTFLG1,TT%BKO
MSKSTR TTNUS,TTFLG1,TT%NUS
MSKSTR TTDD1,TTFLG1,TT%DD1	;DEVICE DEPENDENT BIT
MSKSTR TTNPM,TTFLG1,TT%NPM
MSKSTR TTRXF,TTFLG1,TT%RXF
MSKSTR TTFLO,TTFLG1,TT%FLO
MSKSTR TTHPO,TTFLG1,TT%HPO
MSKSTR TTDAL,TTFLG1,TT%DAL
FTCTS <
MSKSTR TTDBA,TTFLG1,TT%DBA	;Canonical terminal database is active
>
MSKSTR TTXFF,TTFLG1,TT%XFF	;FORCE XOFF/XON STATUS TO FRONT-END
MSKSTR TTSEC,TTFLG1,TT%SEC
MSKSTR TTWKC,TTFLG1,TT%WKC
MSKSTR TTSPG,TTFLG1,TT%SPG
MSKSTR TTBIN,TTFLG1,TT%BIN
MSKSTR TTNUL,TTFLG1,TT%NUL	;[8977]ASCII NUL passthrough flag
MSKSTR TTLCK,TTFLG1,TT%LCK

TTDAT1==1
DEFSTR TYLMD,TTDAT1,4,2		;TERMINAL DATA MODE FOR LAST INPUT CHAR
DEFSTR TTOCN,TTDAT1,7,3		;COUNT OF EXTRA BUFFERS
DEFSTR TTOMX,TTDAT1,8,1		;EXTRA BUFFERS IN USE
DEFSTR TTTYP,TTDAT1,17,9	;TERMINAL TYPE
DEFSTR TINTL,TTDAT1,35,18	;INTERNAL LINE NUMBER (INDEX INTO STATIC DATA)

TTSAL1==2
DEFSTR TLTYP,TTSAL1,17,18	;LINE TYPE (SAME AS TTSTY)
DEFSTR TSALT,TTSAL1,23,6	;SENDALL TIMEOUT COUNT
DEFSTR TSALC,TTSAL1,35,12	;SENDALL CHARACTER COUNT

TSALCM==^D581			;SENDALL CHAR. COUNT MAX.
TTSAL2==3			;SENDALL BYTE POINTER

TTDEV==4
;DEVICE DEPENDET WORD SEE DEVICE MODULES FOR DEFINITIONS


TTBFRC==5
DEFSTR TOWRN,TTBFRC,7,8		;COUNT IN OUPUT BUFFER FOR WAKEUP
DEFSTR TTNIN,TTBFRC,11,4	;NO. INPUT BUFFERS
DEFSTR TTNOU,TTBFRC,15,4	;NUMBER OUTPUT BUFFERS
DEFSTR TIMAX,TTBFRC,25,10	;MAX BYTES IN INPUT BUFFER
DEFSTR TOMAX,TTBFRC,35,10	;MAX BYTES IN OUTPUT BUFFER

TTOCT==6			;NUMBER CHARACTERS IN OUTPUT BUFFER
TTOOUT==7			;POINTER FOR REMOVING CHAR FROM OUTPUT BUFFER
TTOIN==10			;POINTER FOR ENTERING CHAR INTO OUTPUT BUFFER

TTDAT2==11
DEFSTR TTUPC,TTDAT2,8,9		;UNPAUSE ON PAGE CHARACTER
DEFSTR TYLCH,TTDAT2,17,9	;LAST CHAR REMOVED FROM INPUT BUFFER
DEFSTR TPWID,TTDAT2,26,9	;PAGE WIDTH
DEFSTR TTPPC,TTDAT2,35,9	;PAUSE/UNPAUSE ON PAGE CHARACTER

TTICT==12			;NUMBER CHARACTERS IN INPUT BUFFER
TTIOUT==13			;POINTER FOR REMOVING CHAR FROM INPUT BUFFER
TTIIN==14			;POINTER FOR ENTERING CHAR INTO INPUT BUFFER

FCMOD1==15			;CONTROL CHARACTER OUTPUT CONTROL WORDS
FCMOD2==16			; (2 BITS PER CHARACTER)
;POSSIBLE VALUES FOR EACH CHARACTER
CCNONE==0			;SEND NOTHING
CCIND==1			;INDICATE VIA ^
CCSEND==2			;SEND ACTUAL CODE
CCSIM==3			;SIMULATE FORMAT ACTION

TTDPSI==17			;BIT FOR TERMINAL CODE SET IF DEFERRED INTERRUPT
TTPSI==20			;BIT FOR TERMINAL CODE SET IF INTERRUPT
TTLINK==21			;LINES LINKED TO (9 BITS PER LINE)

TTLPOS==22
DEFSTR TPGPS,TTLPOS,17,18	;CURRENT LINE POSITION WITHIN PAGE
DEFSTR TLNPS,TTLPOS,35,18	;CURRENT CHARACTER POSITION WITHIN LINE

TTFLGS==23
MSKSTR TTDUM,TTFLGS,TT%DUM	;DUPLEX MODE
MSKSTR TOFLG,TTFLGS,TT%OSP	;CTRL/O WAS TYPED
DEFSTR TPLEN,TTFLGS,17,8	;PAGE LENGTH
;(BITS ARE DEFINED IN MONSYM AS JFN MODE WORD)

TTFORK==24
DEFSTR TCJOB,TTFORK,17,18	;CONTROLLING JOB NUMBER
DEFSTR TWFRK,TTFORK,35,18	;NUMBER OF FORK IN INPUT WAIT ON THIS LINE

TTFRK1==25
DEFSTR TTPFK,TTFRK1,35,18	;FORK WHICH IS TOP FORK OF A SCTTY TREE
				;-1 IF NONE
DEFSTR TTPSFK,TTFRK1,17,18	;PSI FORK FOR NON CONTROL TTY PSI'S


TTCHR1==26			;WAKE UP CHARACTER MASK (ASCII CODES 0-31.)
TTCHR2==27			;WAKE UP CHARACTER MASK (ASCII CODES 32.-63.)
TTCHR3==30			;WAKE UP CHARACTER MASK (ASCII CODES 64.-95.)
TTCHR4==31			;WAKE UP CHARACTER MASK (ASCII CODES 96.-127.)

; ** TTCHR1,TTCHR2,TTCHR3  AND TTCHR4 SHOULD REMAIN TOGETHER IN THAT ORDER

TTFWTH==32			;WAKE UP FIELD WIDTH BYTE COUNT
DEFSTR TTIPSI,TTFWTH,11,6	;INPUT PSI LEVEL
DEFSTR TTOPSI,TTFWTH,17,6	;OUPUT PSI LEVEL
DEFSTR TTFCNT,TTFWTH,35,18	;BYTE COUNT FOR WAKE-UP (0=DISABLED FOR WAKE UP)

TTLINE==33			;LINE COUNTER
TTLMAX==34			;MAXIMUM OF TTLINE
TTFLG2==35			;TWO CHARACTER ESCAPE SEQUENCE
DEFSTR TTFLA,TTFLG2,0,1		;FIRST CHARACTER SEEN FLAG
DEFSTR TTETP,TTFLG2,4,3		;TYPE 
DEFSTR TTCH1,TTFLG2,11,7	;FIRST CHARACTER
DEFSTR TTCH2,TTFLG2,18,7	;SECOND CHARACTER

TTSVPD==36			;SAVED LINE SPEED
TTLNUW==37                      ;Net User Word
DEFSTR TTULL,TTLNUW,35,29	;POINTER TO NET USER NRB (NRT BLOCK)
DEFSTR TTUEC,TTLNUW,6,7		;NET USER ESCAPE CHAR

;LENGTHS OF DYNAMIC BLOCKS

TTDDLN==40			;DEFAULT DYNAMIC DATA SIZE
TVTLEN==TTDDLN+2		;SET LENGTH OF TVT TDB
TTMCLN==TTDDLN			;TDB LENGTH FOR MC LINES
MSGLEN==11			;SIZE OF MESSAGE BLOCK
;TTYPE1 - XON/XOFF and video characteristics

DEFSTR TT1PRQ,TTYPE1,0,1	;XON/XOFF HANDLING REQUIRED
DEFSTR DSPTB,TTYPE1,35,18	;ADDRESS OF DISPLAY CONTROL TABLE

;FIELDS OF JFN MODE WORD AS DEFINED IN MONSYM

REPEAT 0,<
TT%OSP==:1B0			;OUTPUT SUPPRESS
TT%MFF==:1B1			;MECHANICAL FORMFEED PRESENT
TT%TAB==:1B2			;MECHANICAL TAB PRESENT
TT%LCA==:1B3			;LOWER CASE CAPABILITIES PRESENT
TT%LEN==:177B10			;PAGE LENGTH
TT%WID==:177B17			;PAGE WIDTH
TT%WAK==:17B23			;WAKEUP FIELD
TT%WK0==:1B18			;WAKEUP CLASS 0 (UNUSED)
TT%IGN==:1B19			;IGNORE THE TT%WAK BITS ON SFMOD
TT%WKF==:1B20			;WAKEUP ON FORMATING CONTROL CHARS
TT%WKN==:1B21			;WAKEUP ON NON-FORMATTING CONTROLS
TT%WKP==:1B22			;WAKEUP ON PUNCTUATION
TT%WKA==:1B23			;WAKEUP ON ALPHANUMERICS
TT%ECO==:1B24			;ECHOS ON
TT%ECM==:1B25			;ECHO MODE
TT%ALK==:1B26			;ALLOW LINKS
TT%AAD==:1B27			;ALLOW ADVICE (NOT IMPLEMENTED)
TT%DAM==:3B29			;DATA MODE
.TTBIN==:0			;BINARY
.TTASC==:1			;ASCII
.TTATO==:2			;ASCII AND TRANSLATE OUTPUT ONLY
.TTATE==:3			;ASCII AND TRANSLATE ECHOS ONLY
TT%UOC==:1B30			;UPPER CASE OUTPUT CONTROL
TT%LIC==:1B31			;LOWER CASE INPUT CONTROL
TT%DUM==:3B33			;DUPLEX MODE
.TTFDX==:0			;FULL DUPLEX
.TT0DX==:1			;NOT USED, RESERVED
.TTHDX==:2			;HALF DUPLEX (CHARACTER)
.TTLDX==:3			;LINE HALF DUPLEX
TT%PGM==:1B34			;PAGE MODE
TT%CAR==:1B35			;CARRIER STATE
>
;MSKSTR TTOSPX,0,TT%OSP		;POINTER TO OUTPUT-SUPP BIT RELATIVE TO NOWHERE
MSKSTR TTWIDX,0,TT%WID		;DITTO WIDTH FIELD
MSKSTR TTLENX,0,TT%LEN		;DITTO LENGTH FIELD
MSKSTR TTDAM,TTFLGS,TT%DAM
MSKSTR TTECO,TTFLGS,TT%ECO
;LOCAL PARAMETERS

MXFECC==50			;MAX CHARACTERS FOR A FE LINE IN -11

;FIELDS IN TTBBUF

DLSRCF==:400			;DLS RECEIVER FLAG, DATAI WORD
TTNCF==1B19			;FLAG - CHARACTER CAME FROM NETWORK
REPEAT 0,<
TTSCF==1B20			;FLAG - CHARACTER CAME FROM STI
>
TTPIRQ==1B23			;OUTPUT INTERRUPT REQUEST (SOFTWARE)
TTOIRQ==1B24			;OUTPUT INTERRUPT REQUEST (SOFTWARE)
DLSCXF==:1B25			;CARRIER XITION FLAG (SOFTWARE)
CARONB==:1B33

TTXECO==1B27			;INPUT STREAM - CHARACTER ALREADY ECHOED
MAXBBC==^D20			;MAX ENTRIES ALLOWED IN BIGBUF FOR THIS
				; LINE
MXBBC1==5			;WHEN AN X-ON IS ALLOWED AGAIN
MINICT==30			;WHEN TO SEND AN X-OFF
MINCT1==MINICT+20		;[7427] When to force wakeup before XOFF
MINXON==20			;WHERE TO SEND XON
XOFFC=="S"-100			;THE X-OFF CODE (TO SEND)
XONC=="Q"-100			;THE X-ON CODE (TO SEND)

TTLIND=="'"			;UPPER CASE INDICATION CHARACTER FOR OUTPUT
TTCIND=="^"			;CONTROL INDICATION CHARACTER FOR OUTPUT
TTFILL==0			;FILLER CHARACTER
PGMONC=="Q"-100			;XON - RESTART OUTPUT IN PAGE MODE (RECEIVED)
PGMOFC=="S"-100			;XOFF - STOP OUTPUT IN PAGE MODE (RECEIVED)
PGMOC2=="A"-100			;RESTART OUTPUT FROM PAUSE ON END-OF-PAGE
FLOCHR=="O"-100			;FLUSH OUTPUT CHARACTER - CTRL-O

TTOESC==400			;FUNCTION ESCAPE IN OUTPUT STREAM
TTOPFC==420			;PAGE FULL CODE IN OUTPUT STREAM
TTOMRK==421			;OUTPUT STREAM MARKER, CLEAR OUTPUT FLUSHING
TTOBIN==422			;(CTHSRV) MODE CHANGE FROM ASCII TO BINARY
TTOASC==423			;(CTHSRV) MODE CHANGE FROM BINARY TO ASCII

TABSIZ==:^D8			;STANDARD TAB SPACING
DFLWID==1			;OLD STYLE DEFAULT WIDTH
DFLLEN==1			;OLD STYLE DEFAULT LENGTH
LOWSPD==^D600			;HIGHEST SPEED WHERE NTTBL SUFFICES
;*** this is from MONSYM. It will be returned there when the time is right ***
;TTY MODE DEFINITIONS

.MORLW==:30			;READ WIDTH
.MOSLW==:31			;SET WIDTH
.MORLL==:32			;READ LENGTH
.MOSLL==:33			;SET LENGTH
.MOSIG==:36			;SET "IGNORE INPUT WHEN INACTIVE" BIT
.MORBM==:37			;READ 128 CHARACTER BREAK MASK

	MO%WN1==:776117,,777740	;BIT DEFINITIONS FOR NON-FORMATTING CONTROL
	MO%WN2==:0		;FOR ASCII CODES 40-777
	MO%WN3==:0		;FOR ASCII CODES 100-137
	MO%WN4==:20		;FOR ASCII CODES 137-177

	MO%WF1==:001260,,000420	;FORMATTING CONTROL BITS
	MO%WF2==:0		;FOR ASCII CODES 40-77
	MO%WF3==:0		;FOR ASCII CODES 100-137
	MO%WF4==:20		;FOR ASCII CODES 140-177

	MO%WP1==:000400,,400	;PUNCTUATION BIT DEFINITIONS
	MO%WP2==:777774,,001760	; FOR ASCII CODES 40-77
	MO%WP3==:400000,,000760	; FOR ASCII CODES 100-137
	MO%WP4==:400000,,000760	; FOR ASCII CODES 140-177

	MO%WA1==:400		;ALPHANUMERICS DEFINITIONS
	MO%WA2==:000003,,776000	; FOR ASCII CODES 40-77
	MO%WA3==:377777,,777000	; FOR ASCII CODES 100-137
	MO%WA4==:377777,,777020	; FOR ASCII CODES 140-177
.MOSBM==:40			;SET 128 CHARACTER BREAK MASK
.MORFW==:41			;READ FIELD WIDTH
.MOSFW==:42			;SET FIELD WIDTH
.MOXOF==:43			;SET/CLEAR XOFF/XON HANDLING
	.MOOFF==:0		;TURN OFF XON/XOFF PROCESSING
	.MOONX==:1		;TURN ON XON/XOFF PROCESSING
.MORXO==:44			;READ VALUE OF XOFF BIT
.MOSLC==:45			;SET LINE COUNTER
.MORLC==:46			;READ LINE COUNTER
.MOSLM==:47			;SET LINE COUNTER MAXIMUM
.MORLM==:50			;READ LINE COUNTER MAXIMUM
.MOTPS==:51			;PSI FOR NON-CONTROLLING TERMINAL
.MOPCS==:52			;SET PAGE PAUSE CHARACTER
.MOPCR==:53			;READ PAGE PAUSE CHARACTER

.MOCSC==:54    			;SET/CLEAR CAPABILITIES IN THE SERVER
	MO%EDL==1B0		;ENABLE/DISABLE THE DELETE FUNCTION
	MO%ECW==1B1		;ENABLE/DISABLE THE CONTROL-W FUNCTION
	MO%ECU==1B2		;ENABLE/DISABLE THE CONTROL-U FUNCTION
	MO%ECR==1B3		;ENABLE/DISABLE THE CONTROL-R FUNCTION
	MO%ECV==1B4		;ENABLE/DISABLE THE CONTROL-V FUNCTION
	MO%ECY==1B5		;ENABLE/DISABLE THE CONTROL-Y FUNCTION)
	MO%EES==1B9		;ENABLE/DISABLE ESCAPE SEQUENCE RECOGNITION
.MORSC==:55			;READ THE SERVER'S CAPABILITIES
.MOSES==:56			;SET/DISABLE CTERM ESCAPE SEQUENCE
.MORES==:57			;READ THE CURRENT CTERM ESCAPE SEQUENCE
.MOSPI==:60			;SET PROMPT AND INITIAL DATA FOR NEXT READ
	MO%SIN==:0		;OFFSET OF COUNT WORD
	MO%SIP==:1		;OFFSET OF PROMPT POINTER
	MO%SID==:2		;OFFSET OF DATA STRING POINTER
	MO%SIL==:3		;OFFSET OF LOW WATER POINTER
	MO%SIZ==:4		;COUNT OF ARGUMENTS ABOVE
.MOSET==:61			;SET/CLEAR ECHOING OF TERMINATOR CHARACTER
.MORET==:62			;READ SETTING OF ECHO TERMINATOR FLAG
	END