/
/
/
/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 SEMICOLON CODE

	.ENTRY SEMI

	.EXTERNAL PRMESG,YBATCH,ZOW,BEGLN
	MOFILE=7600
	XR=16

	.RSECT SEM1
	FIELD 1

ENGOA,	TAD (-5
	JMS I (ZEROCD
	TAD I (BLKNO
	DCA I (7620
	CLA IAC
	DCA I (7617	/'CCBTCH' IS ON SYS:
	TAD (20		/   /T OPTION
	DCA I (7644
	TAD (20		/  ALSO /H (HUSH) OPTION
	DCA I (7643
	TAD (YBATCH
	JMP I (ZOW	/CHAIN TO BATCH

ZEROCD,	0
	TAD (-42	/AC MAY BE NON-0
	DCA T$
	TAD (MOFILE-1
	DCA XR
	DCA I XR	/ZERO THE COMMAND DECODER OUTPUT AREA
	ISZ T$
	JMP .-2
	JMP I ZEROCD
T$:	0
SEMSG1,	TEXT	/? ENTER ERROR/
SEMSG2,	TEXT	\?I/O ERROR\
SEMSG3,	TEXT	/?DEVICE FULL/
SEMSG4,	TEXT	/?CLOSE ERROR/
	PAGE
	BATBUF=4400	/LOCATION OF ONE BLOCK BATCH TEMP BUFFER
	USR=200
	GLINE=1200	/LOCATION FROM KBM
	CTRLCK=1241	/LOC FROM KBM, PTS TO PLACE TO BRANCH ON ^C
BATPTR,	BATBUF-1
LCHAR,	0

SEMGO,	CIF CDF 10
	JMP I SEMI

SEMI,	0
	CLA IAC		/SYS
	JMS I (USR
	3		/ENTER
BLKNO,	TEMNAM
BLKLEN,	0		/NEG OF LENGTH
	JMP SEMER1	/ENTER ERROR
	TAD BLKNO
	DCA BATBLK
	TAD (BEGLN-1
	DCA XR
	TAD (7600
	DCA I (CTRLCK	/FORCE ^C TO GLINE TO GO TO 7600
	JMS BATLST
	BATHED
S2,	CDF 0
	TAD I XR
	CDF 10
	SNA
	JMP LINEND
	DCA LCHAR	/SAVE CHAR
	TAD LCHAR
	TAD (-";
	SNA CLA
	JMP GOTSEM
	TAD LCHAR
S3,	JMS BATPUT
	JMP S2
LINEND,	TAD LCHAR
	TAD (-";	/LOOK AT LAST CHAR
	SZA CLA		/WAS IT SEMICOLON?
	JMP BATEND	/NO, END OF TEMP BATCH STREAM
	CIF CDF 0
	JMS I (GLIN	/YES, READ NEW LINE FROM KEYBOARD
/**** WHAT IF WE'RE RUNNING UNDER BATCH ****
	TAD (BEGLN-1
	DCA XR
	JMP S2

GOTSEM,	JMS KRLF
	TAD (".
	JMP S3

KRLF,	0
	TAD (215
	JMS BATPUT
	TAD (212
	JMS BATPUT
	JMP I KRLF

BATPUT,	0
	ISZ BATPTR
	CDF BATBUF
	DCA I BATPTR
	CDF 10
	TAD BATPTR
	TAD (-BATBUF-377
	SNA CLA
	JMS BATWRIT	/WRITE OUT BUFFER IF FULL
	JMP I BATPUT
BATWRIT,0
	CIF 0
	JMS I (7607
	4200		/WRITE 1 BLOCK
	BATBUF
BATBLK,	0
	JMP SEMER2	/  I/O ERROR
	ISZ BATBLK	/POINT TO NEXT BLOCK
	ISZ BATLEN	/BUMP LENGTH
	ISZ BLKLEN
	SKP
	JMP SEMER3	/DEVICE FULL
	TAD (BATBUF-1
	DCA BATPTR
	JMP I BATWRIT

BATEND,	JMS KRLF
	JMS BATLST
	BATAIL
	JMS BATWRIT
	CLA IAC		/SYS
	JMS I (USR
	4		/CLOSE
	TEMNAM
BATLEN,	0		/LENGTH OF TEMPORARY FILE
	JMP SEMER4	/CLOSE ERROR
	JMP I (ENGOA
BATLST,	0
	TAD I BATLST
	DCA T$
	ISZ BATLST
L$:	TAD I T$
	SNA
	JMP I BATLST
	JMS BATPUT
	ISZ T$
	JMP L$

T$:	0

SEMER1,	JMS I (PRMESG
	SEMSG1
SEMER2,	JMS I (PRMESG
	SEMSG2
SEMER3,	JMS I (PRMESG
	SEMSG3
SEMER4,	JMS I (PRMESG
	SEMSG4
	PAGE
	.FSECT GLYN
	FIELD 0

GLIN,	0
	JMS I PGLINE
	CIF CDF 10
	JMP I GLIN
PGLINE,	GLINE
	.ASECT SEMSGS
	.ENABLE ASCII
	FIELD 0
	*7400
BATHED,	TEXT	"$JOB"<215><212>"."
BATAIL,	TEXT ".R FOTP"<215><212>"*SYS:CCBTCH.TM/D$"<215><212>"$END"<215><212><32>
TEMNAM,	FILENAME CCBTCH.TM
