Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-05 - 43,50337/23/rest.mac
There is 1 other file named rest.mac in the archive. Click here to see a list.
	COMMENT! SIMULA specification;
	OPTIONS(/EXTERN:QUICK,REST);
	TEXT PROCEDURE rest(t); TEXT t;
	!;!Computes t.sub(t.pos,t.length+1-pos);!

	;! MACRO-10 code ;!

	TITLE	REST
	SUBTTL	Compute text reference to text after pos
	SALL
	SEARCH	SIMMAC,SIMMCR
	MACINIT
	ENTRY	REST
REST:	PROC
	EXCH	XWAC1,(XTAC)
	EXCH	XWAC2,1(XTAC)
	LF	X0,ZTVLNG(,XWAC1)
	SUBI	X0,(XWAC2)
	IF	;!Anything left
		JUMPLE	X0,FALSE
	THEN	;!Modify text descriptor
		LF	X1,ZTVSP(,XWAC1)
		ADDI	X1,(XWAC2)
		SF	X1,ZTVSP(,XWAC1)
		SF	X0,ZTVLNG(,XWAC1)
	ELSE	;!NOTEXT
		SETZB	XWAC1,XWAC2
	FI
	HLLZS	XWAC2	;! Setpos(1)
	EXCH	XWAC2,1(XTAC)
	EXCH	XWAC1,(XTAC)
	RETURN
	EPROC
	END;