	.TITLE *** COPYRIGHT ***

/

/COPYRIGHT (C) 1976

/DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

/

/THIS SOFTWARE IS FURNISHED UNDER A LICENSE FOR USE ONLY

/ON A SINGLE COMPUTER SYSTEM AND MAY BE COPIED ONLY WITH

/THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS

/SOFTWARE, OR ANY OTHER COPIES THEREOF, MAY NOT BE PRO-

/VIDED OR OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON

/EXCEPT FOR USE ON SUCH SYSTEM AND TO ONE WHO AGREES TO

/THESE LICENSE TERMS.  TITLE TO AND OWNERSHIP OF THE

/SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.

/

/THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE

/WITHOUT NOTICE AND SHOULD NOT BE CONSTRUED AS A COM-

/MITMENT BY DIGITAL EQUIPMENT CORPORATION.

/

/DEC ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY

/OF ITS SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DEC.
	.TITLE *** MACROS FOR PARTITION COMMAND PROCESSOR ***

 

/ MACRO TO RETURN INCREMENTAL RETURN CODE. IF THE RETURN IS AN ERROR

/ THEN THE ARGUMENT TO THE MACRO MUST BE A "-" OTHERWISE IT MUST

/ BE A "+". THIS MACRO MUST BE READ AT BOTH PASS1 AND PASS2 TO WORK

/ PROPERLY.

 

	.DEFIN POSTEV,A

RT.CTR=0

	.DEFIN POSTEV,AA

RT.CTR=RT.CTR+1		/ INCREMENT RETURN COUNTER.

	LAC (AA@RT.CTR)	/ FETCH + OR - RETURN CODE.

	DAC U.OEV,X	/ POST OVERLAY EVENT VARIABLE.
	.ENDM
	POSTEV A

	.ENDM

/
/ MACRO TO DEFINE OFFSETS INTO THE USER CONTEXT AREA.

/
	.DEFIN UCAOFF

U.JSW=0				/OFFSET TO JOB STATUS WORD.

U.MAEV=1			/OFFSET TO EVENT VARIABLE

U.MAMTE=2			/OFFSET TO MARK TIME EVENT VARIABLE.

U.OEV=3				/OFFSET TO OVERLAY EVENT VARIABLE.

U.DSK=4				/OFFSET TO DISK NAME

U.DUN=5				/OFFSET TO DISK UNIT NUMBER

U.UFD=6				/OFFSET TO UFD NAME.

U.CTSK=7			/OFFSET TO CURRENT TASK NAME

U.PSC=11			/OFFSET TO PARTITION SELECTION CRITERIA.

U.ULOF=14			/OFFSET TO USER NUMBER AND LUN OFFSET.

U.TTYN=15			/OFFSET TO USER TERMINAL NUMBER.

U.TB=16				/OFFSET TO USER TERMINAL BUFFER.

U.CPB=62			/OFFSET TO MULTI-ACCESS CPB.

U.SSM=74			/SECONDS SINCE MIDNIGHT INTO STATE 11

				/ OR 12 (HUNG ON PARTITION)

U.TW=75				/TOTAL TIME IN SECONDS SPENT IN STATE 11

				/ OR 12.

U.OVID=76			/OVERLAY IDENTIFIER (LAST OVERLAY CALLED)

U.CKS=77			/CHECKSUM OF INPUT BUFFER FOR TIMED READ.

U.LEN=100			/LENGTH OF UCA.

	.DEFIN UCAOFF
	.ENDM
	.ENDM
	.DEFINE TEXT,A,?B

	B-./2*1000+2

	0
	.ASCII "A"<15>
B=.
	.ENDM
 
/ MACRO TO RAISE TO LEVEL 6 TO LOCK OUT SIGNIFICANT EVENTS.
 
	.DEFIN .RTL6
	LAC (400002)
	ISA
	.ENDM
	.TITLE *** EQUATES FOR PARTITION COMMAND PROCESSOR ***
OVID=200122
TDV=240426
PLUS=53
IDX=ISZ
X10=10
PBDL=250
R1=101
R2=102
SNAM=123
ATL=244
ISA=705504
P.FP=0
P.N1=2
P.N2=3
P.SZ=5
ECLA=641000
X10=10
X11=11
	UCAOFF
	.TITLE *** VARIABLES AND STORATE FOR PARTITION COMMAND PROC ***
 
	.DBREL
 
