Google
 

Trailing-Edge - PDP-10 Archives - decuslib20-03 - decus/20-0078/libsim/from.mac
There are 2 other files named from.mac in the archive. Click here to see a list.
00100	COMMENT& SIMULA specification;
00200	OPTIONS(/EXTERN:QUICK,from);
00300	
00400	TEXT PROCEDURE from(t,i); TEXT t; INTEGER i;
00500	
00600	!	IF i<=t.Length THEN
00700	!	from :- IF i<=0 THEN t ELSE t.Sub(i,t.Length-1+1);
00800	
00900		!&;! MACRO-10 code !;!
01000	
01100		TITLE	from
01200		SUBTTL	Compute text reference to text after pos=i
01300		SALL
01400		SEARCH	SIMMAC,SIMMCR
01500		MACINIT
01600		ENTRY	from
01700	from:	PROC
01800		HLLZ	1(XTAC)		;!Length,,0
01900		L	X1,2(XTAC)	;! i
02000		IF	;! i>0
02100			SOJLE	X1,FALSE
02200		THEN
02300			MOVSI	X1,(X1)
02400			ADDM	X1,(XTAC)	;!New offset,,address
02500			SUB	X1		;!New Length,,0
02600			SKIPG
02700			 SETZB	(XTAC)		;! NOTEXT
02800		FI
02900	L9():!	ST	1(XTAC)
03000		RETURN
03100		EPROC
03200		END;