File: CCLCOR.MA of Disk: V50/Source/Source-Listing-2
(Source file text) 

/CCL MEMORY ROUTINE FOR KBM V40
/
/
/
/
/	CCL CORE (MEMORY) ROUTINES
/	VERSION=4B

	.ENTRY DETCOR,OTOD
	.EXTERNAL CORE,CORSIZ
	.EXTERNAL PRINT,LBEGIN,PRWD,ERROR
	
	.NOLIST
	.INCLUDE OUT:CCLDEF.MA
	.LIST

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

DETCOR,	0
	DCA	CORMST	/RESET HUNDREDS
	CIF 0
	JMS I (CORE
	SNA
	JMS K8
	TAD (10
	JMS I (OTOD
	DCA CORLST
	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
	SNA
	JMP	O0$	/MEM 0
	DCA NEWCOR
	ISZ	XRL
	TAD I	XRL
	SNA
	JMP	O1$	/MEM 0-9
	TAD	(-260
	DCA	TMP
	TAD	NEWCOR
	CLL RTL
	TAD	NEWCOR
	CLL RAL
	TAD	TMP
	DCA	NEWCOR	/MEM 10-99
O1$:	TAD	NEWCOR
	CLL RAR
	CLL RAR
	TAD	(-1
O0$:	DCA	NEWCOR
	TAD NEWCOR
	AND (7770
	SZA CLA
	JMS I	(ERROR	/TRIED TO SET CORE SIZE GT 7
	24.
	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 SCRVAL
	TAD SCRVAL
	CIA
	TAD CORLST
	SNA CLA
	JMP ABSCOR	/DON'T PRINT SOFT IF = REAL
	TAD	SCRVAL
	JMS I	(PRWD
	JMS I	(PRINT
	SCRMES
ABSCOR,	TAD	CORMST
	JMS I	(PRWD
	TAD	CORLST
	JMS I	(PRWD
	JMS I (PRINT
	CORMES
	JMP I DETCOR

BADCOR,	JMS I	(PRINT
	NOCORE
	JMP	COREQ
WRSCOR,	JMS I	(PRINT
	BATCOR
	JMP	COREQ
CORMST,	0
CORLST,	0
SCRVAL,	0
XRL,	0
TMP,	0

.IF NDF GERMAN <
K8,	0
	TAD ('ON
	JMS I (PRWD
	TAD ('LY
	JMS I (PRWD
	JMP I K8
	>
.IF DF GERMAN <
K8,	0
	TAD ('NU
	JMS I (PRWD
	TAD ('R 
	JMS I (PRWD
	JMP I K8
	>

	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 (6100	/OTHERWISE SET 'HUNDREDS' INDICATOR BIT
	DCA I (CORMST
	TAD (100-12	/ADJUST 'TENS' BIT
	TAD (-1		/100 IS KLUDGE TO PREVENT SPACES
	TAD 1$
	SNA
	TAD (40-60
	TAD (60
	CLL RTL
	RTL
	RTL
	TAD 3$
	JMP I OTOD

1$:	0
2$:	0
3$:	0
	.ENABLE ASCII
.IF NDF GERMAN <
SCRMES, TEXT	\K of _\	/_=NO CRLF
CORMES,TEXT	/K Memory/
NOCORE,	TEXT	/# not enough Memory/
BATCOR,	TEXT	/#Cannot change Memory size under BATCH/
	>
.IF DF  GERMAN <
SCRMES,	TEXT	\K von _\	/_=NO CRLF
CORMES,	TEXT	/K Speicher/
NOCORE,	TEXT	/# nicht genug Speicher/
BATCOR,	TEXT	/#BATCH erlaubt keine Speicher-Aenderung/
	>
	.ENABLE SIXBIT
	PAGE