/ GLOBALS FOR PARTITION COMMAND PROCESSOR.
 
	.GLOBL PARTS
	.GLOBL TDVTYP
 
UCAADR	0		/ ADDRESS OF THE USER CONTEXT AREA.
XR.ADJ	0		/ INDEXING FUDGE FACTOR.
TTYN	0		/ USER TERMINAL NUMBER FOR ERROR MESSAGES
SAVAC	0		/ FOR NUMBER
COUNT	0		/ FOR NUMBER
NUMFLG	0		/ FOR NUMBER
NUM	0
NUMT	0
CHAR	0
TABLE	.BLOCK 6
SIZE	0
	0
FLAGS	0
TYPE	0
 
DIS1	21
	0
	.SIXBT '...RCF'
 
DIS2	21
	0
	.SIXBT '...RCP'
 
ENA1	22
	0
	.SIXBT '...RCF'
 
ENA2	22
	0
	.SIXBT '...RCP'
 
MSG1	TEXT <PAR -- SYNTAX ERROR>
MSG2	TEXT <PAR -- PARTITION NOT IN SYSTEM>
MSG3	TEXT <PAR -- NO PARTITION IS BIG ENOUGH>
	.TITLE *** CODE FOR PARTITION COMMAND PROCESSOR ***
 
PARTS	XX		/ ENTRY POINT.
	DAC UCAADR	/ SAVE THE UCA ADDRESS.
	CAL DIS1	/ KEEP RCF AND
	CAL DIS2	/ RCP FROM RUNNING IF NOT ALREADY RUNNING.
	LAC (.)		/ SET UP THE INDEXING FUDGE FACTOR.
	AND (70000)
	CMA!IAC
	DAC XR.ADJ
 
	LAC UCAADR	/ FETCH THE UCA ADDRESS.
	JMS SETXR	/ SET UP TO ACCESS THE UCA.
	LAC (OVID)	/ INITIALIZE THE OVERLAY ID NAME.
	DAC U.OVID,X
	LAC U.TTYN,X	/ FETCH TTY NUMBER IN CASE OF ERRORS.
	DAC TTYN
	LAC UCAADR	/ INITIALIZE CHARACTER FETCHING ROUTINE.
	AAC U.TB+2	/ POINT TO FIRST WORD OF MESSAGE.
	DAC FACLBX
	LAC (FACCB+5)	/ SET UP FIRST ACCESS TO CHARACTER BUFFER.
	DAC FACCBX
	LAC (6)		/ FETCH RETURN CODE FOR EXIT.
	DAC U.JSW,X
	LAC U.CTSK,X	/ FETCH THE OVERLAY NAME (KPA OR PAR)
	SAD (OVID)	/ IS IT 'PAR'?
	SKP!CLA		/ YES, SET FLAGS WORD TO 0.
	LAC (400000)	/ SET UP FOR GLOBAL MEANING.
	DAC FLAGS	/ SAVE GLOBAL FLAG.
 
	JMS BLSCAN	/ FIND FIRST BLANK.
	JMP PARLST	/ GO LIST PARTITIONS.
 
NBLOOP	JMS FAC		/ FETCH A CHARACTER.
	SAD (40)	/ IS IT A BLANK?
	JMP NBLOOP	/ YES, GET NEXT CHARACTER.
	JMS TERM	/ IS IT A TERMINATOR?
	SKP!CLL		/ NO.
	JMP PARLST	/ YES, GO LIST PARTITIONS.
	DAC NUMFLG	/ SAVE THE CHARACTER FOR A BIT.
	SAD (PLUS)	/ IS THE CHARACTER A '+'?
	JMP DELTA	/ YES, GO SET UP TYPE FOR DELTA.
 
/ FIGURE OUT IF THE FIRST CHARACTER IS NUMERIC OR ALPHABETIC.
 
	AAC -60		/ FIRST THROUGH OUT ALL CHARACTERS BELOW "0"
	SPA!STL		/ INITIALIZE ALPHA/NUMERIC FLAG.
	JMP ERR1	/ SPECIAL CHARACTERS BELOW 0.
	TAD (-10)	/ CLEAR LINK IF CHARACTER >="8".
	SZL		/ LINK = 0 IF CHARACTER IS ALPHABETIC.
	JMP INC		/ GO SET UP FLAG.
	AAC -10		/ CHECK IT FOR >= "A".
	SNA!SPA		/ L = 1 IF CHARACTER IS NUMERIC.
			/AC > 0 IF CHARACTER > "@"
	JMP ERR1	/ SYNTAX ERROR.
