File: CCLREM.MA of Disk: V50/Source/Source-Listing-MAC-1
(Source file text) 

/CCL RECOLLECTION FOR KBM V40
/
/
/
/
/
/
/
/COPYRIGHT  (C)  1979 BY DIGITAL EQUIPMENT CORPORATION
/		 AND 1979 BY DATAPLAN GMBH
/
/
/
/
/
/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.
/
/
/

/1	CCL RECOLLECTION ROUTINES
/	VERSION=4A

	.EXTERNAL REMD,SCAN,LBEGIN,PTBL,BATCH
	.EXTERNAL ERROR,PRINT,TYPE,MOVE
	.ENTRY REMEM,FOREVER,RECALL,GTOSUB

	.NOLIST
	.INCLUDE OUT:CCLDEF.MA
	.LIST
	.RSECT CCLREM
	FIELD 1

/CCL REMEMBERS UP TO 8 COMMAND LINES (EACH UP TO 56 DECIMAL
/SIXBIT CHARACTERS LONG) IN BLOCK 65 ON THE SYSTEM DEVICE.
/THIS BLOCK WHEN READ INTO 04000-04377 HAS THE FOLLOWING FORMAT:

/4000-4037	REM-LINE 0
/4040-4177	REM-LINE 1
/4100-4137	REM-LINE 2
/4140-4177	REM-LINE 3
/4200-4237	REM-LINE 4
/4240-4277	REM-LINE 5
/4300-4337	REM-LINE 6
/4340-4377	REM-LINE 7

/EACH REM-LINE HAS THE FOLLOWING FORMAT:

/WORD 0:	IN-USE FLAG, MUST BE '1234' TO SHOW LINE WAS REMEMBERED HERE
/WORD 1:	DATE LINE WAS REMEMBERED
/WORD 2:	COMMAND DEPENDENT INFORMATION
/WORD 3:	RESERVED FOR FUTURE EXPANSION
/WORDS 4-37	COMMAND LINE NOT INCLUDING KEYWORD OR FOLLOWING SPACES
/		PACKED IN 6-BIT AND TERMINATED OR NOT BY A 6-BIT 0.

/ROUTINES:

