/
/
/
/COPYRIGHT  (C)  1979 BY DIGITAL EQUIPMENT CORPORATION
/
/
/
/THE INFORMATION IN THIS DOCUMENT IS SUBJECT TO CHANGE WITHOUT NOTICE
/AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
/CORPORATION.  DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY
/FOR ANY ERRORS THAT MAY APPEAR IN THIS DOCUMENT.
/
/THE SOFTWARE DESCRIBED IN THIS DOCUMENT IS FURNISHED TO THE PURCHASER
/UNDER A LICENSE FOR USE ON A SINGLE COMPUTER SYSTEM AND CAN BE COPIED
/(WITH INCLUSION OF DIGITAL'S COPYRIGHT NOTICE) ONLY FOR USE IN SUCH
/SYSTEM, EXCEPT AS MAY OTHERWISE BE PROVIDED IN WRITING BY DIGITAL.
/
/DIGITAL EQUIPMENT CORPORATION ASSUMES NO RESPONSIBILITY FOR THE USE
/OR RELIABILITY OF ITS SOFTWARE ON EQUIPMENT THAT IS NOT SUPPLIED BY
/DIGITAL.
/
/
/


/VERSION=V3A (D.H.)
/1	CCL CORE (MEMORY) ROUTINES

	.ENTRY DETCOR,OTOD
	.EXTERNAL CORE,CORSIZ
	.EXTERNAL PRINT,LBEGIN,PRWD,CMDERR
	BATCCL=7777

	.RSECT CORF1
	FIELD 1
HISIZ,	0		/HIGHEST MEMORY BANK
NEWCOR,	0		/PROPOSED NEW MEMORY BANK

DETCOR,	0
	CIF 0
	JMS I (CORE
	SNA
	JMS K8
	TAD (-30
	SMA
	JMS I (K32
	TAD (40
	JMS I (OTOD
	DCA CORMES+1
	TAD I (LBEGIN
	DCA XRL
	CDF 0
	STA
	TAD I (CORSIZ
	DCA HISIZ
	ISZ XRL
	TAD I XRL	/GET NEXT CHAR
	SNA
	JMP COREQ	/NOT SETTING CORE SIZE
	TAD (-260
	DCA NEWCOR
	TAD NEWCOR
	AND (7770
	SZA CLA
	JMP DETER	/TRIED TO SET CORE SIZE GT 7
	ISZ XRL		/SHOULD ONLY BE ONE FIELD NUMBER
	TAD I XRL	/IF MORE, THEN ERROR RETURN
	SZA CLA
	JMP DETER
	TAD NEWCOR
	CIA
	TAD HISIZ
	SPA CLA
	JMP BADCOR	/TRIED TO SET SOFTWARE CORE SIZE GT REAL CORE SIZE
	TAD I (BATCCL
	RTL		/BATCH BIT TO LINK
	SZL CLA
	JMP WRSCOR	/CAN'T CHANGE CORE SIZE UNDER BATCH
	TAD NEWCOR
	CLL RTL
	RAL
	DCA NEWCOR
	TAD I (BATCCL
	AND (7707
	TAD NEWCOR
	DCA I (BATCCL
COREQ,	CDF 0
	TAD I (BATCCL
	AND (70
	SNA
	JMP ABSCOR
	TAD (10
	CLL RAR
	JMS I (OTOD
	CDF 10
	DCA SCRMES
	TAD SCRMES
	CIA
	TAD CORMES+1
	SNA CLA
	JMP ABSCOR	/DON'T PRINT SOFT IF = REAL
	JMP I (SCRM

DETER,	CDF 10
	JMP I (CMDERR
	JMP I DETCOR

XRL,	0

BADCOR,	CDF 10
	JMS I (PRINT
	NOCORE
	JMP COREQ

ABSCOR,	CDF 10
	JMS I (PRINT
	CORMES
	JMP I DETCOR

WRSCOR,	CDF 10
	JMS I (PRINT
	BATCOR
	JMP COREQ


K8,	0
	TAD (1716
	JMS I (PRWD
	TAD (1431
	JMS I (PRWD
	CIF CDF 0
	JMP I K8
SCRMES,	TEXT	\00K OF\
	*.-1
CORMES,	TEXT	/  00K MEMORY/

K32,	0
	DCA TMP
	TAD (4100
	DCA I (CORMES+6
	TAD TMP
	JMP I K32
TMP,	0
	PAGE
OTOD,	0
	DCA 2$
	DCA 1$
	TAD 2$
	TAD (-12
	ISZ 1$
	SMA
	JMP .-3
	TAD (72
	DCA 3$
	TAD 1$		/IS THE 'TENS' DIGIT > 9?
	TAD (-13
	SPA CLA		/IF IT IS 9 OR LESS
	JMP .+4		/JMP OVER ADJUSTMENT
	TAD (4061		/OTHERWISE SET 'HUNDREDS' INDICATOR BIT
	DCA I (CORMES
	TAD (-12		/ADJUST 'TENS' BIT
	TAD (-1

	TAD 1$
	SNA
	TAD (40-60
	TAD (60
	CLL RTL
	RTL
	RTL
	TAD 3$
	JMP I OTOD

1$:	0
2$:	0
3$:	0
SCRM,	CDF 10
	JMS I (PRINT
	SCRMES
	JMP I (DETER+2
NOCORE,	TEXT	/# NOT ENOUGH MEMORY/
BATCOR,	TEXT	/#CANNOT CHANGE MEMORY LIMIT WHILE RUNNING BATCH/
	PAGE

