.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25

TABLE OF CONTENTS



     3-  113	.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 1





      1						.MCALL	CSI$

      2	000000					CSI$

      3					;

      4					; REMOVE COMMENT TO ALLOW NODE NAMES AS SYNTACTICLY PART OF DEVICE NAMES.

      5					;

      6					;	.NODES.=1

      7					;

      8					;

      9		000002 			C.BFLN=C.CMLD

     10		000004 			C.BFAD=C.CMLD+2

     11		000016 			C.FNLN=C.FILD

     12		000020 			C.FNAD=C.FILD+2

     13		000006 			C.DVLN=C.DEVD

     14		000010 			C.DVAD=C.DEVD+2

     15		000012 			C.DILN=C.DIRD

     16		000014 			C.DIAD=C.DIRD+2

     17					;

     18					;

     19		000032 			C.IDVA=	32	;INPUT LAST DEVICE NAME FOUND PTR

     20		000030 			C.IDVL=	30	;INPUT LAST DEVICE NAME FOUND LENGTH

     21		000036 			C.ODVA=	36	;OUTPUT LAST DEVICE NAME FOUND PTR

     22		000034 			C.ODVL=	34	;OUTPUT LAST DEVICE FOUND LENGTH

     23		000042 			C.IDIA=	42	;INPUT LAST DIR INFO PTR FOUND

     24		000040 			C.IDIL=	40	;INPUT LAST DIR INFO FOUND LENGTH

     25		000046 			C.ODIA=	46	;OUTPUT LAST DIR INFO FOUND PTR

     26		000044 			C.ODIL=	44	;OUTPUT LAST DIR INFO FOUND LENGTH

     27		000050 			C.ISTR=	50	;INPUT NEXT STRING SECTION ADDR

     28		000052 			C.OSTR=	52	;OUTPUT NEXT STRING SECTION ADDR

     29					;

     30					;	COMMAND STRING DELIMITERS

     31					;

     32		000072 			COLON=	72	;	:

     33		000054 			COMMA=	54	;	,

     34		000057 			SLASH=	57	;	/

     35		000075 			EQUAL=	75	;	=

     36		000073 			SEMIC=	73	;	;

     37		000135 			RBRAC=	135	;	]

     38		000133 			LBRAC=	133	;	[

     39		000137 			USCORE=	137	;	_

     40		000074 			LPBRAC=	74	;	<

     41		000076 			RPBRAC=	76	;	>

     42					;

     43					;	CHARS DELETED FROM COMMAND STRINGS

     44					;

     45		000040 			BLANK=	40

     46		000011 			TAB=	11

     47		000000 			NULL=	0

     48		000177 			RUBOUT=	177

     49					;

     50					;	OTHER RELEVANT CHARS

     51					;

     52		000101 			CHARA=	101	;	A

     53		000132 			CHARZ=	132	;	Z

     54		000060 			CHAR0=	60	;	0

     55		000071 			CHAR9=	71	;	9

     56		000056 			DOT=	56	;	.

     57		000052 			STAR=	52	;	*

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 1-1





     58		000055 			MINUS=	55	;	-

     59		000053 			PLUS=	53	;	+

     60		000044 			DOLLAR=	44	;	$

     61					;

     62					;

     63					;

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 2





      1						.TITLE	.CSI1 - VAX/VMS CSI1 ROUTINES

      2						.IDENT	/01/

      3

      4					;

      5					; COPYRIGHT (C) 1973,1976,1977

      6					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

      7					;

      8					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY ON A

      9					; SINGLE COMPUTER SYSTEM AND MAY  BE  COPIED   ONLY  WITH  THE

     10					; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE,  OR

     11					; ANY OTHER COPIES THEREOF, MAY NOT BE PROVIDED  OR  OTHERWISE

     12					; MADE AVAILABLE TO ANY OTHER PERSON   EXCEPT FOR  USE ON SUCH

     13					; SYSTEM AND TO ONE WHO AGREES TO THESE LICENSE  TERMS.  TITLE

     14					; TO AND OWNERSHIP OF THE SOFTWARE SHALL AT ALL  TIMES  REMAIN

     15					; IN DEC.

     16					;

     17					; THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT

     18					; NOTICE AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL

     19					; EQUIPMENT CORPORATION.

     20					;

     21					; DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY OF

     22					; ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.

     23					;

     24					;++

     25					;

     26					; FACILITY:

     27					;

     28					;	VAX/VMS RSX11M SUPPORT ROUTINES

     29					;

     30					; ABSTRACT:

     31					;

     32					;	THIS MODULE REPLACES THE RSX11M CSI1 MODULE FOR RSX11M TASKS

     33					;	RUNNING UNDER VAX/VMS. THIS ROUTINE PARSES VAX/VMS FILE SPECS.

     34					;

     35					; AUTHOR:

     36					;

     37					;	R.HEINEN FROM A.MOROTTO'S AND C. D'ELIA'S RSX11M CSI1

     38					;--

     39					;

     40					; LOCAL MACROS

     41					;

     42						.MACRO	GENDSP	LIST

     43						.IRP	X,<LIST>

     44						.BYTE	X'DSP

     45						.ENDM

     46						.ENDM	GENDSP

     47					;

     48					; LOCAL STORAGE

     49					;

     50	000000					.PSECT	.CSID

     51

     52					;

     53					; GENERATE THE OFFSET SYMBOLS TO USE THE DISPATCH TABLE

     54					;

     55		000000 			XTMPX=0

     56						.IRP	X,<FN,DV,PP,ER,SW>

     57					X'DSP=XTMPX

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 2-1





     58					XTMPX=XTMPX+2

     59						.ENDM

     60					;

     61					; TABLE OF ROUTINE ADDRESSES FOR SYNTAX CHECK

     62					;

     63	000000				DSPTBL:					;

     64	000000	000664'				.WORD	FNSCAN			; SCAN FILE NAME

     65	000002	000416'				.WORD	DEVSCN			; SCAN DEVICE NAME (AND NUMBER)

     66	000004	000460'				.WORD	DIRSCN			; SCAN UIC SPECIFICATION

     67	000006	000566'				.WORD	ERROR			; DECLARE SYNTAX ERROR

     68	000010	000572'				.WORD	SWSCAN			; SCAN SWITCHES

     69					;

     70					;	STATE TABLES FOR SYNTAX SCAN

     71					;

     72	000012					GENDSP	<FN>

     73	000013				STAT0:	GENDSP	<FN,DV,PP,FN,ER>

     74	000020					GENDSP	<FN>

     75	000021					GENDSP	<FN,ER,PP,FN,ER>

     76	000026					GENDSP	<FN>

     77	000027					GENDSP	<FN,ER,ER,FN,ER>

     78	000034					GENDSP	<SW>

     79	000035					GENDSP	<SW,SW,ER,SW,ER>

     80					;

     81					; DELIMETER CLASS TABLE

     82					;

     83						.EVEN

     84	000042				DELTAB:					;

     85	000042	   075 	   377 			.BYTE	EQUAL,-1		;

     86	000044	   135 	   004 			.BYTE	RBRAC,4			;

     87	000046	   076 	   004 			.BYTE	RPBRAC,4		; RIGHT POINTY BRACKET

     88	000050	   057 	   003 			.BYTE	SLASH,3			;

     89	000052	   133 	   002 			.BYTE	LBRAC,2			;

     90	000054	   074 	   002 			.BYTE	LPBRAC,2		; LEFT POINTY BRACKET

     91	000056	   072 	   001 			.BYTE	COLON,1			;

     92	000060	   054 	   000 			.BYTE	COMMA,0			;

     93					;

     94					; CHARACTER TYPE BREAKDOWN TABLE

     95					;

     96		000000 			NUMER=0					; RAD50

     97		000001 			ALPHA=1					; RAD50

     98		000002 			DLR=2					; RAD50

     99		000003 			PERIOD=3				; RAD50

    100		000004 			ASTER=4					; NON-RAD50

    101		000005 			OTHER=5					; NON-RAD50

    102					;

    103					;

    104					;

    105	000062	   060 	   071 	   000 	CHRTAB:	.BYTE	CHAR0,CHAR9,NUMER	; NUMBERS

    106	000065	   101 	   132 	   001 		.BYTE	CHARA,CHARZ,ALPHA	; UPPER CASE

    107	000070	   141 	   172 	   001 		.BYTE	CHARA+40,CHARZ+40,ALPHA	; LOWER CASE

    108	000073	   044 	   044 	   002 		.BYTE	DOLLAR,DOLLAR,DLR	; DOLLAR SIGN

    109	000076	   056 	   056 	   003 		.BYTE	DOT,DOT,PERIOD		; PERIOD

    110	000101	   052 	   052 	   004 		.BYTE	STAR,STAR,ASTER		; STAR

    111	000104	   000 	   377 	   005 		.BYTE	0,255.,OTHER		; ALL OTHERS

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 3

.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE



    113						.SBTTL	.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE

    114

    115	000000					.PSECT	.CSII

    116

    117						.ENABL	LSB

    118					;++

    119					; .CSI1 - SYNTAX ENTIRE COMMAND LINE

    120					;

    121					; FUNCTIONAL DESCRIPTION:

    122					;

    123					; THIS ROUTINE INITIALIZES THE CSI DATA BASE AND CHECKS THE ENTIRE

    124					; INPUT COMMAND LINE FOR SYNTAX.

    125					;

    126					; THE SYNTAX CHECK IS LIBERAL.

    127					;

    128					;	DEVICE:

    129					;	DEVICE:[DIRECTORY]

    130					;	[DIRECTORY]

    131					;

    132					;	NAME

    133					;	NAME.

    134					;	NAME.TYP

    135					;	NAME.TYP;VER

    136					;	NAME.TYP.VER

    137					;

    138					;	SWITCHES ARE /SWITCH

    139					;

    140					; INPUTS:

    141					;

    142					;	R0 = ADDRESS OF THE CSI CONTROL BLOCK

    143					;

    144					; OUTPUTS:

    145					;

    146					;	R0 = ADDRESS OF THE CSI CONTROL BLOCK

    147					;

    148					;	R1,R2,R3,R4,R5 ARE SAVED.

    149					;--

    150	000000				.CSI1::					;

    151	000000	004567 	000000G			JSR	R5,.SAVR1		; SAVE REGISTERS

    152	000004	010003 				MOV	R0,R3			; GET COMMAND BLOCK ADDR

    153	000006	016001 	000004 			MOV	C.BFAD(R0),R1		;GET BUFF ADDR

    154	000012	016002 	000002 			MOV	C.BFLN(R0),R2		;AND BUFF LENGTH

    155	000016	012704 	000026 			MOV	#<C.SIZE/2>,R4		; SET SIZE OF CSI BLOCK (WDS)

    156	000022	005023 			10$:	CLR	(R3)+			;CLEAR BLOCK

    157	000024	005304 				DEC	R4

    158	000026	001375 				BNE	10$

    159	000030	010160 	000004 			MOV	R1,C.BFAD(R0)		;RESTORE BUFF ADDR

    160	000034	010160 	000052 			MOV	R1,C.OSTR(R0)		;SET OUTPUT SIDE STRING PTR

    161					;

    162					;	COMPRESS COMMAND STRING(ELIMINATE NULLS, TABS, RUBOUTS AND BLANKS)

    163					;	ALSO ESTABLISH THAT THERE IS AT MOST 1 EQUALS AND SAVE ITS LOCN+1

    164					;

    165	000040	010103 				MOV	R1,R3			;SET PTRS FOR COMPRESS

    166	000042	010004 				MOV	R0,R4			; SET R4 TO THE ...

    167	000044	062704 	000050 			ADD	#C.ISTR,R4		; ... INPUT STRING POINTER

    168	000050	005702 				TST	R2

    169	000052	001002 				BNE	20$			;BRANCH IF NOT NULL LINE

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 3-1

.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE



    170	000054	010114 				MOV	R1,(R4)			; ELSE, SET INPUT STRING POINTER

    171	000056	000207 				RTS	PC			; RETURN -- CC-C ALREADY CLEAR

    172	000060	105713 			20$:	TSTB	(R3)			; BRANCH IF NULL, RUBOUT ...

    173	000062	001431 				BEQ	40$			;TAB OR BLANK

    174	000064	122713 	000011 			CMPB	#TAB,(R3)

    175	000070	001426 				BEQ	40$

    176	000072	122713 	000177 			CMPB	#RUBOUT,(R3)

    177	000076	001423 				BEQ	40$

    178	000100	122713 	000040 			CMPB	#BLANK,(R3)

    179	000104	001420 				BEQ	40$

    180	000106	111321 				MOVB	(R3),(R1)+		;ELSE MOVE CHAR TO COMPRESSED STRING

    181	000110	122713 	000075 			CMPB	#EQUAL,(R3)		;BRANCH IF NOT EQUALS

    182	000114	001014 				BNE	40$

    183	000116	005714 				TST	(R4)			; ERROR IF ALREADY FOUND EQUAL SIGN

    184	000120	001406 				BEQ	30$			;ELSE BRANCH

    185	000122	010360 	000020 			MOV	R3,C.FNAD(R0)		;SET LOCN OF BAD SYNTAX

    186	000126	010260 	000016 			MOV	R2,C.FNLN(R0)		;SET LENGTH

    187	000132	000261 				SEC				;SET ERROR

    188	000134	000207 				RTS	PC			;EXIT

    189	000136	010114 			30$:	MOV	R1,(R4)			; SET INPUT STRING POINTER

    190	000140	152760 	000040 	000001 		BISB	#CS.EQU,C.STAT(R0)  	; INDICATE EQUAL SIGN SEEN

    191	000146	005203 			40$:	INC	R3			;NEXT UNCOMPRESSED CHARS ADDR

    192	000150	005302 				DEC	R2			;BRANCH IF MORE TO CHECK

    193	000152	001342 				BNE	20$

    194	000154	005714 				TST	(R4)			; BRANCH IF EQUAL SIGN ALREADY FOUND

    195	000156	001001 				BNE	50$

    196	000160	010114 				MOV	R1,(R4)			; ELSE, SET INPUT STRING POINTER

    197	000162	016004 	000004 		50$:	MOV	C.BFAD(R0),R4		; GET STRING ADDRESS

    198	000166	160401 				SUB	R4,R1			; SET COMPRESSED STRING LENGTH

    199	000170	010160 	000002 			MOV	R1,C.BFLN(R0)

    200					;

    201					;	COMMAND BLOCK IS SET UP AND STRING IS COMPRESSED

    202					;	PREPARE FOR SYNTAX SCAN OF COMPRESSED STRING

    203					;

    204	000174	010046 				MOV	R0,-(SP)		;SAVE CMMD BLOCK ADDR

    205	000176	005005 				CLR	R5			;SET SCAN STATE

    206	000200	060401 				ADD	R4,R1			;END OF STRING ADDR

    207	000202	005304 				DEC	R4

    208	000204	020401 			60$:	CMP	R4,R1			;BRANCH IF AT END OF LINE

    209	000206	001431 				BEQ	100$

    210	000210	005204 				INC	R4			; PASS DELIM

    211	000212	010402 				MOV	R4,R2			; START AT CURRENT DELIMETER

    212	000214	010500 				MOV	R5,R0			; SET SCAN STATE

    213	000216	100001 				BPL	65$			; IF PLUS THEN OK

    214	000220	005000 				CLR	R0			; RESET SCAN ON EQUAL

    215	000222	004767 	000052 		65$:	JSR	PC,GETDEL		;SCAN TO A DELIMITER

    216					;

    217					;	GO TO PROPER ROUTINE VIA STATE TABLE

    218					;

    219	000226	006300 				ASL	R0

    220	000230	010003 				MOV	R0,R3

    221	000232	006300 				ASL	R0

    222	000234	060003 				ADD	R0,R3

    223	000236	060503 				ADD	R5,R3

    224	000240	116303 	000013'			MOVB	STAT0(R3),R3		; LOAD OFFSET INTO DISP TBL

    225	000244	011600 				MOV	(SP),R0			; GET BLOCK ADDRESS

    226	000246	010260 	000020 			MOV	R2,C.FNAD(R0)		; SAVE ADDRESS AND SIZE OF AREA

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 3-2

.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE



    227	000252	010460 	000016 			MOV	R4,C.FNLN(R0)		;

    228	000256	160260 	000016 			SUB	R2,C.FNLN(R0)		;

    229	000262	004773 	000000'			JSR	PC,@DSPTBL(R3)		; JUMP TO PROPER ROUTINE

    230	000266	103346 				BCC	60$			; BR IF NO ERROR DETECTED

    231	000270	000401 				BR	110$

    232	000272	000241 			100$:	CLC

    233	000274	012600 			110$:	MOV	(SP)+,R0		; RESTORE BLOCK ADDRESS

    234	000276	000207 				RTS	PC

    235						.DSABL	LSB

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 4

.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE



    237					;++

    238					; GETDEL - SCAN INPUT FOR NEXT DELIMETER

    239					;

    240					; FUNCTIONAL DESCRIPTION:

    241					;

    242					; THIS ROUTINE SCANS THE INPUT AND RETURNS THE CLASS OF THE NEXT DELIMETER.

    243					;	SINGLE COLON, COMMA, SLASH, EQUALS(OR END OF STRING), SEMICOLON, RIGHT BRACKET,

    244					;

    245					;	LEFT BRACKET,POINTY BRACKETS

    246					;

    247					; INPUTS:

    248					;

    249					;	R0 = CSI CONTROL BLOCK ADDRESS

    250					;	R1 = ADDRESS OF THE END OF LINE

    251					;	R2 = ADDRESS TO BEGIN SCAN

    252					;

    253					; OUTPUTS:

    254					;

    255					;	R2 = ADDRESS OF SCAN BEGIN

    256					;	R4 = ADDRESS OF THE DELIMETER

    257					;	R5 = DELIMETER CLASS

    258					;

    259					;	R0,R1,R2 ARE PRESERVED.

    260					;--

    261	000300	010204 			GETDEL:	MOV	R2,R4			;ADDR DELIM

    262	000302	012705 	000042'		10$:	MOV	#DELTAB,R5		;ADDR DELIMITER TABLE

    263	000306	020401 				CMP	R4,R1			;BRANCH IF NOT AT END OF STRING

    264	000310	001407 				BEQ	30$

    265	000312	121415 			20$:	CMPB	(R4),(R5)		;IS THIS CHAR THIS DELIM

    266	000314	001405 				BEQ	30$			; IF EQL THEN FOUND

    267	000316	032725 	177400 			BIT	#177400,(R5)+		; END OF LIST?

    268	000322	001373 				BNE	20$			; IF NE THEN NO

    269	000324	005204 				INC	R4			;ADVANCE TO NEXT CHAR

    270	000326	000765 				BR	10$			;GO CHECK

    271	000330	116505 	000001 		30$:	MOVB	1(R5),R5		; GET DELIMITER VALUE

    272	000334	000207 				RTS	PC			;EXIT

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 5

.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE



    274					;++

    275					; CHRTYP - GET TYPE OF CHARACTER

    276					;

    277					; FUNCTIONAL DESCRIPTION:

    278					;

    279					; THIS ROUTINE RETURNS THE TYPE OF A GIVEN CHARACTER AND AN INDICATION

    280					; OF ITS INCLUSION IN THE RAD50 SET.

    281					;

    282					; INPUTS:

    283					;

    284					;	R0 = ADDRESS OF THE CHARACTER TO TYPE

    285					;	R4 = ADDRESS OF THE END OF LINE

    286					;

    287					; OUTPUTS:

    288					;

    289					;	R0 = ADDRESS OF THE NEXT INPUT STREAM CHARACTER

    290					;	R3 = TYPE OF THE CHARACTER

    291					;

    292					;	R1,R2,R4,R5 ARE PRESERVED.

    293					;--

    294	000336	012703 	000062'		CHRTYP:	MOV	#CHRTAB,R3		; ADDRESS TABLE

    295	000342	020004 			5$:	CMP	R0,R4			; END OF SECTION?

    296	000344	001407 				BEQ	15$			; THEN SET OTHER

    297	000346	121023 				CMPB	(R0),(R3)+		; CHARACTER IN RANGE?

    298	000350	103402 				BLO	10$			; IF LO THEN NO

    299	000352	121013 				CMPB	(R0),(R3)		;

    300	000354	101406 				BLOS	20$			; IF LOW FOUND

    301	000356	062703 	000002 		10$:	ADD	#2,R3			; PASS ENTRY

    302	000362	000767 				BR	5$			;

    303	000364	012703 	000005 		15$:	MOV	#OTHER,R3		; SET OTHER FOR EOL

    304	000370	000402 				BR	25$

    305	000372	116303 	000001 		20$:	MOVB	1(R3),R3		; SET TYPE AND RETURN

    306	000376	005200 			25$:	INC	R0

    307	000400	120327 	000001 			CMPB	R3,#ALPHA		; IF ALPHA THEN CONVERT TO UPPER

    308	000404	001003 				BNE	30$			; IF NEQ THEN NO

    309	000406	142760 	000040 	177777 		BICB	#40,-1(R0)		; RESET IT

    310	000414	000207 			30$:	RTS	PC

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 6

.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE



    312					;++

    313					; DEVSCN - SCAN DEVICE NAME

    314					;

    315					; FUNCTIONAL DESCRIPTION:

    316					;

    317					; THIS ROUTINE SCANS DEVICE NAMES. THE REQUIREMENT IS THAT THE STRING

    318					; BEGIN WITH AN ALPHABETIC.

    319					;

    320					; INPUTS:

    321					;

    322					;	R2 = ADDRESS OF THE CURRENT AREA START

    323					;	R4 = ADDRESS OF THE CURRENT AREA END

    324					;

    325					; OUTPUT:

    326					;

    327					;	C-BIT IS SET ON ERROR, CLEAR ON SUCCESS

    328					;

    329					;	R2,R4,R5 ARE PRESERVED

    330					;--

    331	000416	010200 			DEVSCN:	MOV	R2,R0			;SET START CHAR

    332	000420	121027 	000137 			CMPB	(R0),#137		; SKIP OVER UNDER SCORE

    333	000424	001004 				BNE	15$			; IF NEQ THEN GO

    334	000426	005200 				INC	R0			;

    335	000430	000402 				BR	15$			;

    336	000432	020004 			10$:	CMP	R0,R4			; END OF AREA?

    337	000434	001407 				BEQ	30$			; IF EQL THEN DONE

    338	000436	004767 	177674 		15$:	JSR	PC,CHRTYP		; GET TYPE OF NEXT CHARACTER

    339	000442	162703 	000003 			SUB	#PERIOD,R3		; CHECK FOR $,ALPHA OR NUMBER

    340	000446	100771 				BMI	10$			; IF MINUS THEN OK

    341	000450	000261 				SEC				; EXIT WITH ERROR

    342	000452	000207 				RTS	PC

    343	000454	000241 			30$:	CLC				; EXIT WITH SUCCESS

    344	000456	000207 				RTS	PC

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 7

.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE



    346					;++

    347					; DIRSCN - SCAN DIRECTORY SPECIFIER

    348					;

    349					; FUNCTIONAL DESCRIPTION:

    350					;

    351					; THIS ROUTINE SCANS DIRECTORY SPECIFIERS.

    352					; THE REQUIREMENT IS THAT THE BRACKETS MATCH AND THAT IF A COMMA

    353					; IS PRESENT IT IS THE ONLY DELIMETER.

    354					;

    355					; INPUTS:

    356					;

    357					;	R2 = ADDRESS OF THE CURRENT AREA START

    358					;	R4 = ADDRESS OF THE CURRENT AREA END

    359					;

    360					; OUTPUTS:

    361					;

    362					;	C-BIT IS SET ON ERROR, CLEAR ON SUCCESS

    363					;

    364					;	R2,R4 ARE PRESERVED.

    365					;

    366					;	R5 IS SET TO 2 TO FORCE FILE NAME CHECK ON SUCCESS

    367					;--

    368	000460	020204 			DIRSCN:	CMP	R2,R4			;IF CHARS PRECEED [ OR <

    369	000462	001041 				BNE	ERROR			;ERROR

    370	000464	112246 				MOVB	(R2)+,-(SP)		; SAVE START DELIM AND STEP OVER

    371	000466	004767 	177606 			JSR	PC,GETDEL		;GET NEXT DELIM

    372	000472	005705 				TST	R5			; COMMA?

    373	000474	001004 				BNE	10$			; IF YES THEN GET THE NEXT DELIM

    374	000476	005204 				INC	R4

    375	000500	010402 				MOV	R4,R2			; COPY DELIM ADDR

    376	000502	004767 	177572 			JSR	PC,GETDEL		; GET NEXT DELIMETER

    377	000506	012600 			10$:	MOV	(SP)+,R0		; GET START SYMBOL

    378	000510	020527 	000004 			CMP	R5,#4			; ] OR >?

    379	000514	001015 				BNE	35$			; ERROR IF NO

    380	000516	120027 	000133 			CMPB	R0,#'[			; ENTER WITH "["?

    381	000522	001003 				BNE	15$			; IF NEQ THEN MUST HAVE BEEN "<"

    382	000524	121427 	000135 			CMPB	(R4),#']		; MUST MATCH

    383	000530	000402 				BR	20$			; CKECK IN COMMON

    384	000532	121427 	000076 		15$:	CMPB	(R4),#'>		;

    385	000536	001004 			20$:	BNE	35$			; IF NEQ THEN ERROR

    386	000540	012705 	000002 			MOV	#2,R5			; SET UP NEXT STATE

    387	000544	000241 				CLC

    388	000546	000207 				RTS	PC

    389	000550	016600 	000002 		35$:	MOV	2(SP),R0		; GET BLOCK ADDRESS

    390	000554	010460 	000016 			MOV	R4,C.FNLN(R0)		; SET DELIM SIZE

    391	000560	166060 	000020 	000016 		SUB	C.FNAD(R0),C.FNLN(R0)	;

    392	000566	000261 			ERROR:	SEC

    393	000570	000207 				RTS	PC

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 8

.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE



    395					;++

    396					; SWSCAN - SCAN SWITCHES

    397					;

    398					; FUNCTIONAL DESCRIPTION:

    399					;

    400					; THIS ROUTINE SCANS SWITCHES.

    401					; THE REQUIREMENT IS THAT THE SWITCH START WITH A ALPHA AND

    402					; BE RAD50 CHARACTERS UNTIL THE END OF THE AREA OR A COLON.

    403					; IF A COLON IS FOUND, THE NEXT DELIM MAY NOT BE ],[ OR ;.

    404					;

    405					; INPUTS:

    406					;

    407					;	R2 = ADDRESS OF THE CURRENT AREA START

    408					;	R4 = ADDRESS OF THE CURRENT AREA END

    409					;

    410					; OUTPUTS:

    411					;

    412					;	C-BIT SET IF ERROR, CLEAR IF SUCCESS.

    413					;

    414					; R2,R4,R5 ARE PRESERVED.

    415					;--

    416	000572	010200 			SWSCAN:	MOV	R2,R0

    417	000574	121027 	000055 			CMPB	(R0),#MINUS		;STEP OVER LEADING MINUS

    418	000600	001001 				BNE	5$

    419	000602	005200 				INC	R0

    420	000604	020004 			5$:	CMP	R0,R4			;BRANCH IF AT END OF NAME

    421	000606	001421 				BEQ	20$

    422	000610	004767 	177522 			JSR	PC,CHRTYP		;GET NEXT CHARS TYPE

    423	000614	020327 	000003 			CMP	R3,#PERIOD		;IF NOT RAD50 CHAR

    424	000620	101771 				BLOS	5$

    425	000622	000261 			7$:	SEC

    426	000624	000207 				RTS	PC

    427	000626	010402 			10$:	MOV	R4,R2			; SET POINTER

    428	000630	005202 				INC	R2			;

    429	000632	004767 	177442 			JSR	PC,GETDEL		; SKIP THE SWITCH VALUE

    430	000636	010503 				MOV	R5,R3			; COPY DELIMITER VALUE INTO R3

    431	000640	162703 	000002 			SUB	#2,R3			; IF DELIMITER IS '[' THEN ...

    432	000644	001766 				BEQ	7$			; ... DECLARE SYNTAX ERROR

    433	000646	005303 				DEC	R3			; IF DELIMITER IS ']' THEN ...

    434	000650	003364 				BGT	7$			; ... DECLARE SYNTAX ERROR

    435	000652	022705 	000001 		20$:	CMP	#1,R5			; DELIM COLON?

    436	000656	001763 				BEQ	10$			; IF EQL THEN CONTINUE

    437	000660	000241 				CLC

    438	000662	000207 				RTS	PC

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 9

.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE



    440					;++

    441					; FNSCAN - SCAN FILE NAME, TYPE AND VERSION

    442					;

    443					; FUNCTIONAL DESCRIPTION:

    444					;

    445					; THIS ROUTINE SCANS FILE NAMES.

    446					; INPUTS:

    447					;

    448					;	R2 = ADDRESS OF THE CURRENT AREA START

    449					;	R4 = ADDRESS OF THE CURRENT AREA END

    450					;

    451					; OUPTUTS:

    452					;

    453					;	C-BIT IS SET ON ERROR, CLEAR ON SUCCESS

    454					;

    455					;	R2,R4,R5 ARE PRESERVED.

    456					;--

    457	000664				FNSCAN:					; SCAN FILE NAME

    458	000664	010200 				MOV	R2,R0			; COPY SCAN START ADDRESS

    459	000666	004767 	000062 			JSR	PC,100$			; SCAN STRING

    460	000672	103423 				BCS	50$			; IF C-SET THEN REAL ERROR

    461	000674	102405 				BVS	15$			; IF V-SET THEN SEMI TERMINATED

    462	000676	001420 				BEQ	40$			; IF EQL THEN END OF STRING

    463	000700	004767 	000050 			JSR	PC,100$			; SCAN TYPE FIELD

    464	000704	103416 				BCS	50$			; IF C-SET THEN ERROR

    465	000706	001414 				BEQ	40$			; IF EQL THEN END OF LINE

    466	000710	121027 	000052 		15$:	CMPB	(R0),#STAR		; VERSION STAR?

    467	000714	001411 				BEQ	40$			; IF EQ THEN YES AND DONE

    468	000716	020004 			20$:	CMP	R0,R4			; AT END OF AREA?

    469	000720	001407 				BEQ	40$			; IF NE THEN ERROR

    470	000722	004767 	177410 			JSR	PC,CHRTYP		; SCAN VERSION

    471	000726	020327 	000000 			CMP	R3,#NUMER		; NUMBERS ONLY

    472	000732	001771 				BEQ	20$			; CONTINUE UNTIL DONE

    473	000734	000261 				SEC

    474	000736	000401 				BR	50$			; CONTINUE

    475	000740	000241 			40$:	CLC

    476	000742	010505 			50$:	MOV	R5,R5

    477	000744	100002 				BPL	60$

    478	000746	012705 	000000 			MOV	#0,R5

    479	000752	000207 			60$:	RTS	PC

    480					;

    481					; SCAN SUBROUTINE

    482					;

    483	000754	121027 	000052 		100$:	CMPB	(R0),#STAR		; STAR?

    484	000760	001001 				BNE	110$			; IF NEQ THEN GO ON

    485	000762	005200 				INC	R0			; POINT TO DELIM

    486	000764	020400 			110$:	CMP	R4,R0			; END OF LINE?

    487	000766	000242 				CLV				; INSURE V-CLEAR

    488	000770	001417 				BEQ	130$			; IF EQL THEN YES AND OK

    489	000772	004767 	177340 			JSR	PC,CHRTYP		; GET CHR TYPE

    490	000776	162703 	000003 			SUB	#PERIOD,R3		; RAD 50?

    491	001002	100770 				BMI	110$			; IF MI THEN YES

    492	001004	000242 				CLV				; ASSUME PERIOD

    493	001006	001407 				BEQ	120$			; IF EQL THEN PERIOD

    494	001010	126027 	177777 	000073 		CMPB	-1(R0),#SEMIC		; SEMI COLON?

    495	001016	000262 				SEV				; ASSUME YES

    496	001020	001402 				BEQ	120$			; IF EQL THEN SET V

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 9-1

.CSI1 - SYNTAX CHECK ENTIRE COMMAND LINE



    497	001022	000261 				SEC

    498	001024	000207 				RTS	PC

    499	001026	000244 			120$:	CLZ				; SET NOT EQUAL

    500	001030	000241 			130$:	CLC

    501	001032	000207 				RTS	PC

    502		000001 				.END

.CSI1 - VAX/VMS CSI1 ROUTINES	MACRO M1110  22-AUG-78 01:25  PAGE 9-2

SYMBOL TABLE



ALPHA = 000001   	CS.OUT= 000002   	C.IDVA= 000032   	DLR   = 000002   	PERIOD= 000003

ASTER = 000004   	CS.WLD= 000010   	C.IDVL= 000030   	DOLLAR= 000044   	PLUS  = 000053

BLANK = 000040   	C.BFAD= 000004   	C.ISTR= 000050   	DOT   = 000056   	PPDSP = 000004

CHARA = 000101   	C.BFLN= 000002   	C.MKW1= 000024   	DSPTBL  000000R     002	RBRAC = 000135

CHARZ = 000132   	C.CMLD= 000002   	C.MKW2= 000026   	DVDSP = 000002   	RPBRAC= 000076

CHAR0 = 000060   	C.DEVD= 000006   	C.ODIA= 000046   	EQUAL = 000075   	RUBOUT= 000177

CHAR9 = 000071   	C.DIAD= 000014   	C.ODIL= 000044   	ERDSP = 000006   	SEMIC = 000073

CHRTAB  000062R     002	C.DILN= 000012   	C.ODVA= 000036   	ERROR   000566R     003	SLASH = 000057

CHRTYP  000336R     003	C.DIRD= 000012   	C.ODVL= 000034   	FNDSP = 000000   	STAR  = 000052

COLON = 000072   	C.DSDS= 000006   	C.OSTR= 000052   	FNSCAN  000664R     003	STAT0   000013R     002

COMMA = 000054   	C.DVAD= 000010   	C.SIZE= 000054   	GETDEL  000300R     003	SWDSP = 000010

CS.DIF= 000002   	C.DVLN= 000006   	C.STAT= 000001   	LBRAC = 000133   	SWSCAN  000572R     003

CS.DVF= 000004   	C.FILD= 000016   	C.SWAD= 000022   	LPBRAC= 000074   	TAB   = 000011

CS.EQU= 000040   	C.FNAD= 000020   	C.TYPR= 000000   	MINUS = 000055   	USCORE= 000137

CS.INP= 000001   	C.FNLN= 000016   	DELTAB  000042R     002	NULL  = 000000   	XTMPX = 000012

CS.MOR= 000020   	C.IDIA= 000042   	DEVSCN  000416R     003	NUMER = 000000   	.CSI1   000000RG    003

CS.NMF= 000001   	C.IDIL= 000040   	DIRSCN  000460R     003	OTHER = 000005   	.SAVR1= ****** GX



. ABS.	000000	   000

      	000000	   001

.CSID 	000107	   002

.CSII 	001034	   003

ERRORS DETECTED:  0



VIRTUAL MEMORY USED:  1004 WORDS  ( 4 PAGES)

DYNAMIC MEMORY:  2772 WORDS  ( 10 PAGES)

ELAPSED TIME:  00:00:10

OBJ$:VAXCSI1,LIS$:VAXCSI1/-SP=SRC$:VAXCSIDEF,VAXCSI1

