Google
 

Trailing-Edge - PDP-10 Archives - BB-R595B-SM_11-9-85 - mcb/sc/scllc.m11
There are 16 other files named scllc.m11 in the archive. Click here to see a list.
.title	SCLLC
.ident	/X01090/
.enabl	lc
;
;
;                    COPYRIGHT (c) 1980, 1981, 1982
;                    DIGITAL EQUIPMENT CORPORATION
;                        Maynard, Massachusetts
;
;     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  which  is  not supplied by
;     DIGITAL.
;

;
; Some macros needed to properly specify the SC data base.
;
.macro	NMTNOD	num,nam
	.if	b,<num>
	n..=1			; Start counting
	.mexit
	.endc
	.if	gt,<num+0>
	.if	lt,<num-n..>
	.error	num;Node number out of sequence
	.mexit
	.endc
	.rept	<num-n..>
	NMTNOD	\n..
	.endr
	.endc
	.ASCIC	6,nam		; NMT_NAML,NMT_NAME / Node name
	.byte	0		; NMT_CHAN / Channel number
	.even
	.word	num		; NMT_ADDR / Node address
	.word	0		; NMT_NMXID / NMX identifier
	.iif eq,<n..-1>,vfy$ NMT.SZ
	n..=n..+1
.endm	NMTNOD

.macro	NMTLOO	num
	.rept	num
	NMTNOD	0
	.endr
.endm	NMTLOO

.macro	OT.ON	ot,on	; Determine length of object-to-name table
	L.OBJT=L.OBJT+1
.endm	OT.ON

.macro	ON.PN	on,pn	; Determine length of name-to-process table
	L.OBJN=L.OBJN+1
.endm	ON.PN

	L.OBJT=0
	L.OBJN=0
	SC$OBJ	OT.ON
	SC$PRO	ON.PN

.macro	.ASCIC	len,name
	.nchr	..n,<name>
	.byte	..n
	.ascii	\name\
	.rept	len-..n
		.byte	0
	.endr
.endm	.ASCIC

.macro	OT.ON	ot,on
	.byte	ot
	.ASCIC	6,<on>
	.iif eq,<n..>,vfy$ OTN.SZ
	n..=n..+1
.endm	OT.ON

.macro	ON.PN	on,pn
	.ASCIC	6,<on>
	.even
	.rad50	\pn\
	.iif eq,<n..>,vfy$ ONP.SZ
	n..=n..+1
.endm	ON.PN
;+
; LLC Data Base for Session Control
;-

.mcall	dat$

	dat$	dsr
	.byte	0		; SC_TICK  / Timer byte
	.byte	1		; SC_FLAGS / SC's status info (initially off)
	.byte	0		; SC_NSPIX / NSP's PIX
	.byte	0		; SC_NMPIX / NMX's PIX
	.byte	0		; SC_SNPIX / SC's NM PIX
	.byte	0		; SC_LLINK / Last logical link handled
	.byte	0		; SC_IPORT / Number of OPEN input ports
	.byte	SC.opn		; SC_RPORT / Needed number of OPEN input ports
	.word	0	 	; SC_LADDR / Local node address
	.word	0		; SC_HADDR / Host node address
	.word	0		; SC_SSIZE / NSP segment size
	.word	SC.tpt		; SC_LINKS / Maximum number of logical links
	.word	SC.nn		; SC_NODES / Maximum number of network nodes
	.word	SC.nln		; SC_LOOPS / Maximum number of loopback nodes
	.word	SC.itm		; SC_ITIME / Incoming connect timer value
	.word	SC.otm		; SC_OTIME / Outgoing connect timer value
	.word	L.OBJT		; SC_OTN_LEN / Type-to-name table length
	.word	L.OBJN		; SC_ONP_LEN / Name to process table length

		cor$d		    ; SC_OTN / Type-to-name table 
		n..=0
		SC$OBJ	OT.ON
		end$

		cor$d		    ; SC_ONP / Name-to-process table
		n..=0
		SC$PRO	ON.PN
		end$

		cor$d		    ; SC_LLT / Logical link table
		n.. = 0
		.rept	SC.tpt
		  .byte	0		; L_STATE / Link state
		  .byte	0		; L_FLAGS / Processing flags
		  .byte	0		; L_ULA   / User link address
		  .byte	n..		; L_LLA   / Logical link address
		  .byte	0		; L_PID   / Port ID
		  .byte	0		; L_PIX   / User process index
		  .word	0		; L_RNA   / Remote node address
		  .word	0		; L_CHN   / Channel number
		  .word 0		; L_TIMER / Timer value
		  .word 0		; L_STS   / Status for link disolution
		  lst$d			; L_IQUE  / Input queue
		  lst$d			; L_OQUE  / Output queue
		  lst$d			; L_INTQ  / Interrupt queue
		  .iif eq,<n..>,vfy$ LLT.SZ
		  n..=n..+1
		.endr
		.blkw	SC.tpt		;         / Port reverse mapping vector
		end$

		cor$d		    ; SC_NMT / Node mapping table
		NMTNOD
		SC$NMT	NMTNOD
		NMTNOD	SC.nn
		NMTLOO	SC.nln
		end$
	end$ SC.SZ
.end