INC	SNL!CLA!IAC	/ AC = 1 IF MINIMUM SIZE.
	IAC		/ AC = 2 IF NAME OF A PARTITION.
	SKP		/ AVOID DELTA ENTRY.
DELTA	CLA		/ TYPE = 0 FOR DELTA.
	DAC TYPE	/ SAVE PARTITION SELECTION CRITERIA.
 
	SAD (2)		/ NAMED PARTITION?
	JMP NAMED	/ YES, GO SCAN PBDL.
	SZA		/ AC=0 IF DELTA.
	LAC NUMFLG	/ OTHERWISE FETCH FIRST CHARACTER (DIGIT)
	JMS NUMBER	/ FETCH NUMBER FROM INPUT.
	JMP ERR1	/ SYNTAX ERROR.
	LACQ		/ FETCH NUMBER FROM MQ.
	DAC SIZE	/ SAVE IN PSC WORD 1.
	CMA!IAC		/ MAKE NEGATIVE FOR SCAN LOOP.
	DAC SIZE+1	/ SAVE IN PSC WORD 2.
	.RTL6		/ LOCK OUT SIGNIFICANT EVENTS.
	LAC (PBDL)	// START LOOP.
	JMS SETXR	// BY LOOKING AT FIRST NODE IN PBDL.
S.0010	LAC P.FP,X	// FETCH FORWARD POINTER.
	SAD (PBDL)	// POINTS TO LISTHEAD?
	JMP ERR3	// YES, NO PARTITION IS BIG ENOUGH.
	JMS SETXR	// SET UP TO ACCESS THE NEXT BLOCK.
	LAC P.N1,X	// IS THE PARTITION PART OF THE POOL?
	SAD (TDV)	//
	SKP		// YES.
	JMP S.0010	// NO, GO TO NEXT PBDL NODE.
	LAC P.SZ,X	// FETCH SIZE OF PARTITION.
	TAD SIZE+1	// ADD IN SIZE OF DELTA OR MINIMUM.
	SPA		// PARTITION TOO SMALL?
	JMP S.0010	// YES.
 
DONE	DBK		// BACK TO LEVEL 7.
	LAC UCAADR	/ SET UP TO ACCESS UCA.
	JMS SETXR
	LAC FLAGS	/ BUILD PARTITION SELECTION CRITERIA.
	XOR TYPE	/ SET TYPE BITS.
	DAC U.PSC,X	/ SAVE IN UCA.
	LAC SIZE	/ FETCH NAME OR DELTA OR MINIMUM.
	DAC U.PSC+1,X
	LAC SIZE+1	/ FETCH NAME, IF ANY.
	DAC U.PSC+2,X	/ SET UP REMAINDER OF UCA.
	POSTEV +	/ SIGNAL GOOD COMPLETION.
	CAL ENA1	// ENABLE ...RCF
	CAL ENA2	/ ENABLE ...RCP
	JMP* PARTS	/ RETURN TO CALLER.
	.EJECT
NAMED	LAC NUMFLG	/ FETCH FIRST CHARACTER OF NAME.
	JMS NAME	/ EXTRACT PARTITION NAME.
	JMP ERR1	/ SYNTAX ERROR.
	DAC SIZE	/ SAVE FIRST HALF OF NAME.
	LACQ		/ FETCH SECOND HALF OF NAME.
	DAC SIZE+1	/ SAVE SECOND HALF OF NAME.
 
	.RTL6		/ LOCK OUT SIGNIFICANT EVENTS.
	LAC (PBDL)	// SET UP INITIAL ACCESS TO LIST.
	JMS SETXR	//
S.0020	LAC P.FP,X	// ALL COMMENTS AS ABOVE.
	SAD (PBDL)	//
	JMP ERR2	// PARTITION NOT IN SYSTEM.
	JMS SETXR	//
	LAC P.N1,X	// COMPARE AGAINST NAME.
	SAD SIZE	//
	SKP		//
	JMP S.0020	//
	LAC P.N2,X	//
	SAD SIZE+1
	JMP DONE	// FOUND, EXIT.
	JMP S.0020	//
 
 
	.TITLE *** ERROR EXITS ***
 
