Google
 

Trailing-Edge - PDP-10 Archives - decus_20tap1_198111 - decus/20-0002/macros.sai
There is 1 other file named macros.sai in the archive. Click here to see a list.
COMMENT    VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	USEFUL MACROS FOR SAIL PROGRAMS
C00005 ENDMK
C;

COMMENT USEFUL MACROS FOR SAIL PROGRAMS;
REQUIRE "[][]" DELIMITERS;
DEFINE SYMNO=0;
DEFINE INITIALIZE(X)=
	[ REDEFINE SYMNO=SYMNO+1;
	REDEFINE INIT00="INIT"&CVS(SYMNO);
	SIMPLE PROCEDURE INIT00; X;
	REQUIRE INIT00 INITIALIZATION ];
DEFINE GENSYM =
	[ REDEFINE SYMNO=SYMNO+1;
	""&CVS(SYMNO) ];
DEFINE SIMPROC=[SIMPLE PROCEDURE],
	RECPROC=[RECURSIVE PROCEDURE ];

DEFINE ONBLOCKEXITDO(BODY,ATTR)=
        [ REDEFINE SYMNO=SYMNO+1;
	REDEFINE CLN00="CLN"&CVS(SYMNO);
	ATTR PROCEDURE CLN00;
		BODY;
	CLEANUP CLN00 ];

DEFINE DEFQ(LNGID,SHTID) = [
	REDEFINE LNGID "<>" = <SHTID>;
	SHTID ];


COMMENT DEFQ is intended to be used in declarations where you
	want a longer identifier than that allowed by the loader
	e.g.

	EXTERNAL PROCEDURE DEFQ(ALONGNAME1,ALN1)

	;

DEFINE NOCOMPILE = [IFCR FALSE THENC];

DEFINE BUG(S)=[USERERR(1,1,S)];

DEFINE BITDEF(BITID,V,XX)"[]" = [
	DEFINE BITID "<>" = <V>;
	ASSIGNC XX "[]" = CVPS(BITID)&[ON];
	DEFINE XX (I) "[]" = [((I) LAND (]&CVPS(V)&[))]
];

DEFINE ITERATE "[]" = [WHILE TRUE DO];

DEFINE CALLBAIL "[]" = [
	IFCR BAILING THENC
	BEGIN EXTERNAL PROCEDURE BAIL;BAIL;END
	ENDC];


DEFINE WHILEGENERATE "[]" = [ FOREACH SUCH THAT ];

IFCR DECLARATION(BAILING) THENC DEFINE BAILING "<>" = <FALSE>; ENDC