Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/debugging-tools/dts/dtscmd.mac
There are no other files named dtscmd.mac in the archive.

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;
;COPYRIGHT (C) 1978 BY DIGITAL EQUIPMENT CORPORATION
;
	TITLE DTSCMD - DECNET TRANSMITTER/RECEIVER TEST COMMAND MODULE
	SUBTTL DTSCMD - ASSEMBLY ENVIRONMENT DEFINITION

;.RIGHT MARGIN 70
;.AUTOPARAGRAPH
;
;
;.TITLE	DECNET TRANSMITTER/RECEIVER TEST COMMAND PARSER MODULE
;
;.BLANK 5
;
; This module is the command parser for the TOPS-20 implementation of the
;DECnet DTS/DTR test system. As such, it provides the user interface to the
;DTR/DTS tests on the DECsystem-20. The commands implemented here have been
;structured as closely as was possible to the command syntax implemented by the
;RSX-11M DTS.
;
; The module builds an argument block in the callers argument area
; of the following form:
;
;	ARGUMENT BLOCK/ (.DTTIM) ELAPSED TIME TO RUN TEST
;			(.DTBUF) NUMBER OF SEND BUFFERS TO USE
;			(.DTBAU) BAUD RATE
;			(.DTNOD) POINTER TO NODE NAME
;			(.DTCNT) OPTIONAL DATA BYTE COUNT
;			(.DTTYP) TEST TYPE + PRINT OPTION
;			(.DTSUB) TEST SUBTYPE
;			(.DTFCO) FLOW CONTROL OPTION
;			(.DTFCV) FLOW CONTROL VALUE
;			(.DTNAK) NAK VALUE
;			(.DTBPV) BACK-PRESSURE VALUE
;			(.DTMSG) MESSAGE LENGTH BYTE # 0
;				 MESSAGE LENGTH BYTE # 1
;				 USER DATA
;
;.BREAK
;-

	PAGE
	SUBTTL DTSCMD - ASSEMBLY ENVIRONMENT DEFINITION

;DEFINE THE MACRO FILES TO SEARCH

;+
;.BLANK 2
;
; This module requires the following universal files to be searched
;for macro and symbol definitions:
;
;.BLANK 2
;.LITERAL
;
;		DTSUNV.UNV
;		PARUNV.UNV
;		MONSYM.UNV
;		MACSYM.UNV
;
;.END LITERAL
;.BREAK
;-

	SEARCH PARUNV,DTSUNV,MONSYM,MACSYM

	PAGE
	SUBTTL DTSCMD - ASSEMBLY ENVIRONMENT DEFINITION

;DEFINE THE REQUIRED SUPPORT OBJECT FILES FOR LINK

;+
;.BLANK 5
;
; This module requires the following object files to be linked prior to
;execution:
;
;.BLANK 2
;.LITERAL
;
;		PARSE.REL
;		MACREL.REL
;
;.END LITERAL
;.BREAK
;-

	.REQUIRE DSK:PARSE
	.REQUIRE SYS:MACREL

;DEFINE THE LISTING OPTIONS

	.DIRECTIVE SFCOND,FLBLST
	SALL

;DEFINE OUR EXTERNAL ENTRY POINTS

	ENTRY DTSCMD
	ENTRY SNDSTR,SNDMSG

	PAGE
	SUBTTL SYMBOL DEFINITIONS


;
;DEFINITIONS FOR THE COMMAND PROGRAM
;

	Q1==5

	DTSSIZ==^D21
	STKSIZ=1000		;STACK IS ONE PAGE
	STACK=100K		;STACK ON PAGE 100
	.JBSYM==116		;ADDRESS OF SYMBOL TABLE POINTER
	GJFSIZ==20		;SIZE OF GTJFN BLOCK


	PAGE
	SUBTTL SYMBOL DEFINITIONS


;CODE STRUCTURE IN KEYTAB AND DSPTAB ENTRIES

	DEFSTR (CODE,0,35,9)	;GET CODE FROM KEYTAB ENTRY
	DEFSTR (DCODE,0,17,9)	;GET CODE FROM DSPTAB ENTRY


;KEYWORD CODES


	KWDBAS==300000		;KEYWORD CODE BASE VALUE


				;TEST TYPE KEYWORD CODES, VALUES FOR "/TEST:"

	TESBAS==1000		;TEST TYPE BASE VALUE

	CONTST==KWDBAS+TESBAS+0	;CONNECT TEST
	DATTST==KWDBAS+TESBAS+1	;DATA TEST
	DISTST==KWDBAS+TESBAS+2	;DISCONNECT TEST
	INTTST==KWDBAS+TESBAS+3	;INTERRUPT TEST

				;PRINT OPTION KEYWORD CODES,
				; VALUES FOR "/PRINT:"

	PRTBAS==2000		;PRINT OPTION BASE VALUE

	PRINT==KWDBAS+PRTBAS+200	;PRINT OPTION ON
	NOPRT==KWDBAS+PRTBAS+000	;PRINT OPTION OFF

				;CONNECT TEST TYPE KEYWORD CODES

	CONBAS==3000		;CONNECT TEST TYPE BASE VALUE

	ACCTST==KWDBAS+CONBAS+1	;CONNECT ACCEPT TEST
	REJTST==KWDBAS+CONBAS+0	;CONNECT REJECT TEST

				;DISCONNECT TEST TYPE KEYWORD CODES

	DISBAS==4000		;DISCONNECT TEST TYPE BASE VALUE

	DSCTST==KWDBAS+DISBAS+0	;DISCONNECT TEST
	ABTTST==KWDBAS+DISBAS+1	;ABORT TEST

				;OPTIONAL DATA VARIANT KEYWORD CODES

	OPTBAS==5000		;OPTIONAL DATA TYPE BASE VALUE

	DATNON==KWDBAS+OPTBAS+0	;NO OPTIONAL DATA RETURNED
	DATSTD==KWDBAS+OPTBAS+2	;STANDARD OPTIONAL DATA RETURNED
	DATRCV==KWDBAS+OPTBAS+4	;RECEIVED OPTIONAL DATA RETURNED

	PAGE
	SUBTTL SYMBOL DEFINITIONS

				;DATA & INTERRUPT TEST TYPE KEYWORD CODES

	DATBAS==6000		;DATA & INT TEST TYPE BASE VALUE

	SNKTST==KWDBAS+DATBAS+0	;SINK TEST
	SEQTST==KWDBAS+DATBAS+1	;SEQUENCE CHECK TEST
	PATTST==KWDBAS+DATBAS+2	;PATTERN CHECK TEST
	ECHTST==KWDBAS+DATBAS+3	;ECHO TEST

				;DATA TEST FLOW SWITCH KEYWORD CODES

	FLOBAS==7000		;FLOW CONTROL TYPE BASE VALUE

	NOFLOW==KWDBAS+FLOBAS+0	;NO FLOW CONTROL
	SEGFLO==KWDBAS+FLOBAS+1	;SEGMENT FLOW CONTROL
	MSGFLO==KWDBAS+FLOBAS+2	;MESSAGE FLOW CONTROL

				;DATA TEST NAK SWITCH KEYWORD CODES

	PERBAS==10000		;NAK & BACKPRESSURE TYPE BASE VALUE

	NONAKS==KWDBAS+PERBAS+0	;NEVER NAK
	PERNAK==KWDBAS+PERBAS+0	;NAK AFTER "N" SEGMENTS
	RANNAK==KWDBAS+PERBAS+200 ;NAK RANDOMLY

				;DATA TEST BPC SWITCH KEYWORD CODES

	NOBPC==KWDBAS+PERBAS+0	;NO BACKPRESSURE
	PERBPC==KWDBAS+PERBAS+0	;BACKPRESSURE AFTER "N" SEGMENTS
	RANBPC==KWDBAS+PERBAS+200 ;BACKPRESSURE RANDOMLY

	PAGE
	SUBTTL SYMBOL DEFINITIONS

;SWITCH CODES


	SWCBAS==200000		;SWITCH CODE BASE VALUE


				;TEST COMMAND SWITCHES

	TSTCOD==SWCBAS+1000	;"/TEST:" SWITCH CODE
	PRTCOD==SWCBAS+2000	;"/PRINT:" SWITCH CODE


				;CONNECT & DISCONNECT COMMAND SWITCHES

	DATCOD==SWCBAS+3000	;"/DATA:" SWITCH CODE

				;DATA & INTERRUPT COMMAND SWITCHES

	MSGCOD==SWCBAS+4000	;"/MSG:" SWITCH
	TIMCOD==SWCBAS+5000	;"/TIME:" SWITCH
	FLOCOD==SWCBAS+6000	;"/FLOW:" SWITCH
	BUFCOD==SWCBAS+7000	;"/BUFS:" SWITCH
	BAUCOD==SWCBAS+10000	;"/BAUD:" SWITCH
	NAKCOD==SWCBAS+11000	;"/NAK:" SWITCH
	BPCCOD==SWCBAS+12000	;"/BPC:" SWITCH

				;INTERRUPT COMMAND SWITCHES
				;"/MSG:" AND "/TIME:" COMMON WITH DATA COMMAND

	FLWCOD==SWCBAS+6000	;"/FLOW:" SWITCH

	PAGE
	SUBTTL DTSCMD - COMMAND SYNTAX


