Google
 

Trailing-Edge - PDP-10 Archives - bb-penea-bm - galsrc/lcptab.mac
There are 13 other files named lcptab.mac in the archive. Click here to see a list.
	TITLE LCPTAB - LCP Command Parsing Tables
	SUBTTL	Copyright

;	COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1984, 1988, 1989.
;	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.
	SEARCH MACSYM
	SEARCH GLXMAC
	SEARCH ORNMAC
	PROLOG LCPTAB
	.TEXT	"/LOCALS"

	.CLIST==0
SUBTTL Edit history

;Edit	Who	What
;----	---	----
;
;  2     JJF	Add support for SHOW PENDING CONNECTS and
;		SHOW HOST-INITIATED-CONNECTS commands.  Incorporate
;		KDO's fix for SHOW SESSIONS.  Fix output of SHOW SESSIONS
;		to be more Galaxy-like.
;
;  3	 JJF	Fix bug that caused LCPORN to blow ORION out of the water with
;		an invalid message type. GCO 10556.
;
;  4	KDO	Fix the length of the argument list.  GCO 10574.
;
;  5	RBW	Add "Port Name" Columns to the SHOW SESSIONS Display.  Add
;		other changes to make LCP compatible with TOPS-20.  Fix
;		minor bugs in SHOW HOST-INITIATED and SHOW PENDING commands.
;
;  6	RBW	Move Version Number code to LCPTAB to keep TOPS-20 OPR
;		happy.  MAKE SURE VERSION NUMBERS GET UPDATED THERE!!
;
;  7	RBW	Fix bug in SHOW PENDING-REQUESTS.  If there are Reverse LAT
;		connects, but none are pending, say so!
;
; 10	JJF	Fix problems which caused SHOW SESSIONS and both flavors
;		of SHOW HOST-INITIATED-CONNECTS to make ORION croak.
;		1. Remove all use of Preserved ACs except P1 from both
;		routines.
;		2. Make sure that we re-call SHWPCS to get the status
;		of the connect after doing a $TEXT.  TF no longer has the
;		valid status in it.
;		22-Apr-88 GCO:10623 QAR:T10L342:00033
;
; 11	GAS 	Update copyright notice
;
; 12	RBW/JJF	Fix problem with SET SERVICE-NAME accepting names with
;		spaces in them -- remove space from the break mask of 
;		acceptable characters.
;		1-Jun-88 GCO:10635
;
; 13	JJF	Solve problem where LCP will get an ILM stopcode on the
;		KS under TOPS-10.  Insert code to see if the system
;		has LAT support.  If it doesn't, reject all LAT functions.
;		12-Oct-88 GCO:10659 SPR:10-36169
;
; 14	KDO	Modify the SHOW CHARACTERISTICS display to display
;		twenty characters worth of service name instead of six.
;		26-Oct-89 GCO:10679 SPR:10-36281

TOPS10 <
	LCPVER==1	;Major version number
	LCPMIN==2	;Minor version number
	LCPWHO==0	;Who did last edit(0=DEC)
>
TOPS20 <
	LCPVER==6	;Major version number
	LCPMIN==0	;Minor version number
	LCPWHO==0	;Who did last edit(0=DEC)
>
	LCPEDT==14

	LCPMAN==:LCPEDT		;Maintenance edit level
	LCPDEV==:LCPEDT		;Development edit level
	LCPVRN==:VRSN.	LCP	;Version # symbol
TOPS10 <
;DEFINE BREAK MASKS

	BRINI.			;INITIALIZE BREAK MASK FOR STANDARD FIELD
	BRKCH. (0,37)		;ALL CONTROL CHARACTERS
	BRKCH. (40,54)		;SPACE THROUGH COMMA
	BRKCH. (56,57)		;DOT AND SLASH
	BRKCH. (72,77)		;COLON THROUGH QUESTION MARK
	BRKCH. (100)		;ATSIGN
	BRKCH. (133,140)	;OPEN BRACKET THROUGH ACCENT GRAVE
	BRKCH. (173,177)	;CLOSE BRACKET THROUGH TILDE

