-2,2,/;EJCMPLS/
	.IDENT	/01.03/
-8,,/;EJCMPLS/
; VERSION:	1.2
-19,22,/;EJCMPLS/
;	7-oct-82 ed cetron	center for biomedical design                    ;EJC001
;	variable size memory                                                    ;EJC001
;
;	30-AUG-82  JOYCE WEHNER
;	JGW002  FIX GLOBAL SYMBOL FOR EIS
;                                                                               ;EJC001
-35,37,/;EJCMPLS/
										;AG055
	COMAND	PRT,EXEC							;AG055
										;AG055
PRT:										;AG055
-41,,/;EJCMPLS/
	print	line4                                                           ;EJC001
-46,46,/;EJCMPLS/
										;AG055
EXEC:										;AG055
-51,52,/;EJCMPLS/
	cmpb	#'S,(r1)	; Size=32wd command                             ;EJC001
	beq	size                                                            ;EJC001
	JMP	CERR								;AG055
-68,69,/;EJCMPLS/
	MUL	#6,R5		; OFFSET INTO $MD DEVICE TABLE
-94,103,/;EJCMPLS/
22$:	CMP	U.RED(R2),R2	;; FOLLOW REDIRECTION CHAIN			;AG055
	BEQ	23$		;; THERE					;AG055
	MOV	U.RED(R2),R2							;AG055
	BR	22$								;AG055
23$:	BIT	#DV.F11,U.CW1(R2);; FILES-11 DEVICE				;AG055
	BEQ	25$		;; NO						;AG055
	BIT	#DV.DIR,U.CW1(R2)						;AG055
	BEQ	25$								;AG055
	BIT	#DV.SQD,U.CW1(R2);; SEQUENTIAL					;AG055
	BNE	25$		;; YES, NO GOOD					;AG055
-108,108,/;EJCMPLS/
	BNE	CERR1								;AG055
-116,120,/;EJCMPLS/
	RETURN									;AG055
RATE:	TSTB	(R1)		; FIND '='
	BEQ	CERR1								;AG055
-127,154,/;EJCMPLS/
	BEQ	CERR1								;AG055
	MOV	R1,R0
	CALL	$CDTB
	TST	R2		; NOTHING MUST BE PAST NUMBER			;AG055
	BNE	CERR1								;AG055
	MOV	R1,$TMG		; STORE NEW RATE
	RETURN									;AG055
										;AG055
CERR1:	JMP	CERR								;AG055
size:	TSTB	(R1)		; FIND '='                                      ;EJC001
	BEQ	CERR2								;EJC001
	CMPB	#'=,(R1)							;EJC001
	BEQ	10$                                                             ;EJC001
	INC	R1                                                              ;EJC001
	BR	size                                                            ;EJC001
10$:	INC	R1		; PAST '='                                      ;EJC001
	TSTB	(R1)		; ANYTHING PAST IT                              ;EJC001
	BEQ	CERR2								;EJC001
	MOV	R1,R0								;EJC001
	CALL	$CDTB                                                           ;EJC001
	TST	R2		; NOTHING MUST BE PAST NUMBER			;EJC001
	BNE	CERR2								;EJC001
	tst	r1
	beq	11$		; if r1 = 0, leave, mdpage will reset to max
	cmp  	r1,#1024.	; is input less than 1024
	bge	11$		;   yes, ok					;ejc001
	mov	#1024.,r1	;   no, so limit it to #1024.			;ejc001
11$:	MOV	R1,$dssiz	; STORE NEW size				;EJC001
	clc									;ejc001
	RETURN									;EJC001
										;EJC001
CERR2:	JMP	CERR								;EJC001
										;EJC001
	.PAGE									;AG055
	.SBTTL	TEXT STRINGS							;AG055
										;AG055
										;AG055
	.EVEN									;AG055
LINE1:	MESS	<The following commands are available for this page:>		;AG055
										;AG055
	.EVEN									;AG055
LINE2:	MESS	<FREEn=ddn: to change free entry 'n' (0-3) to ddn:>		;AG055
										;AG055
	.EVEN									;AG055
LINE3:	MESS	<RATE=s     to change replot rate to 's' seconds>		;AG055
										;AG055
	.even                                                                   ;EJC001
line4:	MESS	<SIZE=x     set memory size to 'x' 32-word blocks (0=max.)>	;EJC001
                                                                                ;EJC001
	.EVEN									;AG055
LINEN:	MESS	<<CR> to return>						;AG055
										;AG055
/