;*******************************************************************************
;*******************************************************************************
;+
;.BLANK 5
;.LITERAL
;
; This is the currently defined command syntax for DTS:
;
;
;	DTS>"HELP" ["(WITH DTS)"].
;
;	DTS>"TAKE" ["(COMMANDS FROM)"] command_file 
;			["(LOGGING OUTPUT ON)"] [log_file].
;
;	DTS>"TEST" [node_name] 
;			["/TEST:""CONNECT"|"DATA"|"DISCONNECT"|"INTERRUPT"]
;			["/PRINT:""YES"|"NO"].
;
;	DTS>"WAIT" ["(AND DON'T PROMPT)"].
;
;	DTS>"EXIT" ["(TO MONITOR)"].
;
	PAGE
	SUBTTL DTSCMD - COMMAND SYNTAX
;
; Subcommands are:
;
;	CONNECT_TEST>[ACCEPT] [/DATA:{STANDARD}]
;		     [REJECT]	     {NONE}
;				     {RECEIVED}
;
;	DISCONNECT_TEST>[DISCONNECT] [/DATA:{STANDARD}]
;			[ABORT]		    {NONE}
;					    {RECEIVED}
;
;	DATA_TEST>[SINK]     [/MSG:nnn] [/BUFS:nnn] [/TIME:nnn] [/BAUD:nnnnn] -
;		  [SEQUENCE]
;		  [PATTERN]
;		  [ECHO]
;
;			[/NAK:{NONE}   ] [/BPC:{NONE}   ]
;			      {RANDOM}	       {RANDOM}
;			      {nnn}	       {nnn}
;
;			[/NO-FLOW-CONTROL] 
;			[/MESSAGE-FLOW-CONTROL:nnn]
;			[/SEGMENT-FLOW-CONTROL:nnn]
;
;	INTERRUPT_TEST>[SINK]     [/MSG:nnn] [/TIME:nnn] [/FLOW:nnn]
;		       [SEQUENCE]
;		       [PATTERN]
;		       [ECHO]
;
;.END LITERAL
;-
;*******************************************************************************
;*******************************************************************************
	PAGE
	SUBTTL DTSCMD - COMMAND SYNTAX DEFINITION


;HERE IS THE PARSE INITIALIZATION AND PROMPT BLOCK, THE PARSE OF
; EACH COMMAND BEGINS HERE, NOTE THERE ARE EXIT ROUTINES SPECIFIED
; TO MAKE THE TAKE COMMAND WORK. THE PARSE ALWAYS CONTINUES TO
; THE COMMAND KEYWORD DISPATCH BLOCK AT LABEL "CMDS:" FROM HERE.

PDBCHN:	$INIT (CMDS,<$PREFILL(INIDEF)>)

;HERE IS THE COMMAND KEYWORD DISPATCH BLOCK, THE COMMAND NAMES ARE
; PARSED HERE. FROM HERE THE PARSE WILL CONTINUE WITH THE PDB FROM THE
; COMMAND KEYWORD TABLE WHICH IS AT LABEL "CMDTAB:".

CMDS:	$CRLF (<$ALTER(CMDKEY),$ACTION(ENDCO1)>)
CMDKEY:	$KEYDSP (CMDTAB,<$ACTION(SAVCMD)>)	;COMMAND TABLE

;HERE IS THE COMMAND KEYWORD DISPATCH TABLE, WHICH CONTAINS AN ENTRY
; FOR EACH OF THE POSSIBLE COMMANDS.

CMDTAB:	$STAB
	DSPTAB (EXICMD,EXIRTN,EXIT) ;EXIT COMMAND
	DSPTAB (HELCMD,HELRTN,HELP) ;HELP COMMAND
	DSPTAB (TAKCMD,DTSCM2,TAKE) ;TAKE COMMAND
	DSPTAB (TESCMD,TESRTN,TEST) ;TEST COMMAND
	DSPTAB (WAICMD,WAIRTN,WAIT) ;WAIT COMMAND
	$ETAB

;HERE IS THE COMMAND CONFIRMATION BLOCK, ALL COMMANDS SHOULD COME HERE
; TO BE TERMINATED. 

CFM:	$CRLF (<$ACTION(ENDCO1)>) ;END OF COMMAND

	PAGE
	SUBTTL EXIT, WAIT AND HELP COMMANDS

;EXIT COMMAND

EXICMD:	$NOISE (CFM,<TO MONITOR>)

;WAIT COMMAND

