Google
 

Trailing-Edge - PDP-10 Archives - bb-x130a-sb - nodnam.mac
There are 5 other files named nodnam.mac in the archive. Click here to see a list.
	TITLE NODNAM - Define some nodes with Network Manglement
	SEARCH DCN
	$ONLY==I.LUO!I.GTT
	$INIT NOD

Comment		|

Filespec of master node name to number conversion file:
	VORTEX::NET$LIBRARY:ENETNODES.GEN
This file must still be massaged before it can be used by NODNAM

End comment	|

DEFINE NODE(number,name),<
	CHRCNT==0
	CURPOS==0
	CURWRD==0
	IRPC(name),<CHRCNT==CHRCNT+1>
name:	BYTE (8)^D'number(10)CHRCNT(18)[SIXBIT \name\]
>

$LOSEG

NMXBLK:	.NTMAX			;Number or words in block
	.NTNOD			;entity we
	POINT 8,ENTITY		;byte pointer to entity id
	.NTSET			;set function, which is way to create node name
	Z			;selection. none
	Z			;qualifier. none.
	POINT 8,STRING		;byte pointer to data string
	Z			;number of bytes (set at runtime)
	Z			;error code. Ignore it.
$HISEG

$BLOCK	ENTITY,4
$BLOCK	STRING,16

DEFNOD::
	$SETUP
	SETO T1,		;neg 1 means me
	TRMNO. T1,		;Find out where I'm being run from
	 NOOP			;Ignore error return
	ANDI T1,777		;reduce to terminal number
	GTTAB. T2,[%CNFLN]	;Find out where FRCLIN is
	HRROI T3,0		;Args for attach
	CAMN T1,T2		;Are we running on FRCLIN?
	ATTACH T1,		;Detach!
	 NOOP			;Someone is being mean and vicious. ignore him.
	GTTAB. T1,[%LDFFA]	;Find out who is GOD
	CHGPPN T1,		;make ourselves him.
	 NOOP			;Someone is hacking. Don't amuse him.
	MOVE P1,[XWD -MAXNOD,NODBLK]

NXTNOD:	MOVX T1,<377B7>		;Leftmost 8 bits
	AND T1,(P1)		;get node number out of block
	MOVEM T1,ENTITY		;;node number to do this to
	MOVE T2,[POINT 8,STRING] ;Point to data string
	MOVX T1,<<^D500>&<377>>	;Get low order byte of 500
	IDPB T1,T2		;Store as first byte in command string
	MOVX T1,<<<^D500>&377_8>_-8> ;Get high order byte of 500
	IDPB T1,T2		;Store as next byte in command string
	LDB T1,[POINT 10,(P1),17] ;Get number of bytes in our string
	IDPB T1,T2		;Store as number of bytes to follow
	MOVEI T3,3(T1)		;Get total bytes this involves
	MOVEM T3,NMXBLK+.NTBYT	;Save as number of bytes
	HRRZ T3,(P1)		;get pointer to name string
	HRLI T3,(POINT 6,)	;It is stored in sixbit
NXTCHR:	SOJL T1,DONOD		;No more bytes, do the node
	ILDB T4,T3		;Get a string byte
	ADDI T4," "		;Make it into ascii
	IDPB T4,T2		;Store it in the set string
	JRST NXTCHR		;Next character

DONOD:	HRRZ T2,(P1)		;get pointer to node name
	MOVEI T1,NMXBLK		;Pointer to NTMAN block
	NTMAN. T1,		;define the node
;	  JRST [CAXN T1,NENRM%	;Error "No room(slot already taken)"?
		JRST .+1	;Yes, continue
;		$WARN NUF,<NTMAN. uuo failed, error code >,.TOCTW##,T1,.+1
;		]
	AOBJN P1,NXTNOD		;Try for another.
	EXIT


NODBLK:
;$begin$
	Node 1,TOPS20
	Node 2,RALPH
	Node 6,TOPS10
	Node 7,SPCTRM
	Node 10,TURING
	Node 11,ELI
	Node 12,BOOLE
	Node 13,VOLTA
	Node 14,CURIE
;$end$
MAXNOD=.-NODBLK

	END DEFNOD