/	TAD (DEP
/	JMS REMEM
/	N

/REMEMBERS CURRENT LINE IN REM-LINE N.  AC IS LINE DEPENDENT INFORMATION.
/IF LINE IS TOO BIG, THIS PRINTS A WARNING MESSAGE AND RETURNS AS IF OK.
/IF N=-1 THE CONTENTS OF THE ENABLED REMEMBRANCES ARE PRINTED ('UX')

/	JMS RECALL
/	N

/RECALLS REM-LINE N INTO BUFFER
/IF NOTHING THERE, PRINTS A BAD SYNTAX MESSAGE AND RETURNS TO OS/8.
/UPON RETURN, LINE-DEPENDENT INFO IS IN AC.
/IF DATES DON'T MATCH, IT'S NOT THERE UNLESS DATE = -1

/0	USED BY COMPILE, EXECUTE, PAL AND TEXT COMMANDS
/1	USED BY LOAD AND LINK COMMANDS
/2	USED BY TECO, MAKE COMMANDS AND EDIT, CREATE COMMANDS
/3	USED BY UA COMMAND
/4	USED BY UB COMMAND
/5	USED BY UC COMMAND
/6	USED BY FOCAL COMMAND
/	DEPENDENT WORD IS PTR TO FIRST ENTRY IN MAIN TABLE

/	JMS FOREVER

/CAUSES NEXT CALL TO REMEM TO INSERT -1 AS DATE
REMEM,	0
	DCA	DEP
	TAD I	(REMD
	SMA CLA
	JMP I	REMEM	/DON'T REMEMBER IF JUST RECALLED
	JMS I	(RDREM
	JMP I	(MEMBIG
	TAD I	REMEM
	ISZ	REMEM
	SPA
	JMP I	(REMALL	/GO TO PRINT REMEMBRANCE 'UX'
	BSW
	CLL RAR		/MULTIPLY BY 40
	TAD	(REMSPACE
	DCA	LPTR
	TAD	(-40-1
	DCA	LCTR
	TAD	(1234
	JMS	LPUT
FORVR,	TAD I	(MDATE	/REPLACED BY CMA IF WANT NO DATE
	JMS	LPUT	/STORE DATE
	TAD	DEP
	JMS	LPUT	/STORE DEPENDENT INFO
	JMS	LPUT	/RESERVED
	JMS I	(SCAN	/GO PAST KEYWORD AND BLANKS
	TAD I	(LBEGIN
	DCA	XR
L$:	DCA	TML
	JMS I	(GETF
	JMP	2$
	BSW
	DCA	TML
	JMS I	(GETF
	JMP	2$
	TAD	TML
	JMS	LPUT
	JMP	L$
2$:	TAD	TML
	JMS	LPUT
	JMS I	(WRREM
	JMP I	(MEMBIG
REMGO,	JMP I	REMEM
DEP,	0
LCTR,	-41
LPTR,	0		/PTS TO REM-LINE
TML,	0		/TEMP

/PUT INTO REM-LINE

LPUT,	0
	CDF 0
	DCA I	LPTR
	CDF 10
	ISZ	LPTR
	ISZ	LCTR
	JMP I	LPUT
	JMP I	(MEMBIG

RECALL,	0
	JMS I	(RDREM
	JMP I	(REMERR
	TAD I	RECALL
	ISZ	RECALL
	JMS	RECSUB
	JMP I	(REMER2
	TAD	DEP
	JMP I	RECALL
RECSUB,	0
	BSW
	CLL RAR
	TAD	(REMSPACE
	DCA	LPTR
	TAD	(-40-1
	DCA	LCTR
	JMS	LGET
	TAD	(-1234
	SZA CLA
	JMP I	RECSUB
	JMS	LGET
	SNA
	JMP I	RECSUB
LCMA,	CMA
	SNA
	JMP	1$
	IAC
	TAD I	(MDATE	/SAME DAY?
	SZA CLA
	JMP I	RECSUB
1$:	ISZ	RECSUB
	JMS	LGET
	DCA	DEP
	JMS	LGET	/IGNORE RESERVED WORD
	CLA
	TAD	(BEGLN-1
	DCA	XR
	TAD	(BEGLN-1
	DCA I	(LBEGIN
L$:	JMS	LGET
	DCA	TML
	TAD	TML
	BSW
	JMS I	(PUTF
	JMP I	RECSUB
	TAD	TML
	JMS I	(PUTF
	JMP I	RECSUB
	JMP	L$
LGET,	0
	CDF 0
	ISZ	LCTR	/IF END SKIP TAD
	TAD I	LPTR
	CDF 10
	ISZ	LPTR
	JMP I	LGET
	PAGE
PUTF,	0
	AND	(77
	SNA
	JMP	PUTZ
	ISZ	PUTF
	TAD	(240
	AND	(77
	TAD	(240
PUTZ,	CDF 0
	DCA I	XR
	CDF 10
	JMP I	PUTF

REMERR,	JMS I	(ERROR
	21.		/#I/O Error trying to recall
REMER2,	JMS I	(ERROR
	22.		/#No recollection
MEMBIG,	JMS I	(PRINT
	MEMWRN		/%Can't remember
	JMP I	(REMGO

RDREM,	0
	CIF 0
	JMS I	(SHNDLR
	200		/READ 2 PAGES INTO FIELD 0
	4000		/LOCATION 4000
	REMBLOCK
	SKP CLA
	ISZ	RDREM
	JMP I	RDREM

WRREM,	0
	CIF 0
	JMS I	(SHNDLR
	4200		/WRITE 2 PAGES FROM FIELD 0
	4000		/LOCATION 4000
	REMBLOCK
	SKP CLA
	ISZ	WRREM
	JMP I	WRREM
FOREVER,0
	TAD	(STA	/DATE =-1 MEANS FOREVER
	DCA I	(FORVR
	JMP I	FOREVER

/GET FROM INPUT LINE VIA XR

GETF,	0
	CDF 0
	TAD I	XR
	CDF 10
	SZA
	ISZ	GETF
	TAD	(-340
	SMA
	TAD	(240	/CONVERT LC
	TAD	(240
	AND	(77
	JMP I	GETF
REMALL,	CLA
	JMS I	(PRINT
	REMMSG		/GIVE HEADER
	TAD	(-7
	DCA	REMCNT
LOOP,	TAD	(7
	TAD	REMCNT
	JMS I	(RECSUB
	JMP	NONE
	TAD	(REMTBL+7
	TAD	REMCNT
	DCA	M$
	TAD I	M$
	DCA	M$
	JMS I	(PRINT
M$:	0
	TAD	(-100
	JMS I	(MOVE
	CDF 0
	BEGLN
	CDF 10
	REMLOC
	TAD I	(DEP
	SZA
	JMS I	(REVPRS
MSGEND,	TAD	(240
	JMS I	(TYPE
	JMS I	(PRINT
	REMLOC
NONE,	ISZ	REMCNT
	JMP	LOOP
	JMP I	(REMGO
REMCNT,	-7
REMTBL,	COMMSG
	LADMSG
	EDIMSG
	UAMSG
	UBMSG
	UCMSG
	FOCMSG
	PAGE
REMLOC,	ZBLOCK 100

REVPRS,	0	/DO A REVERSE PARSE FOR EXECUTE COMMAND
	CIA
	DCA	T$	/-TABLE ENTRY
	TAD	(PTBL
	DCA	P$
L$:	CDF 0
	TAD I	P$
	ISZ	P$
	TAD	T$
	SZA CLA
	JMP	L$
	TAD	P$
	CIA
	TAD	(PTBL
	DCA	P$	/-# OF COMMAND 1-XXX
	TAD	(401
	DCA	TBLPT
	STA
	DCA	HALF
N$:	ISZ	P$
	JMP	M$
MO$:	JMS	GETBL
	SNA
	JMP	MSGEND
	TAD	(100
	JMS I	(TYPE
	JMP	MO$
M$:	JMS	GETBL
	SNA CLA
	JMP	N$
	JMP	M$
P$:	0
T$:	0
TBLPT,	401
HALF,	-1
GETBL,	0
	CDF 0
	ISZ	HALF
	JMP	RT$
	TAD I	TBLPT
	BSW
	JMP	IN$
RT$:	STA
	DCA	HALF
	TAD I	TBLPT
	ISZ	TBLPT
IN$:	AND	(37
	JMP I	GETBL

	PAGE
	.ENABLE ASCII
	.DISABLE FILL
	.NOLIST BE

	.IF DF GERMAN <
REMMSG,	TEXT \Alle Erinnerungen die heute oder immer da sind:\
	215
	212
	TEXT \-----------------------------------------------\
	215
	212
	0
COMMSG,	TEXT \Kompilieren:    _\
LADMSG,	TEXT \Lade-Befehle:   _\
EDIMSG,	TEXT \Edit und Teco:  _\
UAMSG,	TEXT \UA Befehl:      _\
UBMSG,	TEXT \UB Befehl:      _\
UCMSG,	TEXT \UC Befehl:      _\
FOCMSG,	TEXT \Focal-Befehl:   _\
MEMWRN,	TEXT \%Befehl wird nicht vermerkt\;0
LABNFO,	TEXT \%Die folgende GOTO-Adresse fehlt: $\
LABEL,	ZBLOCK 11
NOBATC,	TEXT \#BATCH ist alt oder nicht aktiv\;0
NONSYS,	TEXT \#Kein GOTO mit BATCH-Geraet\;0
BATEOF,	TEXT \#Kein $END in BATCH-Datei\;0
	>
	.IF NDF GERMAN <
REMMSG,	TEXT \All remembrances which are active today or forever:\
	215
	212
	TEXT \---------------------------------------------------\
	215
	212
	0
COMMSG,	TEXT \Compile class:   _\
LADMSG,	TEXT \Loading class:   _\
EDIMSG,	TEXT \Edit and Teco:   _\
UAMSG,	TEXT \UA Command:      _\
UBMSG,	TEXT \UB Command:      _\
UCMSG,	TEXT \UC Command:      _\
FOCMSG,	TEXT \Focal Command:   _\
MEMWRN,	TEXT \%Will not remember this command\;0
LABNFO,	TEXT \%The following label is missing: $\
LABEL,	ZBLOCK 11
NOBATC,	TEXT \#Old or inactive BATCH processor\;0
NONSYS,	TEXT \#No GOTO with BATCH handler\;0
BATEOF,	TEXT \#No $END in BATCH file\;0
	>
	.ENABLE FILL
	.LIST BE
	PAGE
GTOSUB,	0
	JMS I	(SCAN
	TAD	XR
	DCA	F$
	TAD	(-10
	JMS I	(MOVE
	CDF 0
F$:	0
	CDF 10
	LABEL
	JMS I	(BATCH
	JMP	BATVER
	DCA I	(BATEXE
	STA
	TAD I	(BATEXE
	DCA	BATACC
	JMS	BATCDF
	TAD I	(BATVFY
	TAD	(-2214
	SZA CLA
	JMP	BATVER
	TAD I	(SYCNT
	DCA	HLDCNT
	TAD I	(SYBLKN
	DCA	HLDBLK
	TAD I	(BATTBL+4
	SNA
	JMP	NSYERR
	DCA I	(SYBLKN
	TAD	(-601
	DCA I	(SYCNT
	DCA I	(BATIN+7
JOLOOP,	JMS I	(BATGET
	JMS	COMPAR
	LABEL
GTOOUT,	JMP I	GTOSUB	/FOUND LABEL
	JMS	COMPAR
	EN
	JMP	GOTEND
	JMP	JOLOOP
GOTEND,	JMS	BATCDF
	DCA I	(BATIN+7
	TAD	HLDBLK
	DCA I	(SYBLKN
	TAD	HLDCNT
	DCA I	(SYCNT
	JMS I	(PRINT
	LABNFO
	JMP I	GTOSUB
BATCDF,	0
BATACC,	HLT
	JMP I	BATCDF

HLDCNT,	0
HLDBLK,	0

COMPAR,	0
	TAD I	COMPAR
	DCA	COML	/ADRESS OF LABEL OR EN
	ISZ	COMPAR
	TAD	(REMLOC
	DCA	COMB	/ADDRESS OF BATCH LINE
CL$:	TAD I	COML
	SNA
	JMP I	COMPAR	/END OF LABEL FOUND : OK
	CIA
	TAD I	COMB
	AND	(37
	SZA CLA
	JMP	CB$
	ISZ	COMB
	ISZ	COML
	JMP	CL$
CB$:	ISZ	COMPAR
	JMP I	COMPAR	/NOT FOUND
COML,	0
COMB,	0
EN,	TEXT \EN\
BATVER,	JMS I	(PRINT
	NOBATC
	JMP I	GTOSUB
NSYERR,	JMS I	(PRINT
	NONSYS
	JMP I	GTOSUB
	PAGE
BATGET,	0
	TAD	(REMLOC
	DCA	BATPTR
	TAD	(-100
	DCA	BATCNT
BATEXE,	CIF 0		/GETS CIF BAT
	CDF 10
	JMS I	(BATIN
	JMP	NOEND
	DCA	BATTMP
	TAD	BATTMP
	TAD	(-244
	SNA 
	JMP	GOTDOL
	TAD	(244-212
	SNA 
	JMP	BATEXE
	TAD	(212-215
	SNA CLA 
	JMP	GOTCR
CLRSWI,	DCA	BATSWI
BATSTO,	JMP	BATEXE
	TAD	BATTMP
	DCA I	BATPTR
	ISZ	BATPTR
	ISZ	BATCNT
BATJMP,	JMP	BATEXE
	STA
	DCA	BATCNT
	STA
	TAD	BATPTR
	DCA	BATPTR
	JMP	BATEXE

GOTCR,	STA
	DCA	BATSWI
	TAD	BATSTO
	SZA CLA
	JMP	BATEXE
	TAD	BATJMP
	DCA	BATSTO
	DCA I	BATPTR
	JMP I	BATGET

GOTDOL,	TAD	BATSWI
	SMA CLA 
	JMP	CLRSWI
	DCA	BATSWI
	DCA	BATSTO
	JMP	BATEXE
NOEND,	JMS I	(PRINT
	BATEOF
	JMP I	(GTOOUT

BATCNT,	0
BATPTR,	0
BATTMP,	0
BATSWI,	7777
	PAGE