Google
 

Trailing-Edge - PDP-10 Archives - KS10_APT_INSTALL_TAPE - uetp/lib/cmlbcd.mac
There is 1 other file named cmlbcd.mac in the archive. Click here to see a list.
	TITLE	CMLBCD	COMMANDS
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.


	;THIS LIBRARY CONTAINS ROUTINES FOR COMMAND PARSING ON THE
	;DECSYSTEM-20. ALL ROUTINES ARE BASED AROUND THE "COMND"
	;JSYS. IT WAS DECIDED THAT REPARSING SHOULD BE BY MEANS
	;OF A SMOOTH FLOW THROUGH THE USER'S PROGRAM INSTEAD OF THE
	;ALTERNATIVE MEANS OF ALLOWING THE COMMAND JSYS TO DISPATCH
	;TO A REPARSE ADDRESS. TO ACHIEVE THIS, A SERIES OF MULTIPLE
	;RETURNS FROM ROUTINES HAS BEEN IMPLEMENTED. GENERALLY, EACH
	;COMPONENT ROUTINE HAS AN IMMEDIATE RETURN WHEN REPARSING
	;IS NECESSARY, A SKIP RETURN FOR AN ERROR, AND A DOUBLE
	;SKIP RETURN FOR SUCCESS.

	;ROUTINES ARE GENERALLY OF THREE TYPES.

	;CCXXXX	ROUTINES ARE COMPLETE ROUTINES. THESE SHOULD BE
	;	ENTERED WITH "T1" POINTING TO A PROMPT AND OTHER
	;	ARGUMENTS SET UP AS DESCRIBED FOR EACH ROUTINE.
	;	THE ROUTINE WILL INITIALISE, DISPLAY THE PROMPT,
	;	AND CHECK THE INPUT. REPARSING AND ERRORS ARE
	;	DEALT WITH BY THE ROUTINE AND THE ONLY WAY OUT
	;	IS AN IMMEDIATE RETURN ON SUCCESS.

	;CDXXXX	ROUTINES ARE COMPONENT ROUTINES.THESE ARE CALLED
	;	BY CCXXXX ROUTINES OR BY THE USER PROGRAM AND
	;	PERFORM INDIVIDUAL FUNCTIONS. GENERALLY, THE RETURN
	;	IS NON-SKIP FOR REPARSE NECESSARY, SKIP IF ERROR
	;	OR DOUBLE SKIP ON SUCCESS.

	;CRXXXX	ROUTINES ARE BASED ON THE CDXXXX ROUTINES EXCEPT
	;	THAT THE REPARSE RETURN IS IMMEDIATE BUT UP ONE
	;	LEVEL. ERROR RETURN IS THEN IMMEDIATE RETURN AND
	;	SUCCESS IS SKIP RETURN. THESE ARE SPECIFICALLY FOR
	;	PROGRAMS AND ROUTINES WHICH ALLOW MORE THAN ONE
	;	ARGUMENT ON A LINE. THE FIRST ARGUMENT OR "COMMAND"
	;	CAN BE PARSED AND DISPATCH PERFORMED ACCORDINGLY
	;	BY MEANS OF A "PUSHJ".

	PRGEND
	TITLE	CCFLIN	GET FLOATING POINT NUMBER FROM TTY (COMPLETE)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCFLIN

	;ROUTINE TO GET A FLOATING POINT NUMBER FROM THE TTY. ENTER
	;WITH T1 POINTING TO A PROMPT. RETURN +1 ALWAYS WITH FLOATING
	;NUMBER IN T2.

CCFLIN:	PUSHJ	P,CDSRGS##	;SAVE ARGUMENT
CCFLN1:	PUSHJ	P,CDSETP##	;SET UP AND INITIALISE
CCFLN2:	PUSHJ	P,CDIFLT##	;GET NUMBER
	 JRST	CCFLN2		;REPARSE
	 ERROR	CCFLN1,<BAD NUMBER>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CCFLN2		;REPARSE
	 JRST	CCFLN1		;BAD
	POPJ	P,		;OK

	PRGEND
	TITLE	CCGDNM	GET A DECIMAL NUMBER FROM TTY (COMPLETE)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCGDNM

	;ROUTINE TO GET A DECIMAL NUMBER FROM THE TTY. ENTER WITH
	;T1 POINTING TO A PROMPT. RETURN +1 ALWAYS WITH DECIMAL
	;NUMBER IN T2.

CCGDNM:	PUSHJ	P,CDSRGS##	;SAVE ARGUMENT
CCGDN1:	PUSHJ	P,CDSETP##	;SET UP AND INITIALISE
CCGDN2:	PUSHJ	P,CDGDNM##	;GET NUMBER
	 JRST	CCGDN2		;REPARSE
	 ERROR	CCGDN1,<BAD NUMBER>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CCGDN2		;REPARSE
	 JRST	CCGDN1		;BAD
	POPJ	P,		;OK

	PRGEND
	TITLE	CCGONM	GET AN OCTAL NUMBER FROM TTY (COMPLETE)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCGONM

	;ROUTINE TO GET AN OCTAL NUMBER FROM THE TTY. ENTER WITH
	;T1 POINTING TO A PROMPT. RETURN +1 ALWAYS WITH OCTAL
	;NUMBER IN T2.