FLDB0.==W0.			;STANDARD FIELD BREAK MASK
FLDB1.==W1.
FLDB2.==W2.
FLDB3.==W3.
> ;END TOPS10

; LCPKEY (next-pdb,keyword,symbol-suffix [,flags]) - Make keyword table entry
;	for an LCP command and define a symbol to represent the keyword value

	..Z==0
	IF2 <PURGE ..Z>

DEFINE	LCPKEY (NXT,CODE,KEY,FLAGS), <
	IFNDEF $KL'CODE,<
		$KL'CODE==:..Z	; Assign value to global symbol
		..Z==..Z+1>    ; Bump keyword code counter

	IFN .CLIST, <PRINTX <$KL'CODE	= 'KEY>>
	IFB <FLAGS>, <DSPTAB (NXT,$KL'CODE,KEY)>
	IFNB <FLAGS>, <DSPTAB (NXT,$KL'CODE,KEY,FLAGS)>
	>		      ; End of LCPKEY Macro Definition


DEFINE	GROUPS (NEXT,%A,%B,%C,%D), <
%A:	$DIGIT (%B,<^D10>,<List Of Group Ranges "n:m" or Single Groups>,<$ACTION(CHKGRP)>)
%B:	$TOKEN (%C,<:>,<$HELP(<":" To Specify Group Range>),$ALTERNATE(%D)>)
%C:	$NUMBER (%D,<^D10>,<Ending Group Range>,<$ACTION(CHKGRP)>)
%D:	$COMMA (%A,<$HELP(<"," To Specify Additional Group>),$ALTERNATE(NEXT)>)
	IF2 <PURGE %A,%B,%C,%D>
	>		      ; End of GROUPS Definition


NAMBM:	BRMSK. (FLDB0.,FLDB1.,FLDB2.,FLDB3.,<-,$,_,.>)
STRBM:	BRMSK. (FLDB0.,<FLDB1.&<^-<1_^D35!1_^D33!1_^D23>>>,FLDB2.,FLDB3.,!#$%&'()*+-./:;<=>@[\]^_`{|}~)

CHKL16:	$SAVE <T1,T2,T3>
	MOVEI T1,^D16		;Check for max length of 16
	JRST CHKLNG

CHKL64:	$SAVE <T1,T2,T3>
	MOVEI T1,^D64		;Check for max length of 64

CHKLNG:	MOVE S1,CR.COD(S2)	;Function type
	CAIE S1,.CMFLD		;Must be field
	$RETF			;Isn't
	MOVE S1,CR.FLG(S2)	;Get pointer to the field
	MOVE S1,.CMABP(S1)	; text.
	SETZ T3,0		;Zero character count
CHKNM0:	ILDB T2,S1
	SKIPE T2		;End of the string found
	AOJA T3,CHKNM0		;Count the character
	CAIE T3,0		;Null name not permitted.
	JRST CHKNM1
	$TEXT ,<Name too short^A>
	$RETF
CHKNM1:	CAMG T3,T1
	$RETT
	$TEXT ,<Name too long^A>
	$RETF

CHKGRP:	MOVE S1,CR.RES(S2)
	CAIG S1,^D255
	SKIPGE S1
	JRST	CHKGRF
	$RETT

CHKGRF:	PUSHJ	P,FIXIT
	MOVEI	S2,[ASCIZ /Group number must be between 0 and 255/]
	$RETF

FIXIT:	HRRZ	T4,CR.FLG(S2)	;GET ADR OF CMDBLK
	MOVE	T1,.CMPTR(T4)	;GET COMMAND POINTER
	MOVE	T2,.CMABP(T4)	;GET BP TO ATOM BUFFER
FIXI.1:	ILDB	T3,T2
	JUMPE	T3,FIXI.2	;DONE.. ALL FIXED UP
	PUSHJ	P,DBP		;DECREMENT THE BP
	AOS	.CMCNT(T4)
	JRST	FIXI.1		;TRY NEXT CHARACTER
FIXI.2:	MOVEM	T1,.CMPTR(T4)	;STORE ADJUSTED BP
	POPJ	P,0

;
; Routine to decrement a "normal" 7 bit byte pointer in T1
;
DBP:	ADD	T1,[070000,,0]	;BACK UP A BYTE
	SKIPGE	T1		;IF WE NEED TO,
	SUB	T1,[430000,,1]	; THEN BACK UP A WORD
	$RET
	SUBTTL Parsing Tree

LCPTAB::
	EXP	2			;Lenght of the table
	EXP	INIPDB			;Address of initial PDB
	EXP	TOPPDB			;Top level keyword PDB

INIPDB:	$INIT (TOPPDB)
TOPPDB:	$KEYDSP (LCPTBL)
LCPTBL:	$STAB
	LCPKEY (CLRPDB,CLR,<CLEAR>)
	LCPKEY (SETPDB,SET,<SET>)
	LCPKEY (SHWPDB,SHW,<SHOW>)
	LCPKEY (PLSPDB,STA,<START>)
	LCPKEY (PLSPDB,STP,<STOP>)
	LCPKEY (ZROPDB,ZRO,<ZERO>)
	$ETAB
CRLF:	$CRLF		;Commands end with CR/LF

PLSPDB:	$NOISE	(CRLF,<Processing LAT sessions>)


CLRPDB:	$KEYDSP (CLR000)
CLR000:	$STAB
	DSPTAB (SET700,.LPCOD,<GROUPS>)
	DSPTAB (CRLF,.LPNID,<IDENTIFICATION>)
	DSPTAB	(CLR002,777777,<MAXIMUM>)
	DSPTAB (CRLF,.LPMTI,<MULTICAST-TIMER>)
	DSPTAB (CRLF,.LPNUM,<NUMBER>)
	DSPTAB (CLR001,777777,<RETRANSMIT>)
	DSPTAB (CLR100,.LPSRV,<SERVICE-NAME>)
	$ETAB

CLR001:	$KEY	(CRLF,CLR011)
CLR011:	$STAB
	KEYTAB	(.LPRLI,<LIMIT>)
	KEYTAB	(.LPTIM,<TIMER>)
	$ETAB

CLR002:	$KEY	(CRLF,CLR012)
CLR012:	$STAB
	KEYTAB (.LPMAC,<ACTIVE-CIRCUITS>)
	KEYTAB (.LPMCO,<SESSIONS>)
	$ETAB

CLR100:	$FIELD(CRLF,<Service name, 1 to 16 characters>,<$FLAGS(CM%BRK),$BREAK(NAMBM),$ACTION(CHKL16)>)



SETPDB:	$KEYDSP (SET000)
SET000:	$STAB
	DSPTAB (SET700,.LPCOD,<GROUPS>)
	DSPTAB (SET900,.LPNID,<IDENTIFICATION>)
	DSPTAB	(SET002,777777,<MAXIMUM>)
	DSPTAB (SET600,.LPMTI,<MULTICAST-TIMER>)
;	DSPTAB (SET800,.LPNNM,<NODE-NAME>)
	DSPTAB (SET300,.LPNUM,<NUMBER>)
	DSPTAB	(SET001,777777,<RETRANSMIT>)
	DSPTAB (SE1000,.LPSRV,<SERVICE-NAME>)
	$ETAB

SET001:	$KEYDSP	(SET011)
SET011:	$STAB
	DSPTAB (SE2000,.LPRLI,<LIMIT>)
	DSPTAB (SET500,.LPTIM,<TIMER>)
	$ETAB

SET002:	$KEYDSP	(SET012)
SET012:	$STAB
	DSPTAB (SET100,.LPMAC,<ACTIVE-CIRCUITS>)
	DSPTAB (SET200,.LPMCO,<SESSIONS>)
	$ETAB

SET100:	$NUMBER (CRLF,^D10,<Number of simultaneous servers allowed>)

SET200:	$NUMBER (CRLF,^D10,<Number of LAT terminals>)
SET300:	$NUMBER (CRLF,^D10,<Unique host id>)


SET500:	$NUMBER (CRLF,^D10,<Timer value in milliseconds>)

SET600:	$NUMBER (CRLF,^D10,<Timer value in seconds>)

SET700:	GROUPS (CRLF)

SET800:	$CTEXT (CRLF,<Text, 1 to 6 characters>)

SET900:	$FIELD (CRLF,<Text, 1 to 64 characters>,<$FLAGS(CM%BRK),$BREAK(STRBM),$ACTION(CHKL64)>)

SE1000:	$FIELD(SE1001,<Service name, 1 to 16 characters>,<$FLAGS(CM%BRK),$BREAK(NAMBM),$ACTION(CHKL16)>)
SE1001:	$SWITCH (SE1020,SE1010,$ALTERNATE(SE1200))
SE1010:	$STAB
	KEYTAB (0,<RATING:>)
	$ETAB
SE1020:	$KEYDSP (SE1022,$ALTERNATE(SE1024))
SE1022:	$STAB
	DSPTAB (SE1100,0,<DYNAMIC>)
	$ETAB
SE1024:	$NUMBER (SE1100,^D10,<Rating value in range 0-255>)
SE1100:	$SWITCH (SE1120,SE1110,$ALTERNAT(CRLF))
SE1110:	$STAB
	KEYTAB (1,<IDENTIFICATION:>)
	$ETAB
SE1120:	$QUOTE (CRLF,<Quoted string, 1 to 64 characters>)


SE1200: $SWITCH (SE1220,SE1210,$ALTERNATE(CRLF))
SE1210:	$STAB
	KEYTAB (1,<IDENTIFICATION:>)
	$ETAB
SE1220:	$QUOTE (SE1230,<Quoted string, 1 to 64 characters>)
SE1230:	$SWITCH (SE1320,SE1310,$ALTERNATE(CRLF))
SE1310:	$STAB
	KEYTAB (0,<RATING:>)	
	$ETAB
SE1320:	$KEYDSP (SE1322,$ALTERNATE(SE1324))
SE1322:	$STAB
	DSPTAB (CRLF,0,<DYNAMIC>)
	$ETAB
SE1324:	$NUMBER (CRLF,^D10,<Rating value in range 0-255>)

SE2000:	$NUMBER (CRLF,^D10,<Number of times to retransmit before killing circuit>)



SHWPDB:	$KEYDSP (SHW000)
SHW000:	$STAB
	DSPTAB (CRLF,0,<CHARACTERISTICS>)
	DSPTAB (ZRO100,2,<COUNTERS>)
	DSPTAB (CRLF,5,<HOST-INITIATED-REQUESTS>)
	DSPTAB (CRLF,4,<PENDING-REQUESTS>)
	DSPTAB (SHW200,3,<SERVER>)
	DSPTAB (CRLF,1,<SESSIONS>)
	$ETAB


SHW200:
TOPS20 <
	$SWITCH (CRLF,SHW220,<$DEFAULT(/ALL),$ALTERNATE(SHW325)>)
>
TOPS10 <
	$SWITCH (CRLF,SHW220,<$DEFAULT(ALL),$ALTERNATE(SHW325)>)
>

SHW220:	$STAB
	KEYTAB (0,<ALL>)
	$ETAB

SHW325:	$FIELD(CRLF,<Server name, 1 to 16 characters>,<$FLAGS(CM%BRK),$BREAK(NAMBM),$ACTION(CHKL16)>)

ZROPDB:	$KEYDSP (ZRO000,$DEFAULT(COUNTERS))
ZRO000:	$STAB
	DSPTAB (ZRO100,0,<COUNTERS>)
	$ETAB

ZRO100:	$SWITCH (SHW325,ZRO120,$ALTERNATE(CRLF))
ZRO120:	$STAB
	KEYTAB (1,<SERVER:>)
	$ETAB

	END		;End  of LCPTAB.MAC