Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/24/makete.mac
There are 2 other files named makete.mac in the archive. Click here to see a list.
Comment * SIMULA specification;
OPTIONS(/E:CODE,maketext);
TEXT PROCEDURE maketext(c,n); CHARACTER c; INTEGER n;
COMMENT Returns a reference to a new text object which contains n
copies of the character c;

! *;! MACRO-10 code *;!

	TITLE	maketext
	SUBTTL	SIMULA utility, Lars Enderin Nov 1975

;!*** Copyright 1975 by the Swedish Defence Research Institute. ***
;!*** Copying is allowed.					***

	ENTRY	maketext
	sall
	search	simmac,simmcr,simrpa
	macinit

	result==ZBI%S
	c==result+2
	n==c+1

maketext:
	PROC
	L	XWAC1,n(XCB)
	IF	;! not positive
		JUMPG	XWAC1,FALSE
	THEN	;! Return NOTEXT
		SETZB	XWAC1,XWAC2
		GOTO	L9
	FI
	EXEC	TXBL
	XWD	0,0
	L	c(XCB)
	IMUL	[BYTE (1)0(7)1,1,1,1,1]
	LSH	1
	L	X1,n(XCB)
	LF	X2,ZTVZTE(,XWAC1)
	LOOP
		ST	2(X2)
	AS
		SUBI	X1,5
		JUMPLE	X1,FALSE
		AOJA	X2,TRUE
	SA
L9():!	STD	XWAC1,result(XCB)
	BRANCH	CSEP
	EPROC
	LIT
	END;