Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-06 - 43,50430/macsub.mac
There are no other files named macsub.mac in the archive.
TITLE MACSUB MACRO SUBROUTINES FOR BRAY-CURTIS SUITE
SUBTTL C.J.ANDREWS DEPT E.E. RECREATED 21-4-75
 
ENTRY BATCH,RUN1,RUN2,RUN3,RUN4,RUN5,FIXFMT,FIXWID,MORCOR,RUN6,RUN7
 
	BPT==2
	.JBFF=121
	.JBREL==44
	.JBVER==137
 
;
;  THE VERSION NUMBER PARAMETERS.
;	VEDIT EDIT NUMBER IS UPDATED ON EACH EDIT
;	VMINOR IS INCREMENTED ON A CHANGE OR MOD NECESSITATING A
;		MANUAL CHANGE.
;	VMAJOR IS INCREMENTED ON A CHANGE REQUIRING SIGNIFICANT
;		UPDATING TO THE MANUAL.
 
	VCODE==3	;WHO LAST EDITED
 
	VMAJOR==2	;MAJOR VERSION NUMBER 0-ORIGIN
			;0 WAS FIRST ATTEMPT AT SUITE - NO OPTIONS CARD
			;1 WAS FIRST VERSION WITH OPTIONS CARD
			;2 - EXPAND OPTIONS AFTER FIRST MANUAL DRAFT
			;	AND REPLIES
	VMINOR==1	;MINOR VERSION NUMBER
			;1 - ADD TAXAN
	VEDIT==507	;EDIT NUMBER ARBITRARILY SET TO 501 ON 13-SEP-76
			;502 - CORRECT ERRORS IN 501 IN BRACUR,GETOPT
			;       AND CLUSTR
			;503 - CORRECT MORE 501 ERRORS IN RESLST AND PCA
			;	CHANGE ALSO DENDROGRAM AXIS TITLE
			;       ALSO THE SCALING ON THE Y AXIS.
			;504 - ADD TAXAN
			;505 - PLACE ON UQ STA: I.E. 5,,105
			;506 - several patches by c j mcgovern jan 1977
			;     fixes to DEVTRN, DEVNOT, DENDRO, TAXAN
			;     CRDSPC, CRDSIT and field width
			;     changes to PCA , MATWV, MATWRT
			;507 - ALLOW LISTING(A LA TAXAN) AS WELL AS
			;      PLOT OF DENDROGRAM IN CLUSTR. FIX 
			;      'FIXWID' & 'FIXFMT' SO '-0.000' IS
			;      ALSO BLANKED OUT. CJM JULY 77
	LOC	.JBVER	;SET UP VERSION NUMBER
 
	BYTE (3)VCODE(9)VMAJOR(6)VMINOR(18)VEDIT
 
	RELOC
 
;
;  BATCH - LOGICAL FUNCTION TRUE IF IN BATCH, FALSE OTHERWISE
;
 
BATCH:	Z
	SETO		0,
GETLCH		0
	ASH	0,	-43
	JRA	16,	1(16)
 
;
;  RUN1 - RUNS CONDIT.SAV ON LOG DEV AREA
;
 
RUN1:	Z
	JSA	16,	%CLS.
	OUTSTR		[ASCIZ /LEAVING CLUSTR/]
	HRRZI	1,	%RB1.
	RUN	1,
	HALT
 
%RB1.:	SIXBIT /STA/
	SIXBIT	/CONDIT/
	Z
	Z
	Z
	Z
 
;
;	MORCOR
;
;	CALLED BY FORTRAN TO GET A CHUNK OF CORE SPACE AT END OF 
;		CURRENT DATA AREA
;	CALL IS:
;		CALL MORCOR(ARRAY,IPOINT,IAMT)
;	WHERE:
;		ARRAY - FIRST LOCATION OF AN ARRAY USED AS A BASE ADDRESS
;		IPOINT- A VALUE RETURNED BY MORCOR TO GIVE AN OFFSET
;			FROM ARRAY'S ADDRESS SUCH THAT ARRAY(IPOINT)
;			IS THE FIRST FREE LOCATION PAST PROG END
;		IAMT  - IS THE AMOUNT OF CORE REQUESTED IN WORDS
;
;	MORCOR ADJUSTS .JBFF TO POINT TO FIRST FREE LOCATION AFTER 
;	ALLOCATION; AND FIRST LOOKS AT .JBREL TO SEE IF MORE CORE
;	NEED BE REQUESTED FROM MONITOR.
;	IPOINT IS SET TO -1 IF NO CORE IS AVAILABLE.
;
MORCOR:	Z
	MOVE	1,	@2(16)
	ADD	1,	.JBFF
	SOS		1
	CAMG	1,	.JBREL
	JRST		%MC2.
	IORI	1,	1777
	CORE	1,
	JRST		%MC1.
	JRST		%MC2.
%MC1.:	SETOM		@1(16)
	JRA	16,	3(16)
%MC2.:	MOVE	1,	.JBFF
	SUBI	1,	@(16)
	AOS		1
	MOVEM	1,	@1(16)
	M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RUN7 RUNS DENPLT FROM TAXAN
;
 
RUN7:	Z
	JSA	16,	%CLS.	;CLOSE ALL FILES
	HRRZI	1,	%RB4.
	OUTSTR		[ASCIZ /LEAVING TAXAN
/]
	RUN	1,
	HALT
 
;
;  %CLS. - A UTILITY ROUTINE THAT CLOSES ALL I/0 CHANNELS PRIOR TO A RUN
;		UUO. THUS THE LAST BUFFER/S ARE SURE TO BE SENT
;		TO THE DEVICE.
;
 
%CLS.:	Z
	MOVEI	1,	17
%CL1.:	DPB	1,	[POINT 4,%CLI.,12]
	XCT		%CLI.
	SOJGE	1,	%CL1.
 
	JRA	16,	(16)
 
%CLI.:	CLOSE	0,0
 
	END