CCGONM:	PUSHJ	P,CDSRGS##	;SAVE ARGUMENT
CCGON1:	PUSHJ	P,CDSETP##	;SET UP AND INITIALISE
CCGON2:	PUSHJ	P,CDGONM##	;GET NUMBER
	 JRST	CCGON2		;REPARSE
	 ERROR	CCGON1,<BAD NUMBER>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CCGON2		;REPARSE
	 JRST	CCGON1		;BAD
	POPJ	P,		;OK

	PRGEND
	TITLE	CCGTFL	GET A FILESPEC FROM THE TTY (COMPLETE)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCGTFL,CCGTFS

	;ROUTINE TO ASK FOR A FILESPEC. ENTER WITH T1 POINTING TO
	;A PROMPT AND AC'S "A","B","C", AND "D" SET UP AS FOR THE
	;"GTJSET" ROUTINE. RETURN +1 ALWAYS WITH JFN IN T2.
	;ENTER AT "CCGTFL" TO SET UP GTJFN BLOCK, OR AT "CCGTFS"
	;IF BLOCK ALREADY SET UP.

CCGTFL:	PUSH	P,T1		;SAVE PROMPT
	PUSHJ	P,GTJCLS##	;SET UP GTJFN BLOCK
	POP	P,T1		;RETORE PROMPT
CCGTFS:	PUSHJ	P,CDSRGS##	;SAVE ARGUMENTS
CCGTF1:	PUSHJ	P,CDSETP##	;SET UP COMMAND JSYS
CCGTF2:	PUSHJ	P,CDFLSP##	;GET FILESPEC
	 JRST	CCGTF2		;REPARSE
	 ERROR	CCGTF1,<FILE NOT AVAILABLE>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CCGTF2		;REPARSE
	 JRST	CCGTF1		;BAD
	POPJ	P,		;OK

	PRGEND
	TITLE	CCGIFL	GET AN INPUT FILESPEC FROM THE TTY (COMPLETE)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCGIFL,CCGIFS

	;ROUTINE TO ASK FOR AN INPUT FILESPEC. ENTER WITH T1 POINTING
	;TO A PROMPT AND AC'S "A","B","C", AND "D" SET UP AS FOR THE
	;"GTJSET" ROUTINE. RETURN +1 ALWAYS WITH JFN IN T2.
	;ENTER AT "CCGIFL" TO SET UP GTJFN BLOCK, OR AT "CCGIFS"
	;IF BLOCK ALREADY SET UP.

CCGIFL:	PUSH	P,T1		;SAVE PROMPT
	PUSHJ	P,GTJCLS##	;SET UP GTJFN BLOCK
	POP	P,T1		;RETORE PROMPT
CCGIFS:	PUSHJ	P,CDSRGS##	;SAVE ARGUMENTS
CCGTF1:	PUSHJ	P,CDSETP##	;SET UP COMMAND JSYS
CCGTF2:	PUSHJ	P,CDIFSP##	;GET FILESPEC
	 JRST	CCGTF2		;REPARSE
	 ERROR	CCGTF1,<FILE NOT AVAILABLE>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CCGTF2		;REPARSE
	 JRST	CCGTF1		;BAD
	POPJ	P,		;OK

	PRGEND
	TITLE	CCGOFL	GET AN OUTPUT FILESPEC FROM THE TTY (COMPLETE)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCGOFL,CCGOFS

	;ROUTINE TO ASK FOR AN OUTPUT FILESPEC. ENTER WITH T1 POINTING
	;TO A PROMPT AND AC'S "A","B","C", AND "D" SET UP AS FOR THE
	;"GTJSET" ROUTINE. RETURN +1 ALWAYS WITH JFN IN T2.
	;ENTER AT "CCGOFL" TO SET UP GTJFN BLOCK, OR AT "CCGOFS"
	;IF BLOCK ALREADY SET UP.

CCGOFL:	PUSH	P,T1		;SAVE PROMPT
	PUSHJ	P,GTJCLS##	;SET UP GTJFN BLOCK
	POP	P,T1		;RETORE PROMPT
CCGOFS:	PUSHJ	P,CDSRGS##	;SAVE ARGUMENTS
CCGTF1:	PUSHJ	P,CDSETP##	;SET UP COMMAND JSYS
CCGTF2:	PUSHJ	P,CDOFSP##	;GET FILESPEC
	 JRST	CCGTF2		;REPARSE
	 ERROR	CCGTF1,<FILE NOT AVAILABLE>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CCGTF2		;REPARSE
	 JRST	CCGTF1		;BAD
	POPJ	P,		;OK

	PRGEND
	TITLE	CCGTDR	GET DIRECTORY NAME FROM THE TTY.(COMPLETE)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCGTDR

	;ROUTINE TO GET DIRECTORY SPEC WITH CONFIRMATION. ENTER
	;WITH POINTER TO PROMPT IN T1. RETURN +1 ALWAYS WITH 36-BIT
	;DIRECTORY NUMBER IN T2.