ERR1	LAC (MSG1)	/ SYNTAX ERROR
	JMP ERRP	/ INTO ERROR PROCESSING.
ERR2	DBK		/ BACK TO LEVEL 7.
	LAC (MSG2)
	JMP ERRP
ERR3	DBK		/ BACK TO LEVEL 7.
	LAC (MSG3)	/ NO PARTITION IS BIG ENOUGH.
ERRP	DAC NUMFLG	/ SAVE MESSAGE ADDRESS.
	JMS* TDVTYP	/ CALL TYPE ROUTINE.
	LAC TTYN	/ FETCH TERMINAL NUMBER.
	LAC NUMFLG	/ FETCH MESSAGE ADDRESS.
	LAC (2)		/ FETCH DATA MODE.
	LAC UCAADR	/ RESTORE INDEXING FOR EXIT.
	JMS SETXR
	POSTEV -	/ SIGNAL FAILURE.
	CAL ENA1	/ ENABLE ...RDF
	CAL ENA2	/ ENABLE ...RCP
	JMP* PARTS	/ RETURN TO CALLER.
	.TITLE *** MISCELLANEOUS SUBROUTINES ***
 
TERM	XX		/ CHECK FOR CR OR AM AND SKIP IF YES.
	SAD (15)	/ CARRIAGE RETURN?
	SKP		/ YES.
	SAD (175)	/ ALT MODE?
	ISZ TERM	/ YES.
	JMP* TERM	/ RETURN.
 
BLSCAN	XX		/ SCAN FOR FIRST BLANK.
BL.010	JMS FAC		/ FETCH A CHARACTER.
	JMS TERM	/ IS IT A TERMINATOR?
	SKP		/ NO.
	JMP* BLSCAN	/ YES, TAKE FUNNY RETURN.
	SAD (40)	/ BLANK?
	SKP		/ YES.
	JMP BL.010	/ NO.
	ISZ BLSCAN	/ SET UP FOR RETURN.
	JMP* BLSCAN	/ RETURN.
 
SETXR	XX		/ AC = ADDRESS ON ENTRY.
	TAD XR.ADJ	/ ADD IN INDEXING FUDGE FACTOR.
	PAX		/ PUT VALUE IN XR.
	JMP* SETXR	/ RETURN TO CALLER.
	.EJECT
/
/	FAC -- SUBROUTINE TO FETCH A CHARACTER FROM 5/7 ASCII LINE BUFFER 'FACLB'.
/	CHARACTERS ARE NOT FETCHED BEYOND TERMINAL CHARACTERS
/
FAC	0
	LAC*	FACCBX	/FETCH NEXT UNPACKED CHARACTER FROM 'FACCB'
	SMA		/WAS CHARACTER BUFFER (FACCB) EMPTY?
	JMP	FAC2	/NO -- TEST FOR TERMINAL CHARACTER
	LAC	(FACCB-1)	/YES -- REFIL 'FACCB'
	DAC	FACCBX
	LAC*	FACLBX	/(FIRST HALF OF WORD PAIR)
	ISZ	FACLBX
	LMQ
	CLA!CLL
	JMS	FACUPS	/(FIRST CHAR)
	JMS	FACUPS	/(SECOND CHARACTER
	JMS	FACUPS	/(FIRST FOUR BITS OF THIRD CHARACTER)
	LAC*	FACLBX	/(SECOND HALF OF WORD PAIR)
	ISZ	FACLBX
	LRS	17	/(LAST THREE BITS OF THIRD CHAR)
	XOR*	FACCBX
	DAC*	FACCBX
	CLA
	JMS	FACUPS	/(FORTH CHAR)
	JMS	FACUPS	/(FIFTH CHAR)
	LAC	(FACCB)	/RESET CHAR BUF INDEX
	DAC	FACCBX
	LAC*	FACCBX	/FETCH FIRST CHAR FROM BUFFER
FAC2	SAD	(015)	/IF TERMINAL CHARACTER, (CR OR AM)
	JMP*	FAC	/RETURN WITH CHAR IN AC BUT DO NOT
	SAD	(175)	/AUGMENT CHAR BUF INDEX (REPEATED CHAR)
	JMP*	FAC	/OF FAC WILL RETURN THE TERMINAL CHARACTER)
/
	ISZ	FACCBX	/NON-TERMINAL CHARACTER -- AUGMENT CHARACTER
	JMP*	FAC	/BUFFER INDEX AND RETURN WITH CHAR IN AC
