perm filename STARTP.MAC[SIM,SYS] blob sn#460298 filedate 1979-07-20 generic text, type T, neo UTF8
COMMENT * SIMULA specification;
OPTIONS(/E:QUICK,startpos);
INTEGER PROCEDURE startpos(t); TEXT t;
COMMENT Gives the offset of t in its main text - i e
s=startpos(t) implies t==t.Main.Sub(s,t.Length);

!*;! MACRO-10 code !;!

	TITLE	startpos
	ENTRY	startpos
	SUBTTL	SIMULA utility, Lars Enderin Nov 1975

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

	sall
	XTAC==2	;! Shows which ac is on top of stack
	OPDEF	RETURN	[POPJ 17,]

startpos:
	HLRZS	(XTAC)
	AOS	(XTAC)
	RETURN
	END;