CCGTDR:	PUSHJ	P,CDSRGS##	;SAVE ARGUMENTS
CCGTD1:	PUSHJ	P,CDSETP##	;SET UP AND INITIALISE
CCGTD2:	PUSHJ	P,CDDRSP##	;GET DIRECTORY NAME
	 JRST	CCGTD2		;REPARSE
	 ERROR	CCGTD1,<NO SUCH DIRECTORY>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CCGTD2		;REPARSE
	 JRST	CCGTD1		;BAD
	POPJ	P,		;OK

	PRGEND
	TITLE	YESNO	ROUTINE TO ASK YES OR NO ETC.
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CONFRM,ASKHIM,CCKYDS

	;ROUTINES TO ASK FOR YES OR NO ANSWER. ENTER AT "CONFRM"
	;TO ASK IF SURE, OR AT "ASKHIM" WITH T1 POINTING TO PROMPT.
	;RETURNS SKIP FOR "YES" AND NON-SKIP FOR "NO".
	;ENTER AT "CCKYDS" TO GET COMMAND WITH CONFIRMATION AND
	;DISPATCH.

CONFRM:	HRROI	T1,[ASCIZ /ARE YOU SURE? /]
ASKHIM:	MOVEI	T2,CONTAB	;ADDRESS OF ANSWER TABLE
CCKYDS:	PUSHJ	P,CCKYCM##	;GET COMMAND WITH CONFIRMATION
	HRRZ	T1,(T2)		;GET DISPATCH
	PJRST	(T1)		;DISPATCH

