perm filename TINIDF.MAC[HST,NET] blob sn#807636 filedate 1985-10-12 generic text, type T, neo UTF8
;<FINGER.SOURCES>TINIDF.MAC.11, 26-Apr-85 11:49:51, Edit by FMF
; Add B%DIAL
;<FINGER.SOURCES>TINIDF.MAC.10, 24-Apr-85 00:35:07, Edit by FMF
; Add B%EXISTS
;<FINGER.SOURCES>TINIDF.MAC.9, 23-Apr-85 17:48:38, Edit by FMF
; Add DEFBLK
;<FINGER.SOURCES>TINIDF.MAC.7, 27-Mar-85 12:05:45, Edit by FMF
; Make B%BITS two words again, put B%TERMCAP at end to make upwardly compat.
;<FINGER.SOURCES>TINIDF.MAC.6, 26-Mar-85 14:37:24, Edit by FMF
; Boost up B%TERMCAP to fit in the termcap *string*
;<FINGER.SOURCES>TINIDF.MAC.5, 25-Mar-85 13:59:14, Edit by FMF
;<FINGER.SOURCES>TINIDF.MAC.4, 24-Mar-85 23:08:37, Edit by FMF
; Add B%TERMCAP (snarf second word of B%BITS)
;<FINGER.SOURCES>TINIDF.MAC.3, 24-Mar-85 18:45:03, Edit by FMF
; Add B%DEFAULTS
;SRA:<FMF.WORK>TINIDF.MAC.7, 24-Sep-83 18:48:28, Edit by FMF
; Create from TTYINI.MAC

UNIVERSAL TINIDF - Definitions for TTYINI

COMMENT \

TTYINI.NET-BIN File format:

Page 0:
	Word 0:  TTYINI version number of file (VERSION).
	Word 1:  Size of blocks in TTYINI entries (BLKSIZ).
	Words 2-511:  Net pointers, indexed by net number.  Each pointer
		      points to a page (called a NET page) in the file.
		      A word of all ones is a null pointer (symbolic address
		      NETADR).

NET pages (mapped at NETPAG):
	Words 0-511:  Host pointers, indexed by host number.  These pointers
		      point to the TTYINI data for each host, and are page 
		      numbers (HOST pages).  A word of all ones is a null
		      pointer (symbolic address NETPGA).  If not -1 but the
		      left half is nonzero then this is a pointer to another
		      host.

HOST pages (mapped at HSTPAG):
	Word 0:  Number of TTYINI blocks for this host (number of lines on 
	         host, symbolic name NUMTTY).
	Words 1-end:  TTYINI blocks (TTYBLK).

TTYINI blocks:

Each line has an associated terminal block of the following format:

TYPE
    ttynumber = RECORD (* TTYNumber *)
		    NetNumber,
		    HostNumber:  9bit integer unsigned;
		    LineNumber:  short integer unsigned; 
		END (* TTYNumber is a word of net, host,, line number *)
    directiontype = (toleft, toright, acrossglass, facing, 
		     diagonally-opposite, behind, acrosspartition, unused);
		    (* For fing/neighbor *)
    locationtype =  (ceras105, ceraslobby, cerasother, terman104,
		     termanother, termanlobby, dialin, gandalf, ethernvt,
		     arpanvt, decnvt, internetnvt, pty, erl206, meyer,
		     larkin);	    (* Typical locations *)
    flagtype =      (consultant, assignable, overhead, formfeed, lowercase,
		     tabs, pagepause, commandpause, raise, flag);
    tty = RECORD (* Tty *)
	      ttytype,		    (* Terminal type number, or -1 if ? *)
	      defttytype,	    (* Default type number or -1 if ? *)
	      length,		    (* Terminal length or -1 if ? *)
	      width:     integer;   (* Terminal width or -1 if ? *)
				    (* Total 4 wds *)
	      address:   PACKED ARRAY[1..30] OF char;
				    (* String for finger.  6 wds *)
	      location:  locationtype;  (* Where it is for finger.  1 wd *)
	      neighbors: PACKED ARRAY [directiontype] OF ttynumber;
				    (* For FINGER/NEIGHBORS.   8 wds *)
	      dplxmode:  (fullduplex, noduplex, halfduplex, linehduplex);
				    (* 1 wd *)
	      bits:     PACKED SET OF flagtype;
				    (* Bits.  2 wds currently *)
	      print-node: PACKED ARRAY [1..10] OF char;
				    (* 6 letter DECnet node name.  2 wds *)
	  END  (* Tty *)	(* 24 words, currently *)
\

; Definition of TTYINI.NET-BIN file format.

B%VNO==3			;Version number of this file's incarnation.
PHASE 0				;Definitions of TTY data blocks
				;N.B. All fields are -1 if unknown
B%TTYTYPE:	0		;Terminal type number
B%DEFTTYTYPE:	0		;Default terminal type number
B%LENGTH:	0		;Terminal length
B%WIDTH:	0		;Terminal width
B%ADDRESS:	BLOCK 6		;Packed Array [1..30] OF char
B%LOCATION:	0		;Unknown, CERAS105, CERASlobby, CERASother,
				;Terman104, Termanother, Dialin, Gandalf,
				;Ethernvt, Arpanvt, Decnvt, etc...
B%NEIGHBOR:	BLOCK 8		;Packed Array [direction] OF TTYNumber: 36
				;bit direction = (toleft, toright,
				;		  acrossglass, facing,
				;		  diagonally-opposite, behind,
				;		  acrosspartition, unused)
				;Each direction has the form:
				;    Bits 0-8:  Net number.
				;    Bits 9-17:  Host number.
				;    Bits 18-35:  Line number.
B%DPLXMODE:	0
B%BITS:		BLOCK 2		;See below
B%PRINT:	BLOCK 2		;Six letter DECNET node name
B%TERMCAP:	BLOCK 3		;TERMCAP type (14 chars max)
B%EXISTS:	BLOCK 1		;0 if this block exists, -1 if not
B%DEFL==:.-B%TTYTYPE		;Set length.
DEPHASE

;Bits in B%BITS (Note: can't use all 36 -- see BINRD in TTYINI.MAC)
B%CONSULTANT==	1B0		;Consultant's terminal (LOTS only)
B%ASSIGNABLE==	1B1		;Assignable by the Queue (LOTS only)
B%OVERHEAD==	1B2		;Not assignable by Queue (LOTS only)
B%FORMFEED==	1B3		;Terminal can do form feed
B%LOWERCASE==	1B4		;Terminal has lower case
B%TABS==	1B5		;Terminal can do tabs
B%PAGEPAUSE==	1B6		;Pause at end of page
B%COMMANDPAUSE==1B7		;Pause on command
B%RAISE==	1B8		;Uppercasify all input/output
B%FLAG==	1B9		;Flag uppercase letters
B%EXPRESS==	1B10		;Express terminal (LOTS only)
B%REFUSE==	1B11		;Refuse system messages
B%OPERATOR==	1B12		;Operator can login on this tty (LOTS only)
B%DIAL==	1B13		;This is a dial-up terminal
B%DEFAULTS==B%LOWERCASE!B%COMMANDPAUSE!B%PAGEPAUSE ;Some default to on

;Page 0 of TTYINI.NET-BIN
VERSIO==0			;Version number of TTYINI.NET-BIN
BLKSIZ==1			;Size of each TTY's block
NETADR==2			;Table of network page pointers

;Host pages
NUMTTY==0			;Number of lines on host
DEFBLK==1			;Default TTYINI block for this host
TTYBLK==1+B%DEFL		;Start of TTYINI data for host

END