Google
 

Trailing-Edge - PDP-10 Archives - tops20_version7_0_tools_tape_clock_tape - tools/blis10/h3ccl.bli
There are 18 other files named h3ccl.bli in the archive. Click here to see a list.
!THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
!  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
!
!COPYRIGHT (C) 1972,1973,1974,1977,1978 DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS. 01754
!FILENAME:	H3CCL.BLI
!DATE:		24 MAY 73	MGM/FLD

%3.2%	GLOBAL BIND H3CCV=1;	!MODULE VERSION NUMBER




!		DECLARATIONS GLOBAL TO H3CCL


BEGIN
	EXTERNAL	CCLCTL,CCLBP,CCLBUF;

	MACRO	CCLIN=CCLCTL$,
		CCLREAD=CCLCTL<1,1>$;	%CCL IMAGE IN CORE%

	BIND	
		BLI6=SIXBIT '   BLI',
		TMP6=SIXBIT '   TMP',
		DSK6=SIXBIT '   DSK',

		CCLCHNL=0,		% SOFTWARE CHNL FOR CCL %
		MODE=#17,		% DUMP MODE INPUT %

		CCLR=1,			% TMPCOR READ CODE %
		CCLRD=2;		% TMPCOR READ & DELETE CODE %

	MACHOP	OPEN=#050,
		CALLI=#047,
		INPUT=#066,
		LOOKUP=#076,
		RELEAS=#071,
		RENAME=#055;

	MACRO	PJOB(X)=CALLI(X,#30)$,	% GETS JOB NUMBER %
		RESET=CALLI(0)$,	% RESETS I/O CHNLS %
		TMPCOR(X)=CALLI(X,#44)$,	% OPERATES ON TMPCOR FILES %
		SKIP(OP)=
			BEGIN
			REGISTER XX;
			XX_1;
			OP;
			XX_0;
			.XX
			END$;

	FORWARD CCLTMPCOR, CCLFILE;
GLOBAL ROUTINE CCLINIT=
BEGIN
	IF .CCLIN AND .CCLREAD THEN RETURN;
	IF .CCLIN THEN
	    BEGIN
		IF NOT CCLTMPCOR() THEN
		    IF NOT CCLFILE() THEN
			BEGIN
			CCLIN_0;
			RETURN
			END
	    END
END;
!		DISK CCL FILE ROUTINE


ROUTINE CCLFILE=
BEGIN
	REGISTER R;
	LOCAL	S,
		OPENBLOCK[4],
		DMPCTL[2],
		LOOKUPBLOCK[4];

	MACRO	DEVICE=OPENBLOCK[1]$,
		STATUS=OPENBLOCK[0]$,
		OIBUFF=OPENBLOCK[2]$,
	
		FILENAME=LOOKUPBLOCK[0]$,
		EXTNAME=LOOKUPBLOCK[1]$,
		PPN=LOOKUPBLOCK[3]$,
		WORDCOUNT=LOOKUPBLOCK[3]<18,18>$,

		DMPLEN=DMPCTL[0]<18,18>$,
		DMPADDR=DMPCTL[0]<0,18>$,
		DMPNEXT=DMPCTL[1]$;



!	WE TRY TO READ A FILE CALLED ###BLI.TMP
!	WHERE ### IS THE DECIMAL JOB NUMBER

	S_FILENAME<36,6>;
	PJOB(R);		% GET JOB NUMBER %
	REPLACEI (S, .R/100+#20);
	R_.R MOD 100;
	REPLACEI(S, .R/10+#20);
	R_.R MOD 10;
	REPLACEI(S, .R+#20);

	FILENAME<0,18>_BLI6;
	EXTNAME_TMP6^18;
	PPN_0;

	DEVICE_DSK6^18;
	STATUS_MODE;
	OIBUFF_0;



!	TRY TO GET DEVICE DSK

	IF NOT SKIP(OPEN(CCLCHNL,STATUS)) THEN RETURN 0;


!	TRY TO FIND THE FILE

	IF NOT SKIP(LOOKUP(CCLCHNL,FILENAME)) THEN
		(RELEAS(CCLCHNL); RETURN 0);


!	WE GOT IT LOOKED UP.  THE WORD COUNT OF THE
!	FILE IS A NEGATIVE NUMBER IN "WORDCOUNT"

	R_(.WORDCOUNT OR -1^18);
	R_CCLBUF;
	DMPADDR_.R-1;
	DMPLEN_.WORDCOUNT;
	DMPNEXT_0;
%%
%
	WE HAVE JUST FIXED UP A CHANNEL COMMAND LIST
	OF THE FORM
		XWD ADDR-1,-COUNT
		XWD 0,0
%
%%
	INPUT(CCLCHNL,DMPCTL);



!	DELETE THE FILE

	FILENAME_0;
	IFSKIP RENAME(CCLCHNL,FILENAME) THEN;
	RELEAS(CCLCHNL);


!	SET UP CONTROL WORDS IN BIO MODULE

	CCLBP_CCLBUF<36,7>;
	CCLREAD_1;
	RETURN 1;
END;
!	TMPCOR CCL FILE ROUTINE


ROUTINE CCLTMPCOR=
BEGIN
	LOCAL CCLPARM[2], SCRATCH;
	REGISTER AC;
	MACRO	CCLNAME=CCLPARM[0]$,
		CCLBUFLEN=CCLPARM[1]<18,18>$,
		CCLBUFFER=CCLPARM[1]<0,18>$,
		CCLCODE=AC<18,18>$,
		CCLADDR=AC<0,18>$,
		CCLWORD=AC$;
%%
%
	MAKE UP THE CONTROL LIST

	CCLWORD			CCLPARM
	CODE,, .--------------> SIXBIT /BLI/
				-LENGTH,,BUFFER-1
%
%%
	CCLCODE_CCLR;	% READ NO DELETE %
	CCLADDR_CCLNAME;
	CCLNAME_BLI6^18;
	CCLBUFLEN_-1;	% DUMMY BUFFER LENGTH %
	CCLBUFFER_(SCRATCH-1)<0,0>;	% DUMMY BUFFER %
%%
%
	WE TRY TO READ THE FILE INTO A SHORT BUFFER
	IF THIS UUO FAILS, WE DON'T HAVE A CCL TMPCOR BUFFER
	IF IT SUCCEEDS, IT RETURNS IN CCLWORD THE ACTUAL
	     LENGTH OF THE FILE
%
%%
	IF NOT SKIP (TMPCOR(CCLWORD)) THEN RETURN 0;
	CCLBUFLEN_-.CCLWORD;
	CCLBUFFER_CCLBUF-1;



!	NOW WE RESET THE BUFFER SIZE AND CHANGE THE CODE TO
!	READ & DELETE, AND ISSUE THE UUO AGAIN.  IT MUST
!	SUCCEED.


	CCLCODE_CCLRD;
	CCLADDR_CCLNAME;
	SKIP(TMPCOR(CCLWORD));
	

!	SET UP THE CONTROL INFORMATION IN BIO

	CCLBP_CCLBUF<36,7>;
	CCLREAD_1;

	RETURN 1;
END;



!END OF H3CCL.BLI