CONTAB:	CONSIZ,,CONMAX
	TB (.FUN,I-CANNOT-MAKE-UP-MY-MIND)
	TB (CPOPJ##,NO)
	TB (CPOPJ1##,YES)
CONSIZ==.-CONTAB-1
CONMAX==CONSIZ+1


.FUN:	HRROI	T1,[ASCIZ /
THERE MUST BE A JOB FOR YOU IN HIGHER MANAGEMENT!!!!!
/]
	PSOUT
	JRST	CONFRM		;ASK HIM AGAIN

	PRGEND
	TITLE	CCDKYC	GET DOUBLE COMMAND WITH CONFIRMATION (COMPLETE)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCDKYC

	;ROUTINE TO GET DOUBLE COMMAND PLUS CONFIRMATION. ENTER WITH
	;PROMPT IN T1 AND WITH T2 POINTING TO COMMAND TABLE. RETURN
	;+1 ALWAYS WITH T2 POINTING TO TABLE ENTRY. 

CCDKYC:	PUSHJ	P,CDSRGS##	;SAVE ARGUMENTS
CMDLP1:	PUSHJ	P,CDSETP##	;SET UP
CMDLP2:	MOVE	T2,CMDT2##	;POINT TO FIRST TABLE
	MOVE	T3,CMDT3##	;AND SECOND TABLE
	PUSHJ	P,CDDKEY##	;GET COMMAND
	 JRST	CMDLP2		;REPARSE
	 ERROR	CMDLP1,<NOT A VALID INPUT>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CMDLP2		;REPARSE
	 JRST	CMDLP1		;BAD
	POPJ	P,		;OK

	PRGEND
	TITLE	CCKYCM	GET COMMAND WITH CONFIRMATION (COMPLETE)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCKYCM

	;ROUTINE TO GET COMMAND PLUS CONFIRMATION. ENTER WITH POINTER
	;TO PROMPT IN T1 AND WITH T2 POINTING TO COMMAND TABLE. RETURN
	;+1 ALWAYS WITH T2 POINTING TO TABLE ENTRY. 

CCKYCM:	PUSHJ	P,CDSRGS##	;SAVE ARGUMENTS
CMDLP1:	PUSHJ	P,CDSETP##	;SET UP
CMDLP2:	MOVE	T2,CMDT2##	;POINT TO TABLE
	PUSHJ	P,CDGKEY##	;GET COMMAND
	 JRST	CMDLP2		;REPARSE
	 ERROR	CMDLP1,<NOT A VALID INPUT>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CMDLP2		;REPARSE
	 JRST	CMDLP1		;BAD
	POPJ	P,		;OK

	PRGEND
	TITLE	CCDTTM	GET DATE AND TIME FROM THE TTY (COMPLETE)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCDTTM

	;ROUTINE TO GET DATE AND TIME FROM THE TTY. ENTER WITH
	;T1 POINTING TO PROMPT. RETURN WITH DATE AND TIME IN 
	;INTERNAL FORMAT IN T1.

CCDTTM:	PUSHJ	P,CDSRGS##	;SAVE ARGS
CCDTT1:	PUSHJ	P,CDSETP##	;SET UP
CCDTT2:	PUSHJ	P,CDDTTM##	;GET IT
	 JRST	CCDTT2		;REPARSE
	 ERROR	CCDTT1,<INCORRECT FORMAT>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CCDTT2		;REPARSE
	 JRST	CCDTT1		;BAD
	POPJ	P,

	PRGEND
	TITLE	CCDTON	GET DATE ONLY FROM TTY	(COMPLETE)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCDTON

	;ROUTINE TO INPUT A DATE FROM THE TTY. ENTER WITH T1
	;POINTING TO PROMPT. RETURN WITH DATE IN
	;INTERNAL FORMAT IN T1.

CCDTON:	PUSHJ	P,CDSRGS##	;SAVE ARG
CCDTO1:	PUSHJ	P,CDSETP##	;SET UP AND INITIALISE
CCDTO2:	PUSHJ	P,CDDTON##	;GET DATE 
	 JRST	CCDTO2		;REPARSE
	 ERROR	CCDTO1,<INCORRECT FORMAT>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CCDTO2		;REPARSE
	 JRST	CCDTO1		;BAD
	POPJ	P,		;OK

	PRGEND
	TITLE	CCGSIX	GET A SIXBIT ATOM IN T2
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CCGSIX

	;ROUTINE TO GET A SIXBIT ATOM IN T2. ENTER WITH
	;T1 POINTING TO PROMPT. RETURN WITH ATOM IN T2.

CCGSIX:	PUSHJ	P,CDSRGS##	;SAVE ARGS
CCGSX1:	PUSHJ	P,CDSETP##	;SET UP
CCGSX2:	PUSHJ	P,CDGSIX##	;GET IT
	 JRST	CCGSX2		;REPARSE
	 ERROR	CCGSX1,<INCORRECT FORMAT>
	PUSHJ	P,CDGTCM##	;GET CONFIRMATION
	 JRST	CCGSX2		;REPARSE
	 JRST	CCGSX1		;BAD
	POPJ	P,		;OK

	PRGEND
	TITLE	CDDRSP	GET DIRECTORY SPECIFICATION. (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CDDRSP

	;ROUTINE TO GET A DIRECTORY. ENTER WITH POINTER TO PROMPT IN T1.
	;RETURN +1 IF REPARSE NECESSARY, SKIP IF ERROR, OR DOUBLE
	;SKIP IF OK WITH 36-BIT DIRECTORY NUMBER IN T2.

CDDRSP:	MOVEI	T2,[FLDDB. (.CMDIR)]
	PJRST	JCOMND##	;GO DO IT

	PRGEND
	TITLE	CDDTTM	GET DATE, TIME, OR BOTH (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CDDTTM,CDDTON,CDTMON,CDGTAD,CRGTAD

	;ROUTINE TO GET DATE AND TIME FROM TTY. ON RETURN DATE AND
	;TIME IN INTERNAL FORMAT ARE STORED IN T2. RETURN IS NON-
	;SKIP FOR REPARSE, SKIP FOR ERROR, AND DOUBLE SKIP FOR GOOD.

CDDTTM:	MOVX	T2,<CM%IDA+CM%ITM> ;GET DATE AND TIME
	PJRST	CDGTAD		;GET IT

	;ROUTINE TO INPUT DATE ONLY. ON RETURN DATE IS IN T2.
	;RETURN IS NON-SKIP FOR REPARSE NECESSARY, SKIP FOR
	;ERROR, AND DOUBLE SKIP FOR OK.

CDDTON:	MOVX	T2,<CM%IDA>	;JUST DATE
	PJRST	CDGTAD		;GET IT

	;ROUTINE TO GET JUST TIME FROM TTY. RETURN WITH TIME
	;IN T2. RETURN IS NON-SKIP FOR REPARSE, SKIP FOR 
	;ERROR, AND DOUBLE SKIP FOR GOOD.

CDTMON:	MOVX	T2,<CM%ITM>	;GET TIME
	PJRST	CDGTAD		;GET IT

	;ROUTINE TO GET TIME AND/OR DATE FROM TTY. ENTER WITH FLAGS
	;IN T2. RETURN WITH TIME AND/OR DATE IN T2. RETURN NON-SKIP
	;FOR ERROR, SKIP IF OK AND BUMP UP ONE LEVEL FOR REPARSE.

CRGTAD:	PUSHJ	P,CDGTAD	;GET IT
	 POP	P,(P)		;REPARSE
	 POPJ	P,		;ERROR
	PJRST	CPOPJ1##	;OK

PAGE
	;ROUTINE TO GET TIME AND/OR DATE FROM TTY. ENTER WITH
	;FLAGS IN T2. RETURN WITH TIME AND/OR DATE IN T2. RETURN
	;IS NON-SKIP FOR REPARSE, SKIP FOR ERROR, AND DOUBLE
	;SKIP FOR GOOD.

CDGTAD:	TXZ	T2,<CM%NCI>	;NO INTERNAL FORMAT
	MOVEM	T2,FLUB##+.CMDAT ;SAVE IT
	MOVX	T2,<FLD(.CMTAD,CM%FNC)>
	MOVEM	T2,FLUB##+.CMFNP ;SET FUNCTION
	SETZM	FLUB##+.CMHLP	;CLEAR UP
	SETZM	FLUB##+.CMDEF
	MOVEI	T2,FLUB##	;POINT TO BLOCK
	PJRST	JCOMND##	;DO JSYS

	PRGEND
	TITLE	CDGSIX	GET SIXBIT ATOM
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRGSIX,CDGSIX

	;ROUTINE TO GET SIXBIT ATOM AND DEAL WITH REPARSE. RETURN
	;IS NON-SKIP IF ERROR, SKIP IF OK, OR BUMP UP ONE LEVEL IF
	;REPARSE NECCESSARY.

CRGSIX:	PUSHJ	P,CDGSIX	;GET IT
	 POP	P,(P)		;REPARSE
	 POPJ	P,		;ERROR
	PJRST	CPOPJ1##	;BAD

	;ROUTINE TO INPUT SIXBIT ATOM IN T2. RETURN NON-SKIP FOR
	;REPARSE, SKIP IF ERROR, OR DOUBLE SKIP FOR SUCCESS WITH
	;ATOM IN T2.

CDGSIX:	MOVEI	T2,[FLDDB. (.CMFLD)] ;GET A FIELD
	PUSHJ	P,JCOMND##	;GET IT
	 POPJ	P,		;REPARSE
	 PJRST	CPOPJ1##	;BAD
	SETZM	T2		;START WITH NOTHING
	MOVE	T1,[440700,,ATMBUF##] ;MAKE BYTE POINTER
	MOVE	T3,[440600,,T2]	;FOR OUTPUT
CDGSXL:	ILDB	T4,T1		;GET CHARACTER
	CAIL	T4,"a"		;LOWER CASE?
	CAILE	T4,"z"		;ANY OF THEM?
	SKIPA			;NO
	SUBI	T4,40		;MAKE UPPER CASE
	CAIL	T4,"A"		;ALPAHABETIC?
	CAILE	T4,"Z"		;ANY OF THEM?
	SKIPA			;NO
	JRST	CDGSXU		;OK
	CAIL	T4,"0"		;NUMERIC?
	CAIL	T4,"9"		;ANYTHING?
	SKIPA			;NO
	JRST	CDGSXU		;OK
	JUMPE	T4,CPOPJ2##	;FOUND END
	PJRST	CPOPJ1##	;ERROR
CDGSXU:	SUBI	T4,40		;SIXBITIT
	IDPB	T4,T3		;SAVE IT
	TLNE	T3,770000	;MORE ROOM?
	JRST	CDGSXL		;DO IT
	PJRST	CPOPJ2##	;ASSUME IT IS OK

	PRGEND
	TITLE	CDGONM	GET OCTAL NUMBER (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRGONM,CDGONM

	;ROUTINE TO INPUT AN OCTAL NUMBER AND DEAL WITH REPARSE.
	;RETURN IS NON-SKIP FOR ERROR, SKIP IF OK, OR BUMP UP ONE
	;LEVEL IF REPARSE NECESSARY.

CRGONM:	PUSHJ	P,CDGONM	;GET IT
	 POP	P,(P)		;REPARSE
	 POPJ	P,		;ERROR
	PJRST	CPOPJ1##	;OK

	;ROUTINE TO INPUT AN OCTAL NUMBER. RETURN +1 FOR REPARSE
	;NECESSARY, SKIP IF ERROR OR DOUBLE SKIP FOR SUCCESS.

CDGONM:	MOVEI	T2,[FLDDB. (.CMNUM,,10)]
	PJRST	JCOMND##	;GO DO IT

	PRGEND
	TITLE	CDGDNM	GET DECIMAL NUMBER (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRGDNM,CDGDNM

	;ROUTINE TO INPUT A DECIMAL NUMBER FROM THE TTY. RETURN
	;IS NON-SKIP FOR ERROR, SKIP IF OK, OR BUMP UP ONE LEVEL
	;IF REPARSE IS NECESSARY.

CRGDNM:	PUSHJ	P,CDGDNM	;GET IT
	 POP 	P,(P)		;REPARSE
	 POPJ	P,		;ERROR
	PJRST	CPOPJ1##	;OK

	;ROUTINE TO INPUT DECIMAL NUMBER FROM THE TTY.
	;RETURN IS +1 FOR REPARSE NECESSARY, SKIP IF ERROR
	;OR DOUBLE SKIP FOR SUCCESS.

CDGDNM:	MOVEI	T2,[FLDDB. (.CMNUM,,^D10)]
	PJRST	JCOMND##	;GET IT

	PRGEND
	TITLE	CDIFLT	GET FLOATING POINT NUMBER FROM TTY
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRIFLT,CDIFLT

	;ROUTINE TO INPUT A FLOATING NUMBER FROM THE TTY. RETURN
	;IS NON-SKIP FOR ERROR, SKIP IF OK, OR BUMP UP ONE LEVEL
	;IF REPARSE IS NECESSARY.

CRIFLT:	PUSHJ	P,CDIFLT	;GET IT
	 POP 	P,(P)		;REPARSE
	 POPJ	P,		;ERROR
	PJRST	CPOPJ1##	;OK

	;ROUTINE TO INPUT FLOATING NUMBER FROM THE TTY.
	;RETURN IS +1 FOR REPARSE NECESSARY, SKIP IF ERROR
	;OR DOUBLE SKIP FOR SUCCESS.

CDIFLT:	MOVEI	T2,[FLDDB. (.CMFLT)]
	PJRST	JCOMND##	;GET IT

	PRGEND
	TITLE	CDFLSP	GET FILESPEC (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRFLSP,CDFLSP

	;ROUTINE TO GET FILESPEC. ENTER WITH GTJFN BLOCK SET UP.
	;RETURN IS NON-SKIP FOR NO SUCH FILE, SKIP IF OK WITH JFN
	;IN T2. BUMP UP ONE LEVEL IF REPARSE NECESSARY.

CRFLSP:	PUSHJ	P,CDFLSP	;GET FILE
	 POP	P,(P)		;REPARSE
	 POPJ	P,		;NO SUCH FILE
	PJRST	CPOPJ1##	;OK

	;ROUTINE TO GET FILESPEC. ENTER WITH GTJFN BLOCK SET UP.
	;RETURN IS +1 FOR REPARSE, SKIP FOR NO SUCH FILE, AND
	;DOUBLE SKIP FOR OK WITH JFN IN T2.

CDFLSP:	MOVEI	T2,[FLDDB. (.CMFIL)]
	JRST	JCOMND##	;GO DO IT

	PRGEND
	TITLE	CDIFSP	GET INPUT FILESPEC (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRIFSP,CDIFSP

	;ROUTINE TO GET INPUT FILESPEC. ENTER WITH GTJFN BLOCK SET UP.
	;RETURN IS NON-SKIP FOR NO SUCH FILE, SKIP IF OK WITH JFN
	;IN T2. BUMP UP ONE LEVEL IF REPARSE NECESSARY.

CRIFSP:	PUSHJ	P,CDIFSP	;GET FILE
	 POP	P,(P)		;REPARSE
	 POPJ	P,		;NO SUCH FILE
	PJRST	CPOPJ1##	;OK

	;ROUTINE TO GET INPUT FILESPEC. ENTER WITH GTJFN BLOCK SET UP.
	;RETURN IS +1 FOR REPARSE, SKIP FOR NO SUCH FILE, AND
	;DOUBLE SKIP FOR OK WITH JFN IN T2.

CDIFSP:	MOVEI	T2,[FLDDB. (.CMIFI)]
	JRST	JCOMND##	;GO DO IT

	PRGEND
	TITLE	CDOFSP	GET OUTPUT FILESPEC (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CROFSP,CDOFSP

	;ROUTINE TO GET OUTPUT FILESPEC. ENTER WITH GTJFN BLOCK SET UP.
	;RETURN IS NON-SKIP FOR NO SUCH FILE, SKIP IF OK WITH JFN
	;IN T2. BUMP UP ONE LEVEL IF REPARSE NECESSARY.

CROFSP:	PUSHJ	P,CDOFSP	;GET FILE
	 POP	P,(P)		;REPARSE
	 POPJ	P,		;NO SUCH FILE
	PJRST	CPOPJ1##	;OK

	;ROUTINE TO GET OUTPUT FILESPEC. ENTER WITH GTJFN BLOCK SET UP.
	;RETURN IS +1 FOR REPARSE, SKIP FOR NO SUCH FILE, AND
	;DOUBLE SKIP FOR OK WITH JFN IN T2.

CDOFSP:	MOVEI	T2,[FLDDB. (.CMOFI)]
	JRST	JCOMND##	;GO DO IT

	PRGEND
	TITLE	CDGDEV	GET DEVICE NAME (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRGDEV,CDGDEV

	;ROUTINE TO GET DEVICE NAME. RETURN WITH DEVICE
	;NUMBER IN T2. EXIT NON-SKIP IF BAD, OR SKIP IF GOOD.
	;BUMP UP ONE LEVEL IF REPARSE NECESSARY.

CRGDEV:	PUSHJ	P,CDGDEV	;GET IT
	 POP	P,(P)		;REPARSE
	 POPJ	P,		;BAD
	PJRST	CPOPJ1##	;OK

	;ROUTINE TO GET DEVICE NAME FROM THE TTY. ENTER ALREADY
	;INITIALISED. RETURN IS +1 FOR REPARSE, SKIP FOR NO SUCH
	;DEVICE, OR DOUBLE SKIP IF OK WITH 36-BIT DEVICE
	;NUMBER IN T2.

CDGDEV:	MOVEI	T2,[FLDDB. (.CMDEV)]
	PJRST	JCOMND##	;GO GET IT

	PRGEND
	TITLE	CDGFLD	PARSE AN ARBITRARY FIELD. (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRGFLD,CDGFLD

	;ROUTINE TO PARSE AN ARBITRARY FIELD. ENTER WITH
	;T1 CONTAINING THE MAXIMUM LENGTH OF THE FIELD IN THE
	;LEFT HALF AND THE ADDRESS OF WHERE TO PUT IT IN THE
	;RIGHT HALF. RETURN +1 IF BAD, OR SKIP IF OK. BUMP UP
	;ONE LEVEL IF REPARSE NECESSARY.

CRGFLD:	PUSHJ	P,CDGFLD	;DO IT
	 POP	P,(P)		;REPARSE
	 POPJ	P,		;ERROR
	PJRST	CPOPJ1##	;OK

	;ROUTINE TO PARSE AN ARBITRARY FIELD. ENTER WITH T1 CONTAINING
	;THE LENGTH OF THE FIELD IN THE LEFT HALF AND THE ADDRESS
	;OF WHERE TO PUT IT IN THE RIGHT HALF. RETURN +1 IF
	;REPARSE NECESSARY, SKIP IF BAD, OR DOUBLE SKIP IF GOOD.

CDGFLD:	PUSH	P,T1		;SAVE ADDRESS WHERE TO PUT IT
	MOVEI	T2,[FLDDB. (.CMFLD)] ;GET A FIELD
	PUSHJ	P,JCOMND##	;GET IT
	 PJRST	T1POPJ##	;REPARSE
	 PJRST	[POP P,T1
		 PJRST CPOPJ1##] ;ERROR
	POP	P,T2		;RESTORE ARGUMENT
	MOVEI	T1,ATMBUF##	;POINT TO ARGUMENT
	PUSHJ	P,COPSTG##	;COPY IT
	 PJRST	CPOPJ1##	;ERROR
	PJRST	CPOPJ2##	;OK

	PRGEND
	TITLE	CDGKNT	GET KEY WORD OR NOTHING (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRGKNT,CDGKNT

	;ROUTINE TO LOOK FOR A KEYWORD OR NOTHING. ENTER WITH
	;ADDRESS OF TABLE IN T2. EXIT NON-SKIP IF BAD, SKIP IF
	;NOTHING, OR DOUBLE SKIP IF OK. BUMP UP ONE LEVEL IF
	;REPARSE NECESSARY.

CRGKNT:	PUSHJ	P,CDGKNT	;LOOK IT UP
	 POP	P,(P)		;BAD
	 POPJ	P,		;ERROR
	 PJRST	CPOPJ1##	;NOTHING
	PJRST	CPOPJ2##	;OK

	;ROUTINE TO LOOK UP KEY WORD OR NOTHING. ENTER WITH ADDRESS
	;OF TABLE IN T2. RETURN +1 IF REPARSE NECESSARY, SKIP IF
	;NOTHING, DOUBLE SKIP IF BAD, OR TREBLE SKIP IF OK.

CDGKNT:	PUSHJ	P,CDGKEY##	;LOOK IT UP
	 POPJ	P,		;REPARSE
	 JRST	KNTERR		;ERROR?
	PJRST	CPOPJ3##	;OK

KNTERR:	TXNN	T1,CM%EOC	;CARRIAGE RETURN TYPED?
	PJRST	CPOPJ1##	;ERROR
	LDB	T2,[350700,,ATMBUF##] ;LOOK AT ATOM
	JUMPE	T2,CPOPJ2##	;NOTHING TYPED
	PJRST	CPOPJ1##	;ERROR

	PRGEND
	TITLE	CDDKEY	COMMAND KEY DOUBLE LOOKUP.(COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRDKEY,CDDKEY

	;ROUTINE TO PERFORM DOUBLE TABLE LOOKUP. ENTER WITH ADDRESS OF
	;TABLES IN T2 AND T3. EXIT NON-SKIP IF BAD, OR SKIP IF GOOD.
	;BUMP UP ONE LEVEL IF REPARSE NECESSARY

CRDKEY:	PUSHJ	P,CDDKEY	;LOOK IT UP
	 POP	P,(P)		;REPARSE
	 POPJ	P,		;BAD
	PJRST	CPOPJ1##	;OK

	;ROUTINE TO PERFORM DOUBLE TABLE LOOKUP. ENTER WITH ADDRESS
	;OF TABLES IN T2 AND T3. EXIT NON-SKIP IF REPARSE NECESSARY,
	;OR SKIP IF BAD REPLY, OR DOUBLE SKIP IF OK

CDDKEY:	MOVEM	T2,FLUB##+.CMDAT ;SAVE ADDRESS OF FIRST TABLE
	MOVEM	T3,FLUB1##+.CMDAT ;AND SECOND TABLE
	MOVX	T2,<FLD(.CMKEY,CM%FNC)>
	MOVEM	T2,FLUB##+.CMFNP ;SET FUNCTION
	MOVEM	T2,FLUB1##+.CMFNP ;IN BOTH
	MOVEI	T2,FLUB1##	;GET ADDRESS OF SECOND BLOCK
	HRRM	T2,FLUB##+.CMFNP ;MAKE POINTER
	SETZM	FLUB##+.CMHLP
	SETZM	FLUB1##+.CMHLP
	SETZM	FLUB##+.CMDEF	;JUST IN CASE
	SETZM	FLUB1##+.CMDEF	;TWICE
	MOVEI	T2,FLUB##	;POINT TO BLOCK
	PJRST	JCOMND##	;DO JSYS

	PRGEND
	TITLE	CDGKEY	COMMAND KEY LOOKUP.(COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRGKEY,CDGKEY

	;ROUTINE TO PERFORM TABLE LOOKUP. ENTER WITH ADDRESS OF
	;TABLE IN T2. EXIT NON-SKIP IF BAD, OR SKIP IF GOOD.
	;BUMP UP ONE LEVEL IF REPARSE NECESSARY

CRGKEY:	PUSHJ	P,CDGKEY	;LOOK IT UP
	 POP	P,(P)		;REPARSE
	 POPJ	P,		;BAD
	PJRST	CPOPJ1##	;OK

	;ROUTINE TO PERFORM TABLE LOOKUP. ENTER WITH ADDRESS
	;OF TABLE IN T2. EXIT NON-SKIP IF REPARSE NECESSARY,
	;OR SKIP IF BAD REPLY, OR DOUBLE SKIP IF OK

CDGKEY:	MOVEM	T2,FLUB##+.CMDAT ;SAVE ADDRESS OF TABLE
	MOVX	T2,<FLD(.CMKEY,CM%FNC)>
	MOVEM	T2,FLUB##+.CMFNP ;SET FUNCTION
	SETZM	FLUB##+.CMHLP
	SETZM	FLUB##+.CMDEF	;JUST IN CASE
	MOVEI	T2,FLUB##	;POINT TO BLOCK
	PJRST	JCOMND##	;DO JSYS

	PRGEND
	TITLE	CDGTCM	GET CONFIRMATION (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRGTCM,CDGTCM

	;ROUTINE TO GET CONFIRMATION AND PRESERVE T1-T4. RETURN
	;NON-SKIP FOR BAD, SKIP IF OK. BUMP UP A LEVEL IF REPARSE
	;NECESSARY.

CRGTCM:	PUSHJ	P,CDGTCM	;GET CONFIRMATION
	 POP	P,(P)		;REPARSE
	 POPJ	P,		;BAD
	PJRST	CPOPJ1##	;OK

	;ROUTINE TO GET CONFIRMATION AND PRESERVE T1-T4.
	;RETURN +1 FOR REPARSE, SKIP FOR ERROR,
	;OR DOUBLE SKIP FOR SUCCESS.

CDGTCM:	PUSHJ	P,SAVT##	;SAVE T1-T4
	MOVEI	T2,[FLDDB. (.CMCFM)]
	PUSHJ	P,JCOMND##	;GET CONFIRMATION
	 POPJ	P,		;REPARSE
	 ERROR	CPOPJ1##,<BAD CONFIRMATION>
	PJRST	CPOPJ2##	;DOUBLE SKIP

	PRGEND
	TITLE	CDMNOI	MAKE NOISE. (COMPONENTS)
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL

	ENTRY	CRMNOI,CDMNOI

	;ROUTINE TO MAKE NOISE. ENTER WITH POINTER TO NOISE
	;IN T2. EXIT IS +1 ALWAYS, EXCEPT WHEN REPARSE NECESSARY.
	;THEN WE BUMP UP ONE LEVEL.

CRMNOI:	PUSHJ	P,CDMNOI	;MAKE IT
	 POP	P,(P)		;REPARSE
	POPJ	P,		;OK

	;ROUTINE TO MAKE NOISE. ENTER WITH POINTER TO NOISE
	;IN T2. EXITS +1 FOR REPARSE, SKIP IF OK.

CDMNOI:	MOVEM	T2,FLUB##+.CMDAT ;SAVE POINTER
	SETZM	FLUB##+.CMHLP	;CLEAR SOME MEMORY
	SETZM	FLUB##+.CMDEF	;FOR COSMETIC REASONS
	MOVX	T2,<FLD(.CMNOI,CM%FNC)> ;MAKE NOISE
	MOVEM	T2,FLUB##+.CMFNP ;SAVE FUNCTION
	MOVEI	T2,FLUB##	;POINT TO BLOCK
	PUSHJ	P,JCOMND##	;DO IT
	 POPJ	P,		;NEED TO REPARSE
	 JFCL			;CANNOT GET HERE
	PJRST	CPOPJ1##	;SKIP

	PRGEND
	TITLE	CDSETP	SET UP AND INITIALISE COMMAND JSYS
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>
	SALL

	ENTRY	CDSETP

	;ROUTINE TO SET UP COMMAND JSYS AND INITIALISE IT.

CDSETP:	MOVE	T1,[.PRIIN,,.PRIOU] ;JFNS FOR USER INPUT AND OUTPUT
	MOVEM	T1,CMDBLK##+.CMIOJ
	HRROI	T1,BUFFER##	;POINTER TO START OF USER INPUT
	MOVEM	T1,CMDBLK##+.CMBFP
	MOVEM	T1,CMDBLK##+.CMPTR
	MOVEI	T1,BUFSIZ*NCHPW	;SIZE REMAINING IN THE BUFFER
	MOVEM	T1,CMDBLK##+.CMCNT
	SETZM	CMDBLK##+.CMINC	;NUMBER OF UNPARSED CHARACTERS
	HRROI	T1,ATMBUF##	;POINT TO ATOM BUFFER
	MOVEM	T1,CMDBLK##+.CMABP
	MOVEI	T1,ATMSIZ*NCHPW	;NUMBER OF CHARACTERS IN ATOM BUFFER
	MOVEM	T1,CMDBLK##+.CMABC
	MOVEI	T1,GTJBLK##	;ADDRESS OF GTJFN BLOCK
	MOVEM	T1,CMDBLK##+.CMGJB
	MOVE	T1,CMDT1##	;GET PROMPT
	MOVEM	T1,CMDBLK##+.CMRTY
	SETZM	CMDBLK##+.CMFLG	;CLEAR FLAGS
	MOVEI	T2,[FLDDB. (.CMINI)] ;INITIALISE
	PUSHJ	P,JCOMND##	;DO IT
	 JFCL			;CANNOT GET HERE
	 JFCL			;OR HERE
	POPJ	P,		;OK

	PRGEND
	TITLE	CDSRGS	SAVE COMMAND PARAMETERS
	SUBTTL	C.MITCHELL 1977. ROUTINES WRITTEN AT COLOGNE.

	SEARCH	MONSYM,MACSYM,CMLBSM

	IFNDEF	.PSECT,<
	.DIRECT	.XTABM>

	SALL
	ENTRY	CDSRGS

	;ROUTINE TO SAVE PARAMETERS SUPPLIED IN T1,T2, USED WHEN
	;CALLING "CMND" JSYS.

CDSRGS:	MOVEM	T1,CMDT1##	;SAVE T1
	MOVEM	T2,CMDT2##	;AND T2
	MOVEM	T3,CMDT3##	;AND T3
	POPJ	P,

	END