/
FACUPS	0		/UNPACKING SUBROUTINE -- AC & LINK MUST BE
	LLS	7	/CLEARED, NEXT CHAR MUST BE IN HIGH ORDER
	ISZ	FACCBX	/MQ, 'FACCBX' MUST POINT TO WORD PRECEEDING
	DAC*	FACCBX	/CHAR TO BE STORED.
	CLA		/CHAR IS SHIFTED INTO AC (LOW ORDER BITS
	JMP*	FACUPS	/OF THIRD CHAR ARE ZERO BECAUSE LINK IS
		/ZERO), STORED, 'FACCBX' IS LEFT POINTING TO 
		/CHAR, AND AC IS CLEARED (LINK IS ALSO LEFT CLEARED
FACLBX	0		/LINE BUFFER INDEX
FACCBX	FACCB+5	/CHARACTER BUFFER INDEX
FACCB	.BLOCK	5	/CHARACTER BUFFER (5 IMAGE ALPHA CHARS)
	-1		/END OF 'FACCB' INDICATOR
/
/ SUBROUTINE NUMBER -- READ A DECIMAL NUMBER OF UP TO 3 DIGITS
/			OFF THE MCR TTY.
/ 
/ ALTERED REGISTERS: AC AND MQ
/ 
/ CALLING SEQUENCE:
/		CLA			/CLA IF 1ST CHAR NOT IN AC
/		JMS	NUMBER
/		JMP	???	/RETURN HERE IF 1ST CHARACTER
/				/AFTER A BUNCH OF SPACES IS NOT
/				/A DECIMAL DIGIT WITH THE CHARACTER
/				/IN THE AC.
/		???	???	/RETURN HERE IF 1ST CHARACTER
/				/AFTER A BUNCH OF SPACES IS A DECIMAL
/				/DIGIT WITH THE BREAK CHARACTER IN THE
/				/AC AND THE NUMBER IN THE MQ.
/ 
NUMBER	0
	DAC	SAVAC		/SAVE AC TEMP
	LAW	-6		/SET DIGIT COUNTER
	DAC	COUNT
	DZM	NUM		/ZERO PREVIOUS RESULTS
	CLC			/SET A FLAG TO INDICATE THAT SPACES
	DAC	NUMFLG		/ARE NOT BREAK CHARACTERS YET.
	LAC	SAVAC		/WAS A CHAR IN THE AC ON ENTRY?
	SNA
NUM1	JMS	FAC		/GET A CHARACTER
	SAD	(40		/WAS THE CHARACTER A SPACE?
	JMP	NUMSPC		/YES
	DZM	NUMFLG		/NO -- CLEAR FLAG TO INDICATE THAT ANY
				/SPACES ENCOUNTERED SHOULD BE USED AS
				/BREAK CHARACTERS.
	DAC	NUMT		/SAVE IT TEMPORARILY
	AAC	-60		/IS IT A DIGIT?
	SPA
	JMP	NUM2		/NO -- EITHER A BREAK OR AN ERROR
	DAC	CHAR		/SAVE THE POTENTIAL DIGIT
	AAC	-10
	SMA
	JMP	NUM2		/NO -- EITHER A BREAK OR AN ERROR
	LAC	NUM		/YES -- PICK UP THE REAL NUMBER
				/THAT HAS ALREADY BEEN CONSTRUCTED
	CLL
	MUL			/MULTIPLY IT BY 10 DECIMAL
	10
	LACQ			/GET RESULT INTO AC
	TAD	CHAR		/ADD THE DIGIT JUST READ
	DAC	NUM		/SAVE THE RESULTING DECIMAL NUMBER
	ISZ	COUNT		/HAVE 3 DIGITS BEEN READ?
	JMP	NUM1		/NO -- READ SOME MORE
	JMS	FAC		/YES -- READ A BREAK CHARACTER
	SAD (40)		/ THIS HAD BETTER BE A BLANK OR A
	JMP NUM3		/ CR OR AN AM.
	JMS TERM		/ AM OR CR?
	JMP* NUMBER		/ NO, NOT ANY OF THE ABOVE.
NUM3	DAC	CHAR		/SAVE THE CHARACTER TEMPORARILY
	IDX	NUMBER		/PREPARE TO RETURN AT JMS+2
	LAC	NUM		/PICK UP THE DECIMAL NUMBER
	LMQ			/STORE IT IN THE MQ
	LAC	CHAR		/GET THE BREAK CHAR INTO THE AC
	JMP*	NUMBER		/RETURN AT JMS+2
NUM2	LAC NUMT		/ FETCH CHARACTER FOR TERMINATOR TEST.
	SAD (40)		/ BLANK?
	JMP NUM3		/ YES.
	JMS TERM		/ AM OR CR?
	SKP			/ NO.
	JMP NUM3		/ YES, OK.
NUMERR	LAC	NUMT		/ERROR SO GET CHARACTER INTO AC
	JMP*	NUMBER		/AND RETURN AT JMS+1
NUMSPC	LAC	NUMFLG		/CHAR. WAS A SPACE -- IS IT A BREAK CHAR.?
	SZA
	JMP	NUM1		/NO -- THE SPACE SHOULD BE IGNORED
	LAC	(40		/YES -- TREAT THE SPACE AS A BREAK CHAR.
	DAC	NUMT
	JMP	NUM2
	.EJECT
/
/ SUBROUTINE NAME -- READ A NAME OF UP TO 6 CHARACTERS FOR THE TTY
/ 
/ CALLING SEQUENCE:
/		CLA		/OPTIONAL -- IF AC IS NON-ZERO ON
/				/ENTRY TO SUBROUTINE THE FIRST CHAR
/				/OF THE NAME IS ASSUMED TO BE IN AC
/		JMS	NAME
/		JMP	???	/RETURN HERE ON AN ERROR E.G. FIRST
/				/CHAR MUST NOT BE A NUMBER
/		???	???	/RETURN HERE IF OK -- AC HAS 1ST HALF
/				/OF NAME, MQ 2ND HALF AND BREAK CHAR
/				/IS IN THE LR.
/ 
NAME	0
	DAC	SAVAC	/SAVE THE AC
	LAW	-6	/SET UP COUNT OF CHAR
	DAC	COUNT
	CLC		/SET THE SPACE FLAG -- SPACES ARE NOT BREAKS YET
	DAC	NUMFLG
	DZM	TABLE	/CLEAR OUT THE 6 WORD CHAR TABLE
	DZM	TABLE+1
	DZM	TABLE+2
	DZM	TABLE+3
	DZM	TABLE+4
	DZM	TABLE+5
	LAC	(TABLE-1	/SET X10 TO ACCESS TABLE
	DAC*	(X10
	LAC	SAVAC	/PICK UP VALUE OF AC ON ENTRY
	SNA		/IF NON-ZERO DON'T READ 1ST CHAR
NAME1	JMS*	(FAC	/READ A CHAR
	SAD	(40	/SPACE?
	JMP	NAMESP	/YES -- SEE IF ITS A BREAK OR NOT
	DZM	NUMFLG	/CLEAR FLAG -- SPACES ARE NOW BREAKS
	DAC	CHAR	/SAVE THE CHAR
	LAC	COUNT	/IF THIS IS THE 1ST CHAR -- CHECK TO SEE THAT
	SAD	(-6	/ITS NOT A NUMBER
	SKP
	JMP	NAME2	/NOT THE 1ST CHAR
	LAC	CHAR	/1ST CHAR -- IS IT A DIGIT?
	AAC	-60
	SPA
	JMP	NAME2	/NO -- CONTINUE
	AAC	-12	/MAYBE -- LETS DO SOME MORE CHECKING
	SMA
	JMP	NAME2	/NO -- CONTINUE
NAMERR	LAC	CHAR	/YES -- ERROR, RETURN AT JMS+1 WITH CHAR IN AC
	JMP*	NAME
NAME2	LAC	CHAR
	SAD	(15	/IS CHAR A CARRIAGE RETURN?
	JMP	NAME4	/YES -- HANDLE TERMINATORS SPECIALLY
	SAD	(175	/NO -- ALTMODE?
	JMP	NAME4	/YES
	AND	(77
	DAC*	X10	/NO -- SAVE THE CHAR IN THE TABLE
	ISZ	COUNT	/HAVE WE LOOKED AT 6 CHARS?
	JMP	NAME1	/NO -- EXAMINE ANOTHER
	JMS*	(FAC	/YES -- READ A BREAK CHAR
NAME4	PAL		/SAVE THE BREAK CHAR
	CLL
	LAC	TABLE+3	/CONSTRUCT THE NAME IN SIXBIT
	ALS	14
	DAC	SAVAC
	LAC	TABLE+4
	ALS	6
	TAD	SAVAC
	TAD	TABLE+5
	LMQ		/SAVE 2ND HALF OF NAME IN MQ
	LAC	TABLE
	ALS	14
	DAC	SAVAC
	LAC	TABLE+1
	ALS	6
	TAD	SAVAC
	TAD	TABLE+2
	IDX	NAME	/PREPARE TO RETURN AT JMS+2
	JMP*	NAME
NAMESP	LAC	NUMFLG	/ARE SPACES BREAKS?
	SZA
	JMP	NAME1	/NO -- READ ANOTHER CHAR
	LAC	(40	/YES --THE SPACE IS A BREAK
	JMP	NAME4
	.TITLE *** LIST PARTITON NAMES AND SIZES ***
PARLST	LAC*	(PBDL)	/PICK UP PARTITION BLOCK POINTER
PBDLP	DAC*	(X11)	/SAVE POINTER IN XR11
	DAC	PBDLFD	/SAVE POINTER TO FIND END OF LOOP
	LAC	(PBDLMS+2)	/SET UP MESSAGE POINTER
	DAC*	(X10)	/IN X10
	LAW	-2	/SET UP CNT TO DECODE TWO WORDS
	DAC	CNT	/OF PARTITION NAME
	ISZ*	(X11)	/INCREMENT XR11
DECOD2	LAC*	X11	/GET A WORD AND SAVE IT IN MQ
	LMQ		/GET FIRST WORD AND SAVE IT IN MQ
	LAW	-3
	DAC	CNT1
DECOD1	ECLA!LLS 6	/PICK UP FIRST SIX BITS
	SNA		/ NULL CHARACTER?
	AAC 40		/ YES, CONVERT IT TO A BLANK.
	XOR (40)	/ CONVERT TO 7 BIT.
	AAC 40		/
	DAC*	X10	/STORE IT IN MESSAGE
	ISZ	CNT1	/FINISHED NAME?
	JMP	DECOD1	/NO GET ANOTHER CHARACTER
	ISZ	CNT	/ARE WE FINISHED?
	JMP	DECOD2	/NO DECODE SECOND WORD
	ISZ*	(X10)	/INSERT  A SPACE
	LAW	-2	/SET UP FOR TWO PASSES THRU GET3
	DAC	CNT
BASEL	LAC*	X11	/PICK UP BASE ADDRESS
	JMS	GET3	/DECODE AND STORE 5 BIT ADDRESS IN MESSAGE
	ISZ*	(X10)	/INSERT A SPACE
	ISZ	CNT	/HAS SIZE BEEN STORED?
	JMP	BASEL	/NO DECODE IT
	JMS* TDVTYP	/ PRINT MESSAGE.
	LAC TTYN	/ FETCH TTY NUMBER.
	LAC (PBDLMS)	/ FETCH MESSAGE ADDRESS.
	LAC (3)		/ IMAGE MODE.
	LAC*	PBDLFD	/GET PBDL FORWARD POINTER
	SAD	(PBDL)	/IS IT THE END OF THE LIST
	SKP		/YES EXIT
	JMP	PBDLP	/NO GO DO ANOTHER ONE
	LAC UCAADR	/ SIGNAL COMPLETION.
	JMS SETXR
	POSTEV +
	CAL ENA1
	CAL ENA2
	JMP* PARTS	/ PARTITION LISTING ALL DONE.
/
/	GET3 -- STORES ADDRESSES IN MESSAGE.
/		AC CONTAINS  THE QUANTITY TO BE PRINTED
/
GET3	0
	LMQ		/SAVE VALUE IN MQ
	LAW	-6
	DAC	CNT1	/SET UP FOR 5 BIT ADDRESS
GET3L	ECLA!LLS 3	/CLEAR AC AND GET 3 BITS
	AAC	60	/ADD 60 TO MAKE IT ASCII
	DAC*	X10	/STORE IT IN MESSAGE
	ISZ	CNT1	/HAVE WE COPIED ENOUGH YET?
	JMP	GET3L	/NO  LOOP
	JMP*	GET3	/YES RETURN
PBDLMS	015003	/HEADER
	0
	.REPT	26	/BLANKS
	40
	15		/CAR RTN
	12		/LF
/	
CNT	0
CNT1	0
PBDLFD	0
	.END