WAICMD:	$NOISE (CFM,<AND DON'T PROMPT>)

;HELP COMMAND

HELCMD:	$NOISE (CFM,<WITH DTS>)

	PAGE
	SUBTTL TAKE COMMAND

;TAKE COMMAND

TAKCMD:	$NOISE (TAKIFN,<COMMANDS FROM>)

TAKIFN:	$FILE (TAKNO1,<command file name>,<$PREFILL(GJFCMD),$ACTION(CMDSPL)>)

TAKNO1:	$NOISE (TAKOFN,<LOGGING OUTPUT ON>)

TAKOFN:	$FILE (TAKCFM,<log file name>,<$PREFILL(GJFLOG),$ACTION(LOGSPL)>)

TAKCFM:	$CRLF (<$ACTION (TAKSPL)>)

	PAGE
	SUBTTL TEST COMMAND

;TEST COMMAND

TESCMD:	$CRLF (<$ALTERNATE(TESNOD),$ACTION(ENDCO1)>)

TESNOD:	$NODE (TESSWC,<$FLAGS(CM%PO),$ALTER(TESSWT),$ACTION(SAVNOD)>) ;DTR NODE 

TESSWC:	$CRLF (<$ALTERNATE(TESSWT),$ACTION(ENDCO1)>)

TESSWT:	$SWITCH (0,TESTBL,<$DEFAULT(</TEST:DATA/PRINT:YES>)>)

TESTBL:	$STAB
	DSPTAB (PRTOPT,PRTCOD,PRINT:)	;PRINT SWITCH
	DSPTAB (TESTYP,TSTCOD,TEST:)	;TEST SWITCH
	$ETAB

	PAGE
	SUBTTL TEST COMMAND

TESTYP:	$KEY (TESSWC,TYPTBL,<$DEFAULT(DATA),$ACTION(SAVTST)>)	;THE TYPE OF TEST TO DO

TYPTBL:	$STAB
	KEYTAB (CONTST,CONNECT)
	KEYTAB (DATTST,DATA)
	KEYTAB (DISTST,DISCONNECT)
	KEYTAB (INTTST,INTERRUPT)
	$ETAB

PRTOPT:	$KEY (TESSWC,OPTTBL,<$DEFAULT(YES),$ACTION(SAVPRT)>)	;THE PRINT OPTION

OPTTBL:	$STAB
	KEYTAB (NOPRT,NO)	;DON'T PRINT
	KEYTAB (PRINT,YES)	;PRINT
	$ETAB


	PAGE
	SUBTTL CONNECT TEST SUBCOMMAND

;CONNECT TEST SUBCOMMAND

CONPRO:	ASCIZ\CONNECT_TEST>\	;CONNECT SUBCOMMAND PROMPT

CONSUB:	$INIT (COSBKY,<$PREFILL(INIDEF)>)

COSBKY:	$CRLF (<$ALTERNATE(COSKEY),$ACTION(ENDCO1)>)

COSKEY:	$KEY (COSBSW,COSBTB,<$ALTERNATE(COSSWT),$DEFAULT(ACCEPT),$ACTION(SAVSUB)>)

COSBTB:	$STAB
	KEYTAB (ACCTST,<ACCEPT>) ;ACCEPT TEST
	KEYTAB (REJTST,<REJECT>) ;REJECT TEST
	$ETAB

COSBSW:	$CRLF (<$ALTERNATE(COSSWT),$ACTION(ENDCO1)>)

	PAGE
	SUBTTL CONNECT TEST SUBCOMMAND

COSSWT:	$SWITCH (COSBDA,COSBST,<$DEFAULT(/DATA:)>) ;DATA SWITCH

COSBST:	$STAB
	KEYTAB (DATCOD,<DATA:>)	;DATA SWITCH
	$ETAB

COSBDA:	$KEY (CFM,DATTYP,<$DEFAULT(NONE),$ACTION(SAVOPT)>)	;DATA TYPE KEYWORD

DATTYP:	$STAB
	KEYTAB (DATNON,<NONE>)	;NO DATA
	KEYTAB (DATRCV,<RCVD>,<CM%INV>) ;ABBREVIATION 
	KEYTAB (DATRCV,<RECEIVED>) ;RECEIVED USER DATA
	KEYTAB (DATSTD,<STANDARD>) ;STANDARD DATA
	KEYTAB (DATSTD,<STD>,<CM%INV>) ;ABBREVIATION
	$ETAB

	PAGE
	SUBTTL DISCONNECT TEST SUBCOMMAND

;DISCONNECT SUBCOMMAND

DISPRO:	ASCIZ\DISCONNECT_TEST>\	;DISCONNECT SUBCOMMAND PROMPT

DISSUB:	$INIT (DISBKY,<$PREFILL(INIDEF)>)

DISBKY:	$CRLF (<$ALTER(DISKEY),$ACTION(ENDCO1)>)

DISKEY:	$KEY (COSBSW,DISBTB,<$ALTERNATE(COSSWT),$DEFAULT(DISC),$ACTION(SAVSUB)>)

;NOTE: /DATA SWITCH COMMON WITH CONNECT COMMAND

DISBTB:	$STAB
	KEYTAB (ABTTST,<ABORT>)	;ABORT TEST
	KEYTAB (ABTTST,<ABT>,<CM%INV>) ;ABREVIATION
	KEYTAB (DSCTST,<DISCONNECT>) ;DISCONNECT TEST
	KEYTAB (DSCTST,<DSC>,<CM%INV>) ;ABBREVIATION
	$ETAB

	PAGE
	SUBTTL DATA TEST SUBCOMMAND

;DATA TEST SUBCOMMAND

DATPRO:	ASCIZ\DATA_TEST>\	;DATA TEST PROMPT

DATSUB:	$INIT (DASBKY,<$PREFILL(INIDEF)>)

DASBKY:	$CRLF (<$ALTERNATE(DASKEY),$ACTION(ENDCO1)>)

DASKEY:	$KEY (DASBSW,DASBTB,<$ALTERNATE(DASSWT),$DEFAULT(SINK),$ACTION(SAVDAT)>)

DASBTB:	$STAB
	KEYTAB (ECHTST,<ECHO>)	;ECHO TEST
	KEYTAB (PATTST,<PATTERN>) ;PATTERN TEST
	KEYTAB (SEQTST,<SEQUENCE>) ;SEQUENCE TEST
	KEYTAB (SNKTST,<SINK>)	;SINK TEST
	$ETAB

DASBSW:	$CRLF (<$ALTERNATE(DASSWT),$ACTION(ENDCO1)>)

	PAGE
	SUBTTL DATA TEST SUBCOMMAND

DASSWT:	$SWITCH (0,DASBST,<$ACTION(SAVFCO)>)	;DATA SUBCOMMAND SWITCHES

DASBST:	$STAB
	DSPTAB (BAUVAL,BAUCOD,<BAUD:>)		;BAUD RATE
	DSPTAB (BPCVAL,BPCCOD,<BACK-PRESSURE:>,<CM%INV>)
	DSPTAB (BPCVAL,BPCCOD,<BPC:>)		;BACK PRESSURE CONTROL
	DSPTAB (BUFVAL,BUFCOD,<BUFS:>)		;BUFFERS
	DSPTAB (BAUVAL,BAUCOD,<LINE-SPEED:>,<CM%INV>)
	KEYTAB (DASBST+9,<M>,<CM%INV!CM%ABR>)  ;ABBREVIATION FOR MESSAGE-LENGTH
	KEYTAB (DASBST+8,<ME>,<CM%INV!CM%ABR>)	;ABBR FOR MSG-FLOW-CTL
	DSPTAB (MESVAL,MSGFLO,<MESSAGE-FLOW-CONTROL:>)
	DSPTAB (MSZVAL,MSGCOD,<MESSAGE-LENGTH:>,<CM%INV>)
	DSPTAB (MSZVAL,MSGCOD,<MSG:>)		;MESSAGE SIZE
	DSPTAB (NAKVAL,NAKCOD,<NAK:>) ;NAK CONTROL
	DSPTAB (DASBSW,NOFLOW,<NO-FLOW-CONTROL>)
	DSPTAB (SEGVAL,SEGFLO,<SEGMENT-FLOW-CONTROL:>)
	DSPTAB (TIMVAL,TIMCOD,<TIME:>) ;TIME TO TEST
	$ETAB

BAUVAL:	$NUMBER (DASBSW,<^D10>,<baud rate in BPS>,<$ACTION(SAVBAU)>)

BUFVAL:	$NUMBER (DASBSW,<^D10>,<number of buffers to send>,<$ACTION(SAVBUF)>)

	PAGE
	SUBTTL DATA TEST SUBCOMMAND

MSZVAL:	$NUMBER (DASBSW,<^D10>,<message length>,<$ACTION(SAVMSZ)>)

TIMVAL:	$TIME (DASBSW,<$HELP(<elapsed test>),$ACTION(SAVTIM)>)

MESVAL:	$NUMBER (DASBSW,<^D10>,<number of receive buffers for DTR to allocate>,<$ACTION(SAVFMV)>)

SEGVAL:	$NUMBER (DASBSW,<^D10>,<number of receive buffers for DTR to allocate>,<$ACTION(SAVFSV)>)

	PAGE
	SUBTTL DATA TEST SUBCOMMAND

BPCVAL:	$KEYDSP (DASBKN,<$ACTION(SAVBPC),$ALTERNATE(BPRVAL)>)

DASBKN:	$STAB
	DSPTAB (DASBSW,NONAKS,<NONE>)
	DSPTAB (DASBSW,RANNAK,<RANDOM>)
	$ETAB

BPRVAL:	$NUMBER (DASBSW,<^D10>,<number of segments to accept PER each backpressure>,<$ACTION(SAVBPR)>)

NAKVAL:	$NUMBER (DASBSW,<^D10>,<number of segments to accept PER each reject>,<$ACTION(SAVNPR),$ALTERNATE(NPRVAL)>)

DASNKN:	$STAB
	DSPTAB (DASBSW,NONAKS,<NONE>)
	DSPTAB (DASBSW,RANNAK,<RANDOM>)
	$ETAB

NPRVAL:	$KEYDSP (DASNKN,<$ACTION(SAVNAK)>)

	PAGE
	SUBTTL INTERRUPT TEST SUBCOMMAND

;INTERRUPT SUBCOMMAND

INTPRO:	ASCIZ\INTERRUPT_TEST>\

INTSUB:	$INIT (INSBKY,<$PREFILL(INIDEF)>)

INSBKY:	$CRLF (<$ALTER(INSKEY),$ACTION(ENDCO1)>)

INSKEY:	$KEY (INSBSW,DASBTBI,<$DEFAULT(SINK),$ALTERNATE(INSSWT),$ACTION(SAVDAT)>)

INSBSW:	$CRLF (<$ALTER(INSSWT),$ACTION(ENDCO1)>)

	PAGE
	SUBTTL INTERRUPT TEST SUBCOMMAND

INSSWT:	$SWITCH (0,INSBST)

INSBST:	$STAB
	DSPTAB (FLWVAL,FLWCOD,<FLOW:>)
	DSPTAB (MSGVAL,MSGCOD,<INTERRUPT-MESSAGE-LENGTH:>,<CM%INV>)
	DSPTAB (MSGVAL,MSGCOD,<MSG:>)
	DSPTAB (TMEVAL,TIMCOD,<TIME:>)
	$ETAB

FLWVAL:	$NUMBER (INSBSW,<^D10>,<number of interrupts to buffer>,<$ACTION(SAVFLW)>)

MSGVAL:	$NUMBER (INSBSW,<^D10>,<interrupt message length>,<$ACTION(SAVMSZ)>)

TMEVAL:	$TIME (INSBSW,<$HELP(<elapsed test>),$ACTION(SAVTIM)>)

	PAGE
	SUBTTL STORAGE FOR TAKE COMMAND


	BUFSIZ==200		;SIZE OF INPUT TEXT BUFFER

IOJFN:	BLOCK 1			;INPUT & OUTPUT JFN FOR TAKE COMMAND
TAKFLG:	BLOCK 1			;NON-ZERO IF PROCESSING INDIRECT FILE
GJFBLK:	BLOCK GJFSIZ		;GTJFN BLOCK FOR PARSER
MSGBUF:	BLOCK BUFSIZ		;MESSAGE BUFFER
BUFFER:	BLOCK BUFSIZ		;INPUT TEXT STORED HERE
NAMBUF:	BLOCK 8			;BUFFER FOR TAKE FILE NAME

	PAGE
	SUBTTL PARSER EXIT ROUTINES


;*******************************************************************************
;*******************************************************************************

;ON THE FOLLOWING PAGES ARE THE PARSER EXIT ROUTINES REQUIRED TO IMPLEMENT
; THE TAKE COMMAND. THIS IS ALSO INTENDED TO DOCUMENT AND DEMONSTRATE
; THE USE OF THE THREE TYPES OF PARSER EXITS.

;*******************************************************************************
;*******************************************************************************

	PAGE
	SUBTTL INIDEF - INITIALIZATION DEFAULT ROUTINE

;DEFAULT EXIT ROUTINE FOR $INIT FUNCTION
;
; THIS ROUTINE IS CALLED BY THE PARSE ROUTINE PRIOR TO EACH EXECUTION OF THE
; .CMINI COMND JSYS FUNCTION CALL. ITS PURPOSE IS TO CLEAN UP ANY UNOPEN JFN'S
; FROM PREVIOUS COMMANDS, AND IF COMMANDS ARE COMING FROM A FILE TO DETERMINE
; IF END OF FILE HAS BEEN REACHED BY THE PARSE OF THE PREVIOUS COMMAND TEXT
; STRING. IF THE ROUTINE DISCOVERS THAT ALL BYTES IN THE FILE HAVE BEEN READ
; IT CLOSES BOTH THE COMMAND FILE AND THE LOG FILE, RESETS THE CSB INPUT/OUTPUT
; JFN'S TO BE THE TTY:, CLEARS THE TAKE FLAG, AND RETURNS.
; AT ENTRY THE AC'S CONTAIN THE FOLLOWING:
;
;	T1/ ADDRESS OF PDB TO BE PARSED
;	T2/ ADDRESS OF THE DEFAULT ROUTINE
;	T3/ ADDRESS OF COMMAND RETURN BLOCK ???
;	T4/ GARBAGE
;	P1/ ADDRESS OF THE COMMAND STATE BLOCK
;

INIDEF:				;THIS IS THE INITIALIZATION DEFAULT EXIT ROUTINE
	MOVX   T1,<CZ%NCL!.FHSLF> ;GET FLAGS FOR CLZFF
	CLZFF			;RELEASE ALL UNOPEN JFN'S
	 ERJMP JSERR0
	SKIPN  TAKFLG		;TAKING COMMANDS FROM FILE ?
	RET			;NO, RETURN TO PARSER
	HLRZ   T1,IOJFN		;YES, GET INPUT JFN
	SKIPE  INSIZ#		;DONE A SIZEF YET ?
	JRST   ..GPOS		;YES, JUST FIN CURRENT POSITION
	SIZEF			;NO, GET BYTE SIZE OF FILE
	 ERJMP JSERR0
	MOVEM  T2,INSIZ#	;SAVE SIZE OF FILE
..GPOS:				;HERE WHEN ALREADY DID FIRST SIZEF
	RFPTR			;GET CURRENT BYTE POSITION
	 ERJMP JSERR0
	CAML   T2,INSIZ#	;READ ALL IN FILE ?
	JRST   [HRRZ   T1,IOJFN	;YES, CLOSE .LOG FILE
		CLOSF
		 ERCAL JSERR0
		HLRZ   T1,IOJFN	;CLOSE .CMD FILE
		CLOSF
		 ERCAL JSERR0
		MOVE   T1,[.PRIIN,,.PRIOU] ;RESET TO TTY
		MOVEM  T1,IOJFN
		MOVEM  T1,.CMIOJ(P1)	;RESET CSB ALSO
		SETZM  TAKFLG		;TURN OFF TAKE FLAG
		SETZM  INSIZ#		;RESET INPUT FILE SIZE
		RET]			;RETURN
	MOVE   T1,IOJFN		;NO, GET THE CURRENT INPUT/OUTPUT JFN'S
	;...
	PAGE
	SUBTTL INIDEF - INITIALIZATION DEFAULT ROUTINE

	;... CONTINUED...
	;
	MOVEM  T1,.CMIOJ(P1)	;STORE TAKE JFN'S IN COMMAND STATE BLOCK
	HRRZ   T1,.CMIOJ(P1)	;GET OUTPUT JFN
	DVCHR			;SEE IF IT'S TERMINAL
	LDB    T2,[POINTR (T2,DV%TYP)] ;ISOLATE DEVICE TYPE
	CAIN   T2,.DVTTY	;IS IT TTY ?
	RET			;YES, NO NEED TO WRITE PROMPT, RETURN
	CALL   TSTCOL		;NO, SEE IF CR/LF NEEDED
	HRROI  T1,PROMPT 	;PUT PROMPT ON TERMINAL
	PSOUT
	RET			;RETURN TO PARSER

	PAGE
	SUBTTL EXIT ROUTINES FOR TAKE COMMAND
;
; TAKE (COMMANDS FROM) FILE-SPEC (LOGGING OUTPUT ON) FILE-SPEC
;


;
;DEFAULT EXIT ROUTINE FOR INPUT FILE SPEC PARSE
;
; THIS ROUTINE IS CALLED BY THE PARSER PRIOR TO THE PARSE OF THE COMMAND FILE
; INPUT FILE SPEC. ITS PURPOSE IS TO PROVIDE A USER SUPPLIED GTJFN BLOCK AND
; SET UP DEFAULTS WITHIN THE BLOCK.
;
; AT ENTRY THE AC'S CONTAIN THE FOLLOWING:
;
;	T1/ ADDRESS OF PDB ABOUT TO BE PARSED
;	T2/ ADDRESS OF THE DEFAULT ROUTINE
;	T3/ ADDRESS OF PREVIOUS PDB GIVEN,,FOUND
;	T4/ ???
;	P1/ ADDRESS OF COMMAND STATE BLOCK
;



GJFCMD:				;DEFAULT EXIT ROUTINE TO SET UP GTJFN BLOCK
	CALL   CLRGJF		;GO CLEAR GTJFN BLOCK
	MOVX   T1,GJ%OLD	;GET EXISTING FILE FLAG
	MOVEM  T1,GJFBLK+.GJGEN	;STORE GTJFN FLAGS
	HRROI  T1,[ASCIZ/CMD/]	;GET DEFAULT FILE TYPE FIELD
	MOVEM  T1,GJFBLK+.GJEXT	;STORE DEFAULT EXTENSION
	MOVEI  T1,GJFBLK	;GET ADDRESS OF GTJFN BLOCK
	MOVEM  T1,.CMGJB(P1)	;STORE IT IN COMMAND STATE BLOCK
	RET			;AND RETURN


	PAGE
	SUBTTL EXIT ROUTINES FOR TAKE COMMAND

;
;SPECIAL EXIT ROUTINE FOR INPUT FILE SPEC
;
; THIS ROUTINE IS CALLED BY THE PARSE ROUTINE AFTER A SUCCESFUL
; PARSE OF THE .CMFIL FUNCTION TO GET THE INPUT FILE JFN. ITS PURPOSE
; IS TO SAVE THE JFN FOR USE LATER.
;
; AT ENTRY THE AC'S CONTAIN THE FOLLOWING:
;
;	T1/ FUNCTION CODE
;	T2/ DATA FROM PARSE
;	T3/ PDB GIVEN,,PDB FOUND
;	T4/ ADDRESS OF EXIT ROUITNE
;	P1/ ADDR OF COMMAND STATE BLOCK
;

CMDSPL:				;SPECIAL EXIT ROUTINE FOR TAKE INPUT FILE
	HRLM   T2,IOJFN		;SAVE INPUT JFN FOR COMMANDS
	RET			;RETURN

	PAGE
	SUBTTL EXIT ROUTINES FOR TAKE COMMAND

;
;DEFAULT EXIT ROUTINE FOR OUTPUT FILE SPEC PARSE
;
; THIS ROUTINE IS CALLED BY THE PARSER PRIOR TO THE PARSE OF THE LOG FILE
; OUTPUT FILE SPEC. ITS PURPOSE IS TO PROVIDE A USER SUPPLIED GTJFN BLOCK AND
; SET UP DEFAULTS WITHIN THE BLOCK.
;
; AT ENTRY THE AC'S CONTAIN THE FOLLOWING:
;
;	T1/ ADDRESS OF PDB ABOUT TO BE PARSED
;	T2/ ADDRESS OF THE DEFAULT ROUTINE
;	T3/ ADDRESS OF PREVIOUS PDB GIVEN,,FOUND
;	T4/ ???
;	P1/ ADDRESS OF COMMAND STATE BLOCK
;


GJFLOG:				;DEFAULT EXIT ROUITNE FOR LOG FILE
	CALL   CLRGJF		;GO CLEAR GTJFN BLOCK USED BY COMND JSYS
	MOVX   T1,GJ%FOU	;GET FLAG SAYING FILEIS FOR OUTPUT USE
	MOVEM  T1,GJFBLK+.GJGEN	;SAVE GTJFN FLAGS
	SETZM  NAMBUF		;INITIALIZE FILENAME BUFFER
	HRROI  T1,NAMBUF	;GET POINTER TO WHERE FILENAME IS TO GO
	HLRZ   T2,IOJFN		;GET INPUT JFN
	MOVX   T3,<FLD(.JSAOF,JS%NAM)> ;GET FLAG BITS SAYING OUTPUT NAME ONLY
	JFNS			;GET FILE NAME OF INPUT FILE
	SKIPE  NAMBUF		;ANY FILENAME ?
	HRROI  T1,NAMBUF	;YES, GET A POINTER TO THE FILE NAME FOR INPUT
	MOVEM  T1,GJFBLK+.GJNAM	;STORE DEFAULT NAME OF OUTPUT FILE
	HRROI  T1,[ASCIZ/LOG/]	;GET DEFAULT FILE TYPE OF OUTPUT FILE
	MOVEM  T1,GJFBLK+.GJEXT	;STORE DEFAULT EXTENSION
	MOVEI  T1,GJFBLK	;GET ADDRESS OF GTJFN BLOCK
	MOVEM  T1,.CMGJB(P1)	;STORE IT IN CSB
	RET			;RETURN

	PAGE
	SUBTTL EXIT ROUTINES FOR TAKE COMMAND

;
;SPECIAL EXIT ROUTINE FOR OUTPUT FILE SPEC
;
; THIS ROUTINE IS CALLED BY THE PARSE ROUTINE AFTER A SUCCESFUL
; PARSE OF THE .CMFIL FUNCTION TO GET THE OUTPUT FILE JFN. ITS PURPOSE
; IS TO SAVE THE JFN FOR USE LATER.
;
; AT ENTRY THE AC'S CONTAIN THE FOLLOWING:
;
;	T1/ FUNCTION CODE
;	T2/ DATA FROM PARSE
;	T3/ PDB GIVEN,,PDB FOUND
;	T4/ ADDRESS OF EXIT ROUITNE
;	P1/ ADDR OF COMMAND STATE BLOCK
;

LOGSPL:	HRRM    T2,IOJFN	;SAVE THE LOG JFN
	RET			;RETURN



	PAGE
	SUBTTL EXIT ROUTINES FOR TAKE COMMAND

;
;SPECIAL EXIT ROUTINE FOR TAKE COMMAND CONFIRMATION
;
; THIS ROUTINE IS CALLED BY THE PARSE ROUTINE AFTER A SUCCESFUL
; PARSE OF THE .CMCFM FUNCTION TO TERMINATE THE TAKE COMMAND. ITS PURPOSE
; IS TO PERFORM THE ACTION OF THE TAKE COMMAND ENTIRELY WITHIN THE
; EXIT ROUTINE STRUCTURE. IT USES THE JFN'S SAVED PREVIOUSLY, OPENS THE
; FILES THEY REPRESENT, AND IF THE OPENS COMPLETE SUCCESSFULLY SETS A FLAG
; TO INDICATE THAT A TAKE COMMAND IS IN PROGRESS.
;
; AT ENTRY THE AC'S CONTAIN THE FOLLOWING:
;
;	T1/ FUNCTION CODE
;	T2/ DATA FROM PARSE
;	T3/ PDB GIVEN,,PDB FOUND
;	T4/ ADDRESS OF EXIT ROUITNE
;	P1/ ADDR OF COMMAND STATE BLOCK
;

TAKSPL:				;SPECIAL EXIT ROUTINE FOR $CRLF FUNCTION
	HLRZ   T1,IOJFN		;GET INPUT JFN
	MOVE   T2,[7B5+OF%RD]	;7 BIT BYTES, READ ACCESS
	OPENF			;OPEN INPUT FILE
	 ERJMP JSERR0
	HRRZ   T1,IOJFN		;GET OUTPUT JFN
	CAIN T1,.PRIOU		;STILL PRIMARY OUTPUT JFN ?
	JRST TAKE30		;NO OUTPUT JFN, GO ON
	MOVE T2,[7B5+OF%WR]	;7 BIT BYTES, WRITE ACCESS
	OPENF			;OPEN OUTPUT FILE
	 JRST  [HLRZ   T1,IOJFN	;GET INPUT JFN AGAIN
		CLOSF		;CLOSE INPUT FILE
		 JFCL		;IGNORE ERRORS HERE
		JRST JSERR0]
;
; NOW SAVE NEW JFN'S AND RETURN TO PARSER
;



TAKE30:	MOVE   T1,IOJFN		;GET INPUT/OUTPUT JFN'S
	MOVEM  T1,.CMIOJ(P1)	;SAVE NEW JFN'S IN CSB
	SETOM TAKFLG		;MARK THAT COMMANDS ARE COMING FROM FILE
	RET			;RETURN TO PARSER



	PAGE
	SUBTTL ENDCO1 - WRITE COMMAND LINE TO LOG IF DOING TAKE

;
; THIS ROUTINE SHOULD BE CALLED AFTER A SUCCESFUL PARSE EACH COMMAND.
; ITS PURPOSE IS TO WRITE THE COMMAND STRING TO BOTH THE LOG FILE AND THE TTY
; IF COMMANDS ARE COMING FROM A FILE.
; AT ENTRY T1 CONTAINS A POINTER TO THE COMMAND STRING.
;





ENDCMD:
ENDCO1:				;HERE TO JUST ECHO COMMAND LINE
	MOVE  T1,.CMBFP(P1)	;GET POINTER TO INPUT TEXT
	SKIPE  TAKFLG		;DOING TAKE COMMAND ?
	CALL   SNDSTR		;YES, WRITE COMMAND LINE TO LOG
	RET			;NO, JUST RETURN

	PAGE
	SUBTTL ACTION EXIT ROUTINES FOR TEST COMMANDS AND SUBCOMMANDS

;SAVE THE COMMAND FOUND

SAVCMD:				;HERE ON PARSE OF COMMAND KEYWORD
	HRRZ T1,(T2)		;GET ADDR OF CODE,,NXT ENTRY FROM DSPTAB 
	HLRZ T1,(T1)		;GET ROUTINE ADDRESS
	MOVEM T1,TMPCMD		;SAVE IT IN TEMPORARY
	RET

;SAVE THE NODE NAME STRING

SAVNOD:				;HERE ON NODE NAME PARSE
	HRROI T1,NODSTR		;POINT TO OUR STRING AREA
	MOVE T2,.CMABP(P1)	;GET ATOM POINTER
	SETZI T3,0		;COPY TO NULL
	SOUT
	HRROI T1,TMPNOD		;SAVE AS DEFAULT
	MOVE T2,.CMABP(P1)
	SOUT
	MOVE T1,DTSARG
	MOVE T2,[POINT 7,NODSTR]
	MOVEM T2,.DTNOD(T1)	;SAVE POINTER IN CALLERS ARG
	RET

;SAVE TEST TYPE

SAVTST:				;HERE ON PARSE OF TEST TYPE KEYWORD
	MOVE T1,DTSARG
	LOAD T2,CODE,(T2)	;GET CODE FOUND
	DPB T2,[POINT 7,.DTTYP(T1),35]
	MOVEM T2,TMPTST		;SAVE FOR USE AS DEFAULT
	MOVE T2,.+2(T2)		;GET COUNT OF OPTIONAL DATA
	JRST .+5		;BRANCH AROUND TABLE
	<2>			;CONNECT TEST
	<10>			;DATA TEST
	<2>			;DISCONNECT TEST
	<3>			;INTERRUPT TEST
	MOVEM T2,.DTCNT(T1)	;STORE IN CALLERS ARG
	RET

;SAVE PRINT OPTION

SAVPRT:				;HERE ON PARSE OF PRINT OPTION KEYWORD
	MOVE T1,DTSARG
	LOAD T2,CODE,(T2)
	DPB T2,[POINT 1,.DTTYP(T1),28]
	MOVEM T2,TMPPRT		;SAVE FOR USE AS DEFAULT
	RET

	PAGE
	SUBTTL ACTION EXIT ROUTINES FOR TEST COMMANDS AND SUBCOMMANDS

;SAVE TEST SUBTYPE FOR CONNECT & DISCONNECT

SAVSUB:				;HERE ON PARSE OF SUB TYPE
	MOVE T1,DTSARG
	LOAD T2,CODE,(T2)
	MOVEM T2,TMPSUB		;SAVE FOR USE AS DEFAULT
	ADD T2,TMPOPT
	MOVEM T2,.DTSUB(T1)
	RET

;SAVE OPTIONAL DATA TYPE FOR CONNECT & DISCONNECT

SAVOPT:				;HERE ON PARSE OF OPTIONAL DATA TYPE KEYWORD
	MOVE T1,DTSARG
	LOAD T2,CODE,(T2)
	MOVEM T2,TMPOPT		;SAVE FOR USE AS DEFAULT
	ADD T2,TMPSUB
	MOVEM T2,.DTSUB(T1)
	RET

;SAVE DATA SUB TYPE FOR DATA & INTERRUPT

SAVDAT:				;HERE ON PARSE OF DATA TEST TYPE
	MOVE T1,DTSARG
	LOAD T2,CODE,(T2)
	MOVEM T2,TMPSUB
	MOVEM T2,.DTSUB(T1)
	RET

;SAVE BAUD RATE

SAVBAU:				;HERE ON PARSE OF BAUD RATE VALUE
	MOVE T1,DTSARG
	MOVEM T2,.DTBAU(T1)
	MOVEM T2,TMPBAU		;SAVE FOR USE AS DEFAULT
	RET

;SAVE BUFFERS VALUE

SAVBUF:				;HERE ON PARSE OF BUFFER VALUE
	MOVE T1,DTSARG
	MOVEM T2,.DTBUF(T1)
	MOVEM T2,TMPBUF		;SAVE FOR USE AS DEFAULT
	RET

	PAGE
	SUBTTL ACTION EXIT ROUTINES FOR TEST COMMANDS AND SUBCOMMANDS

;SAVE MESSAGE LENGTH

SAVMSZ:				;HERE ON PARSE OF MSG VALUE
	MOVE T1,DTSARG
	MOVEM T2,TMPMSZ		;SAVE FOR USE AS DEFAULT
	IDIVI T2,400		;GET VALUE MOD 2**8
	MOVEM T3,.DTMSG(T1)
	MOVEM T2,.DTMSG+1(T1)
	RET

;SAVE ELAPSED TEST TIME

SAVTIM:				;HERE ON PARSE OF ELPASED TIME VALUE
	SETZI T4,		;STD CONVERSION
	ODCNV			;CONVERT TO SECONDS PAST MIDNIGHT
	 JSCONT
	MOVE T1,DTSARG
	HRRZM T4,.DTTIM(T1)	;TIME IN SECONDS IN RH OF AC4
	HRRZM T4,TMPTIM		;SAVE FOR USE AS DEFAULT
	RET

;SAVE FLOW CONTROL OPTION (DATA TEST)

SAVFLO:				;HERE ON PARSE OF FLOW CONTROL KEYWORD
	MOVE T1,DTSARG
	HRRZ T2,(T2)		;DISPATCH ENTRY HAS ADDRESS OF CODE
	LOAD T2,DCODE,(T2)
	MOVEM T2,.DTFCO(T1)
	MOVEM T2,TMPFCO		;SAVE FOR USE AS DEFAULT
	MOVE T2,FCVTAB(T2)	;GET FLOW CTL VALUE
	MOVEM T2,.DTFCV(T1)
	RET
FCVTAB:				;FLOW OPTION/VALUE TABLE
	<0>			;NO FLOW CONTROL
	<1>			;SEGMENT FLOW CONTROL
	<1>			;MESSAGE FLOW CONTROL


;SAVE FLOW CONTROL VALUE (DATA TEST)

SAVFMV:				;HERE ON PARSE OF MESSAGE FLOW CONTROL VALUE
	MOVE T1,DTSARG
	MOVEM T2,.DTFCV(T1)
	MOVEM T2,TMPFCV		;SAVE FOR USE AS DEFAULT
	MOVEI T2,2		;MESSAGE FLOW OPTION
	MOVEM T2,.DTFCO(T1)
	MOVEM T2,TMPFCO		;SAVE FOR USE AS DEFAULT
	RET

	PAGE
	SUBTTL ACTION EXIT ROUTINES FOR TEST COMMANDS AND SUBCOMMANDS

SAVFSV:				;HERE ON PARSE OF SEGMENT FLOW CONTROL VALUE
	MOVE T1,DTSARG
	MOVEM T2,.DTFCV(T1)
	MOVEM T2,TMPFCV		;SAVE FOR USE AS DEFAULT
	MOVEI T2,1		;SEGMENT FLOW OPTION
	MOVEM T2,.DTFCO(T1)
	MOVEM T2,TMPFCO		;SAVE FOR USE AS DEFAULT
	RET

;SAVE BACK PRESSURE OPTION

SAVBPC:				;HERE ON PARSE OF BPC OPTION KEYWORD
	MOVE T1,DTSARG
	HRRZ T2,(T2)		;DISPATCH ENTRY HAS ADDRESS OF CODE
	LOAD T2,DCODE,(T2)
	MOVEM T2,.DTBPV(T1)
	MOVEM T2,TMPBPC		;SAVE FOR USE AS DEFAULT
	RET

;SAVE NAK OPTION

SAVNAK:				;HERE ON PARSE OF NAK OPTION KEYWORD
	MOVE T1,DTSARG
	HRRZ T2,(T2)		;DISPATCH ENTRY HAS ADDRESS OF CODE
	LOAD T2,DCODE,(T2)
	MOVEM T2,.DTNAK(T1)
	MOVEM T2,TMPNAK		;SAVE FOR USE AS DEFAULT
	RET

;SAVE BPC AND NAK PER INTERVAL

SAVBPR:				;HERE ON PARSE OF BPC PER VALUE
	MOVE T1,DTSARG
	MOVEM T2,.DTBPV(T1)
	MOVEM T2,TMPBPC		;SAVE FOR USE AS DEFAULT
	RET

SAVNPR:				;HERE ON PARSE OF NAK PER VALUE
	MOVE T1,DTSARG
	MOVEM T2,.DTNAK(T1)
	MOVEM T2,TMPNAK		;SAVE FOR USE AS DEFAULT
	RET

	PAGE
	SUBTTL ACTION EXIT ROUTINES FOR TEST COMMANDS AND SUBCOMMANDS

;SAVE INTERRUPT FLOW CONTROL VALUE

SAVFLW:				;HERE ON PARSE OF INT FLOW VALUE
	MOVE T1,DTSARG
	MOVEM T2,.DTFOP(T1)
	MOVEM T2,TMPFLW		;SAVE FOR USE AS DEFAULT
	RET

;SAVE FLOW CONTROL OPTION

SAVFCO:				;HERE ON PARSE OF SWITCHES IN DATA SUBCOMMAND
	MOVE T1,DTSARG
	HRRZ T2,(T2)		;GET ADDR OF CODE,,NXT
	HLRZ T2,(T2)		;GET CODE
	CAIE T2,NOFLOW		;NO FLOW CONTROL ?
	RET			;NO, NO ACTION REQUIRED
	SETZM .DTFCO(T1)	;YES, SET IT
	MOVEI T2,1		;FLOW CTL VALUE = 1
	MOVEM T2,.DTFCV(T1)
	SETZM TMPFCO		;SAVE FOR NEW DEFAULTS
	MOVEM T2,TMPFCV
	RET

	PAGE
	SUBTTL %%%%%%%%%%%%%% TEMPORARY TEST CODE %%%%%%%%%%%%%%%%%

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

;THIS CODE IS TEMPORARY TO ALLOWING TESTING/DEBUGGING AS A STANDALONE PGM

ENTER:				;BEGIN HERE
	MOVE   P,[IOWD STKSIZ,STACK] ;INIT POINTER TO STACK
	SETZM  TAKFLG		;MARK THAT TAKE FILE NOT BEING PROCESSED
	CALL SETDEF		;SET INITIAL DEFAULTS
	MOVEI T1,DTSBLK
	CALL DTSCMD
	HALTF
	MOVEI T1,DTSBLK		;PRINT OUT TCB
	CALL DTSPRT
	JRST ENTER

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

	PAGE
	SUBTTL MAINLINE ROUTINE

DTSCMD:				;EXTERNAL ENTRY POINT
	TRVAR <DTSARG,TMPCMD,<TMPNOD,8>,TMPTST,TMPPRT,TMPSUB,TMPOPT,TMPBAU,TMPMSZ,TMPTIM,TMPFCO,TMPFCV,TMPBUF,TMPBPC,TMPNAK,TMPFLW> ;TRANSIENT STORAGE
	MOVEM T1,DTSARG		;SAVE OUR ARGUMENT ADDRESS
	SETZM (T1)		;CLEAR OUT ARG BLOCK
	HRLI T2,(T1)		;FROM
	HRRI T2,1(T1)		;TO
	BLT T2,DTSSIZ-1(T1)	;CLEAR IT
	CALL SETDEF		;SET UP INITIAL DEFAULTS, WORKS ONCE ONLY

;SET UP DEFAULTS FOR TEST COMMAND 

DTSCM1:				;HERE TO PARSE NEXT COMMAND 
	MOVE T1,DTSARG		;RESTORE ARG POINTER
	HRROI T2,DFTNOD		;POINTER TO DEFAULT NODE NAME
	MOVEM T2,.DTNOD(T1)	;STORE POINTER TO NODE
	SETZM TMPNOD		;MAKE IT NULL, IN CASE DFTNOD IS NULL
	HRROI T1,TMPNOD		;PRIME TEMP NOD STRING
	SETZI T3,		;TO NULL
	SOUT
	MOVE T2,DFTTST		;GET DEFAULT TEST TYPE
	MOVEM T2,TMPTST		;PRIME THE TEMP
	IOR T2,DFTPRT		;AND DEFAULT PRINT OPTION
	MOVE T1,DTSARG		;RESTORE ARG PTR
	MOVEM T2,.DTTYP(T1)
	MOVE T1,DFTPRT
	MOVEM T1,TMPPRT
	MOVEI T1,TESRTN		;DEFAULT COMMAND ALWAYS TEST
	MOVEM T1,TMPCMD

DTSCM2:				;HERE AFTER TAKE COMMAND

	HRROI  T1,PROMPT	;GET POINTER TO PROMPT STRING
	MOVEI  T2,PDBCHN	;GET HEAD OF PDB TREE
	MOVEI  T3,CMDBLK	;GET ADDRESS OF AREA TO STORE RESULT
	CALL   PARSE##		;GO PARSE A COMMAND, RETURN SKIP ON SUCCESS
	PRTWRN <INVALID COMMAND>,,<$GOTO(DTSCM1)> ;START OVER
	JRST @TMPCMD		;DISPATCH TO COMMAND FOUND


	PAGE
	SUBTTL TESRTN - TEST COMMAND ROUTINE, DISPATCH TO SUBCOMMAND

;ROUTINE TO DISPATCH TO APPROPRIATE SUBCOMMAND ROUTINE BASED ON THE
; TEST TYPE

TESRTN:				;TEST COMMAND, GO INTO SUBCOMMAND MODE
	MOVE  T1,DTSARG		;GET ADDRESS OF TEST CONTROL BLOCK
	LDB T2,[POINT 7,.DTTYP(T1),35] ;GET TEST TYPE 
	CAIL T2,0		;RANGE CHECK 0 - 3
	CAILE T2,3
	PRTWRN <INVALID TEST TYPE ENCOUNTERED>,,<$GOTO(DTSCM1)> ;START OVER
	JRST @.+1(T2)		;DISPATCH
	DOCONN
	DODATA
	DODISC
	DOINTE

	PAGE
	SUBTTL EXIRTN,HELRTN,WAIRTN - EXIT, HELP , & WAIT COMMAND ROUTINES

;EXIT COMMAND ROUTINE

EXIRTN:	RET			;RETURN +1 TO END

;HELP COMMAND ROUTINE

HELRTN:	MOVX T1,<GJ%OLD!GJ%SHT> ;EXISTING FILE
	HRROI T2,[ASCIZ\SYS:DTS.HLP\]
	GTJFN
	 JSGOTO (<HELP FILE>,DTSCM1)
	MOVX T2,<FLD(7,OF%BSZ)!OF%RD>
	MOVE P1,T1		;SAVE JFN
	OPENF
	 JSGOTO (<HELP FILE>,DTSCM1)
HELRT1:				;LOOP THRU HERE UNTIL DONE
	HRROI T2,BUFFER
	MOVNI T3,^D80		;READ 80 BYTES
	SIN
	 ERJMP HELRT2
	HRROI T1,BUFFER
	CALL SNDSTR
	MOVE T1,P1		;RESTORE JFN
	JRST HELRT1
HELRT2:				;HERE ON ERROR (PROBABLY EOF)
	CAMG T3,[-^D80]		;TRANSFER ANY DATA?
	JRST DTSCM1		;NO, ALL DONE
	HRROI T1,BUFFER
	CALL SNDSTR		;TYPE THE LAST BIT OF FILE
	JRST DTSCM1

;WAIT COMMAND ROUTINE

WAIRTN:	WAIT
	JRST DTSCM1

	PAGE
	SUBTTL DOCONN - CONNECT TEST SUBCOMMAND

DOCONN:				;CONNECT TEST SUBCOMMAND

;DEFAULTS FOR CONNECT TEST

	MOVE T2,DCOSUB		;GET DEFAULT CONNECT TYPE
	MOVEM T2,TMPSUB		;SAVE FOR USE AS DEFAULT
	ADD T2,DCOOPT		;ADD IN OPTIONAL DATA TYPE
	MOVEM T2,.DTSUB(T1)
	MOVE T2,DCOOPT
	MOVEM T2,TMPOPT		;SAVE FOR USE AS DEFAULT
	MOVEI T2,2		;OPTIONAL DATA COUNT
	MOVEM T2,.DTCNT(T1)

	HRROI  T1,CONPRO	;GET PROMPT FOR CONNECT_TEST
	MOVEI  T2,CONSUB	;GET PDB CHAIN
	MOVEI  T3,CMDBLK
	CALL   PARSE##		;GO PARSE SUBCOMMAND
	PRTWRN <INVALID SUBCOMMAND>,,<$GOTO(DTSCM1)> ;GO START OVER
	CALL SVDFCO		;GO SAVE THE DEFAULTS
	MOVE T1,DTSARG		;RESTORE ARG POINTER
	RETSKP			;SUCCEEDED


	PAGE
	SUBTTL DODISC - DISCONNECT TEST SUBCOMMAND


DODISC:

;DEFAULTS FOR DISCONNECT TEST

	MOVE T2,DDISUB		;GET DISC TYPE
	MOVEM T2,TMPSUB		;SAVE FOR USE AS DEFAULT
	ADD T2,DDIOPT		;AND OPTIONAL DATA TYPE
	MOVEM T2,.DTSUB(T1)	;DISCONNECT/NO OPT DATA
	MOVE T2,DDIOPT
	MOVEM T2,TMPOPT		;SAVE FOR USE AS DEFAULT
	MOVEI T2,2		;OPTIONAL DATA COUNT
	MOVEM T2,.DTCNT(T1)

	HRROI  T1,DISPRO
	MOVEI  T2,DISSUB
	MOVEI  T3,CMDBLK
	CALL   PARSE##		;GO PARSE SUBCOMMAND
	PRTWRN <INVALID SUBCOMMAND>,,<$GOTO(DTSCM1)> ;GO START OVER
	CALL SVDFDI		;GO SAVE THE DEFAULTS
	MOVE T1,DTSARG		;RESTORE ARG POINTER
	RETSKP			;SUCCEEDED

	PAGE
	SUBTTL DODATA - DATA TEST SUBCOMMAND


DODATA:

;DEFAULTS FOR DATA TEST

	MOVE T2,DDATIM		;GET DEFAULT TEST TIME
	MOVEM T2,.DTTIM(T1)
	MOVEM T2,TMPTIM		;SAVE FOR USE AS DEFAULT
	MOVE T2,DDABUF		;DEFAULT BUFFERS
	MOVEM T2,.DTBUF(T1)
	MOVEM T2,TMPBUF		;SAVE FOR USE AS DEFAULT
	MOVE T2,DDABAU		;DEFAULT BAUD RATE
	MOVEM T2,.DTBAU(T1)
	MOVEM T2,TMPBAU		;SAVE FOR USE AS DEFAULT
	MOVE T2,DDASUB		;DEFAULT DATA TEST TYPE
	MOVEM T2,.DTSUB(T1)
	MOVEM T2,TMPSUB
	MOVE T2,DDAFCO		;DEFAULT FLOW CONTROL OPTION
	MOVEM T2,.DTFCO(T1)
	MOVEM T2,TMPFCO
	MOVE T2,DDAFCV		;DEFAULT FLOW CONTROL VALUE
	MOVEM T2,.DTFCV(T1)
	MOVEM T2,TMPFCV
	MOVE T2,DDANAK		;DEFAULT NAK VALUE
	MOVEM T2,.DTNAK(T1)
	MOVEM T2,TMPNAK
	MOVE T2,DDABPC		;DEFAULT BACK PRESSURE VALUE
	MOVEM T2,.DTBPV(T1)
	MOVEM T2,TMPBPC
	MOVE T2,DDAMSZ		;DEFAULT MESSAGE SIZE
	MOVEM T2,TMPMSZ
	IDIVI T2,400
	MOVEM T3,.DTMSG(T1)
	MOVEM T2,.DTMSG+1(T1)
	MOVEI T2,^D8		;OPTIONAL DATA COUNT
	MOVEM T2,.DTCNT(T1)

	HRROI  T1,DATPRO
	MOVEI  T2,DATSUB
	MOVEI  T3,CMDBLK
	CALL   PARSE##		;GO PARSE SUBCOMMAND
	PRTWRN <INVALID SUBCOMMAND>,,<$GOTO(DTSCM1)> ;GO START OVER
	CALL SVDFDA		;GO SAVE THE DEFAULTS
	MOVE T1,DTSARG		;RESTORE ARG POINTER
	RETSKP			;SUCCEEDED

	PAGE
	SUBTTL INTERRUPT TEST SUBCOMMAND

DOINTE:

;DEFAULTS FOR INTERRUPT TEST

	MOVE T2,DINTIM		;DEFAULT TEST TIME
	MOVEM T2,.DTTIM(T1)
	MOVEM T2,TMPTIM
	MOVE T2,DINSUB		;DEFAULT INTERRUPT TEST TYPE
	MOVEM T2,.DTSUB(T1)
	MOVEM T2,TMPSUB
	MOVE T2,DINFLW		;DEFAULT INTERRUPT FLOW CONTROL
	MOVEM T2,.DTFOP(T1)
	MOVEM T2,TMPFLW
	MOVE T2,DINMSZ		;DEFAULT MESSAGE LENGTH
	MOVEM T2,.DTMSG(T1)
	MOVEM T2,TMPMSZ
	SETZM .DTMSG+1(T1)
	MOVEI T2,3		;OPTIONAL DATA COUNT
	MOVEM T2,.DTCNT(T1)

	HRROI  T1,INTPRO
	MOVEI  T2,INTSUB
	MOVEI  T3,CMDBLK
	CALL   PARSE##		;GO PARSE SUBCOMMAND
	PRTWRN <INVALID SUBCOMMAND>,,<$GOTO(DTSCM1)> ;GO START OVER
	CALL SVDFIN		;GO SAVE THE DEFAULTS
	MOVE T1,DTSARG		;RESTORE ARG POINTER
	RETSKP			;SUCCEEDED

	PAGE
	SUBTTL SETDEF - SET INITIAL DEFAULTS FOR DTS

SETDEF:				;HERE TO SET UP DTS DEFAULTS
	SKIPE DEFSET		;SET YET ?
	RET			;YES, THIS IS A NULL ROUTINE NOW
	SETOM DEFSET		;SAY WE HAVE BEEN HERE

;DEFAULT TEST

	SETZM DFTNOD		;NULL NODE STRING IMPLIES LOCAL NODE
	SETZM NODSTR
	MOVEI T1,1		;DATA TEST 
	MOVEM T1,DFTTST
	MOVEI T1,200		;PRINT OPTION ON
	MOVEM T1,DFTPRT

;DEFAULTS FOR CONNECT TEST

	MOVEI T1,1		;ACCEPT TEST
	MOVEM T1,DCOSUB
	MOVEI T1,0		;NO OPTIONAL DATA
	MOVEM T1,DCOOPT

;DEFAULTS FOR DATA TEST

	MOVEI T1,0		;SINK TEST
	MOVEM T1,DDASUB
	MOVEI T1,^D60*^D2	;TWO MINUTES TEST TIME
	MOVEM T1,DDATIM
	MOVEI T1,1		;# SEND BUFFERS 
	MOVEM T1,DDABUF
	SETZM DDABAU		;DON'T CALCULATE STATS
	MOVEI T1,2		;MESSAGE FLOW CONTROL OPTION
	MOVEM T1,DDAFCO
	MOVEI T1,1		;FLOW CONTROL VALUE
	MOVEM T1,DDAFCV
	SETZM DDANAK		;NO NAKS
	SETZM DDABPC		;NO BACK PRESSURE
	MOVEI T1,^D192		;MESSAGE LENGTH
	MOVEM T1,DDAMSZ

;DISCONNECT TEST DEFAULTS

	MOVEI T1,0		;SYNCH DISCONNECT
	MOVEM T1,DDISUB
	MOVEI T1,0		;NO OPTIONAL DATA
	MOVEM T1,DDIOPT

	PAGE
	SUBTTL SETDEF - SET INITIAL DEFAULTS FOR DTS

;INTERRUPT TEST DEFAULTS

	MOVEI T1,0		;SINK TEST
	MOVEM T1,DINSUB
	MOVEI T1,^D60*^D2	;TWO MINUTES TEST
	MOVEM T1,DINTIM
	MOVEI T1,^D16		;16 BYTES INTERRUPT MESSAGE
	MOVEM T1,DINMSZ
	MOVEI T1,1		;FLOW = 1
	MOVEM T1,DINFLW
	RET

	PAGE
	SUBTTL SVDFCO - SAVE THE PARSED DEFAULTS FOR CONNECT

SVDFCO:				;HERE TO SAVED NEW DEFAULTS FOR CONNECT TEST
	CALL SVDFGB		;SAVE THE GLOBAL STUFF
	MOVE T1,TMPSUB
	MOVEM T1,DCOSUB
	MOVE T1,TMPOPT
	MOVEM T1,DCOOPT
	RET

	PAGE
	SUBTTL SVDFDA - SAVE THE PARSE DEFAULTS FOR DATA TEST

SVDFDA:				;HERE TO SAVE NEW DEFAULTS FOR DATA TEST
	CALL SVDFGB
	MOVE T1,TMPSUB
	MOVEM T1,DDASUB
	MOVE T1,TMPBAU
	MOVEM T1,DDABAU
	MOVE T1,TMPMSZ
	MOVEM T1,DDAMSZ
	MOVE T1,TMPBUF
	MOVEM T1,DDABUF
	MOVE T1,TMPTIM
	MOVEM T1,DDATIM
	MOVE T1,TMPFCO
	MOVEM T1,DDAFCO
	MOVE T1,TMPFCV
	MOVEM T1,DDAFCV
	MOVE T1,TMPBPC
	MOVEM T1,DDABPC
	MOVE T1,TMPNAK
	MOVEM T1,DDANAK
	RET

	PAGE
	SUBTTL SVDFDI - SAVE THE PARSED DEFAULTS FOR DISCONNECT TEST

SVDFDI:				;SAVE DEFAULTS FOR DISCONNECT
	CALL SVDFGB
	MOVE T1,TMPSUB
	MOVEM T1,DDISUB
	MOVE T1,TMPOPT
	MOVEM T1,DDIOPT
	RET

	PAGE
	SUBTTL SVDFIN - SAVE THE PARSED DEFAULTS FOR INTERRUPT TEST

SVDFIN:				;SAVE DEFAULTS FOR INTERRUPT TEST
	CALL SVDFGB
	MOVE T1,TMPSUB
	MOVEM T1,DINSUB
	MOVE T1,TMPMSZ
	MOVEM T1,DINMSZ
	MOVE T1,TMPTIM
	MOVEM T1,DINTIM
	MOVE T1,TMPFLW
	MOVEM T1,DINFLW
	RET

SVDFGB:				;HERE TO SAVE STUFF COMMON TO ALL TEST
	HRROI T1,DFTNOD
	HRROI T2,TMPNOD
	SETZI 3,
	SETZI 4,
	SOUT
	MOVE T1,TMPTST
	MOVEM T1,DFTTST
	MOVE T1,TMPPRT
	MOVEM T1,DFTPRT
	RET

	PAGE
	SUBTTL COMMON TAKE COMMAND SUBROUTINES


;*******************************************************************************
;*******************************************************************************


;ON THE FOLLOWING PAGES ARE THE SUBROUTINES USED BY THE TAKE COMMAND CODE
; THAT PROVIDE COMMON INTERFACE TO THE LOG FILE.
;
; TWO OF THESE SUBROUTINES SHOULD ALSO BE USED BY THE USER CODE TO INSURE
; THAT ALL OUTPUT GOES TO THE LOG FILE. THESE ARE THE "SNDMSG" ROUTINE 
; WHICH WILL SEND MESSAGE TEXT BEGINNING ON A NEW LINE, AND "SNDSTR"
; WHICH WILL SEND JUST THE CHARACTER STRING.


;*******************************************************************************
;*******************************************************************************



	PAGE
	SUBTTL TSTCOL - SUBROUTINE TO CHECK FOR NEED FOR CR/LF
;
; SUBROUTINE TO TEST COLUMN POSITION AND OUTPUT CRLF IF NEEDED
; THE ASSUMPTION IS THAT WHEN COMMAND INPUT IS COMING FROM A FILE
; IT WILL ALSO BE WRITTEN TO A LOG FILE AND THE TTY AND LOG FILE WILL
; HAVE IDENTICAL OUTPUT.
;



TSTCOL::			;ENTRY
	SAVEAC <T1,T2,T3,T4>	;SAVE THE AC'S
	MOVEI  T1,.PRIOU	;GET PRIMARY OUTPUT DESIGNATOR
	RFPOS			;READ FILE POSITION
	HRRZ   T2,T2		;KEEP JUST THE COLUMN POSITION
	JUMPE  T2,R		;IF AT COLUMN 1 DO NOT OUTPUT CRLF
	HRROI  T1,[BYTE (7)012,015] ;CR/LF
	CALLRET SNDSTR		;OUTPUT CARRIAGE RETURN/LINE FEED & RETURN



	PAGE
	SUBTTL SNDMSG - SEND MESSAGE TO TTY AND LOG SUBROUTINE
;
;SNDMSG - ROUTINE TO SEND TEXT TO TERMINAL AND LOG FILE IF PROCESSING
;	A TAKE COMMAND, THIS ROUTINE TAKES CARE OF DETERMINING IF COMMANDS 
;	ARE COMING FROM A TAKE FILE AND WHETHER THE LOG IS GOING TO
;	A TERMINAL OR A DISK FILE, BOTH THE TERMINAL AND THE LOG WILL
;	ALWAYS GET THE PROPER TEXT
;
;ACCEPTS: T1/ STRING POINTER TO TEXT
;
;	CALL   SNDMSG		;TO SEND STARTING ON NEW LINE
;	CALL   SNDSTR		;TO SEND JUST THE STRING
;
;RETURNS+1: ALWAYS
;
SNDMSG::			;ENTRY TO SEND A MESSAGE
	CALL   TSTCOL		;MESSAGE STARTS A NEW LINE
SNDSTR::			;ENTRY TO SEND A STRING
	MOVE   T4,T1		;HOLD T1
	PSOUT			;ALWAYS WRITE TO TERMINAL
	SKIPN  TAKFLG		;DOING TAKE ?
	RET			;NO, THEN JUST RETURN
	HRRZ   T1,IOJFN		;YES, GET THE LOG JFN
	DVCHR			;FIND THE DEVICE TYPE
	LDB    T2,[POINTR (T2,DV%TYP)] ;ISOLATE DEVICE TYPE
	CAIN   T2,.DVTTY	;IS IT TTY ?
	RET			;YES, RETURN
	HRRZ   T1,IOJFN		;NO, THEN WRITE TO LOG
	MOVE   T2,T4		;POINT TO THE STRING
	SETZ   T3,0
	SOUT			;WRITE IT OUT
	RET			;DONE, RETURN


	PAGE
	SUBTTL CLRGJF - CLEAR GTJFN BLOCK

;
; ROUTINE TO CLEAR GTJFN BLOCK USED BY COMND JSYS
;
; CALL:		CALL CLRGJF
; RETURNS: +1 ALWAYS

CLRGJF:	MOVE T1,[GJFBLK,,GJFBLK+1] ;SET UP TO CLEAR GTJFN BLOCK
	SETZM GJFBLK		;CLEAR FIRST WORD OF BLOCK
	BLT T1,GJFBLK+GJFSIZ-1	;CLEAR GTJFN BLOCK
	RET			;RETURN TO WHENCE WE CAME ...


	PAGE
	SUBTTL STORAGE

;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

;TEMPORARY ENTRY VECTOR TO ALLOW STANDALONE TESTING

ENTVEC:				;ENTRY VECTOR
	JRST ENTER
	JRST ENTER
	EXP 0
	ASCII \DTSCMD\
;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

PROMPT:	ASCIZ/DTS>/		;PROMPT STRING
NODSTR:	BLOCK 8			;NODE NAME STRING

;GLOBAL DEFAULTS

DEFSET:	BLOCK 1			;FLAG TO INDICATE DEFAULTS SET

DFTNOD:	BLOCK 8			;DEFAULT NODE NAME STRING
DFTTST:	BLOCK 1			;DEFAULT TEST TYPE
DFTPRT:	BLOCK 1			;DEFAULT PRINT OPTION

;CONNECT TEST DEFAULTS

DCOSUB:	BLOCK 1			;DEFAULT CONNECT TEST SUBTYPE
DCOOPT:	BLOCK 1			;DEFAULT OPTIONAL DATA TYPE

;DATA TEST DEFAULTS

DDASUB:	BLOCK 1			;DEFAULT DATA TEST SUBTYPE
DDAMSZ:	BLOCK 1			;DEFAULT MESSAGE SIZE
DDABUF:	BLOCK 1			;DEFAULT BUFFERS
DDATIM:	BLOCK 1			;DEFAULT TIME
DDABAU:	BLOCK 1			;DEFAULT BAUD RATE
DDAFCO:	BLOCK 1			;DEFAULT FLOW CONTROL OPTION
DDAFCV:	BLOCK 1			;DEFAULT FLOW CONTROL VALUE
DDANAK:	BLOCK 1			;DEFAULT NAK
DDABPC:	BLOCK 1			;DEFAULT BACK PRESSURE

;DISCONNECT TEST DEFAULTS

DDISUB:	BLOCK 1			;DEFAULT DISCONNECT TEST SUBTYPE
DDIOPT:	BLOCK 1			;DEFAULT OPTIONAL DATA TYPE

;INTERRUPT TEST DEFAULTS

DINSUB:	BLOCK 1			;DEFAULT INTERRUPT TEST SUBTYPE
DINMSZ:	BLOCK 1			;DEFAULT MESSAGE SIZE
DINTIM:	BLOCK 1			;DEFAULT TIME
DINFLW:	BLOCK 1			;DEFAULT FLOW CONTROL

CMDBLK:	BLOCK 100		;STORAGE FOR PARSER TO RETURN RESULT

DTSBLK:				;DTS TEST CONTROL BLOCK
	BLOCK DTSSIZ

	PAGE
	SUBTTL STORAGE

	XLIST
	LIT
	VAR
	LIST

	END