perm filename TINIDF.OLD[HST,NET] blob sn#787440 filedate 1985-02-27 generic text, type T, neo UTF8
;SRA:<FMF.WORK>TINIDF.MAC.7, 24-Sep-83 18:48:28, Edit by FMF
; Create from TTYINI.MAC



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

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 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:

    ttynumber = RECORD (* TTYNumber *)
		    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%BITS:		BLOCK 2		;See below
B%PRINT:	BLOCK 2		;Six letter DECNET node name
B%DEFL==:.-B%TTYTYPE		;Set length.

;Bits in B%BITS
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)

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
TTYBLK==1			;Start of TTYINI data for host