perm filename BAYSAI.SAI[CMU,AIL]1 blob sn#079847 filedate 1974-02-04 generic text, type T, neo UTF8
00100	COMMENT		BAYSAI.SAI[A710SA00]  -- A SET OF BAYSIC SAIL DECLARATIONS
00200		R.FENNELL ADDED SOURCE!CR AND LOAD!CR.  13-DEC-73.
00300		G.GILL ADDED REDEFINE=DEFINE 2-NOV-73. (Temporary til new SAIL)
00400		L.ERMAN  ADDED "!!","!!!","!!!!","!SOURCE!" AND "!SOURCE!L" FOR EVSDRP. 22-OCT-73.
00500		B.LOWERRE  ADDED DEFINE FOR FORMFEED.  5-24-73.
00600		B.LOWERRE DOWNTO ADDED -- 30-3-73.
00700		L.ERMAN, R. NEELY -- 10-20-71
00800	;
00900	
01000	IFC NOT DECLARATION(BAYSAISW!) THENC
01100	DEFINE	BAYSAISW!=TRUE;
01200	
01300	REQUIRE NULL!DELIMITERS;
01400	
01500	DEFINE	!="COMMENT",	THRU="STEP 1 UNTIL",	DOWNTO="STEP -1 UNTIL",
01600		CR='15,	LF='12,	CRLF="(CR&LF)",
01700		TAB='11,	FORMFEED='14;
01800	
01900	INTEGER DUM,ZILCH;	STRING SDUM,SZILCH;
02000	! CONVENTION: the DUMs are super temps--anyone can use any time.
02100		    The ZILCHS are data sinks--they are never(never)read;
02200	
02300	EXTERNAL INTEGER !SKIP!;
02400	DEFINE	TURNONN!(A,AS,B,BS)="REDEFINE A="""",AS="""",
02500			B=""BIGCOMMENT!"",BS=""STOPCOMMENT!"" ",
02600		TURNOFF!(A,AS,B,BS)="TURNONN!(B,BS,A,AS)";
02700	DEFINE	TURN!ON(B,E) = "REDEFINE B="""", E="""" ",
02800		TURN!OFF(B,E)= "REDEFINE B=""BIGCOMMENT!"", E=""STOPCOMMENT!"" ",
02900		DEFAULT!ON(B,E) "<>"=<IFC NOT DECLARATION(B) THENC DEFINE B"⊂⊃"=⊂⊃, E=⊂⊃ ENDC>,
03000		DEFAULT!OFF(B,E)=<IFC NOT DECLARATION(B) THENC DEFINE B"⊂⊃"=⊂BIGCOMMENT!⊃, E=⊂STOPCOMMENT!⊃ ENDC>;
03100	DEFINE	CALLEXIT="START!CODE '47000000012 END";  ! CLOSES CHANS AND CALLS EXIT;
03200	
03300	INTEGER SIMPLE PROCEDURE ADDRESS(REFERENCE INTEGER WHAT);
03400	START!CODE "ADDRESS"	MOVEI	1,WHAT; END "ADDRESS";
03500	INTEGER SIMPLE PROCEDURE CONTENTS(INTEGER WHERE);
03600	START!CODE "CONTENTS"	MOVE	1,@ WHERE; END "CONTENTS";
03700	
03800	DEFINE BEGINCON(NAM)=" REQUIRE ""
03900	CONTINUE MACRO NO LONGER USABLE --
04000	CONTINUE IS DEFINED DIRECTLY IN SAIL
04100	TAKE OUT REFERENCES TO BEGINCON AND ENDCON
04200	TAKE PARENTHESES OFF OF CONTINUE STATEMENT MAKE SURE NAME IS QUOTED""
04300	MESSAGE; BEGIN ""NAM""",
04400	ENDCON(FOO)="END ""FOO""";
04500	
04600	! DEFINE	ENTRY="BIGCOMMENT!",  STOPENTRY="STOPCOMMENT!";	
04700	
04800	DEFINE	SOURCE!(FIL)="REQUIRE ""FIL"" SOURCE!FILE",
04900		LOAD!(FIL)="REQUIRE ""FIL"" LOAD!MODULE",
05000		SOURCE!L(FIL)="REQUIRE ""FIL[A710SA00]"" SOURCE!FILE",
05100		LOAD!L(FIL)="REQUIRE ""FIL[A710SA00]"" LOAD!MODULE",
05200		SOURCE!CR(FIL)="REQUIRE ""FIL[A700CR00]"" SOURCE!FILE",
05300		LOAD!CR(FIL)="REQUIRE ""FIL[A700CR00]"" LOAD!MODULE";
05400	DEFINE	MESSC(MSG) "<>" =<REQUIRE "
05500	MSG
05600	" MESSAGE>;
05700	
05800	DEFINE !! "[]"=[COMMENT],	!!!=[COMMENT],	!!!!=[COMMENT],
05900		!SOURCE!=[SOURCE!],	!SOURCE!L=[SOURCE!L];
06000	
06100	IFC DECLARATION(SIN) THENC	! for new SAIL;
06200		DEFINE BIGCOMMENT!="IFC FALSE THENC",	STOPCOMMENT!="ENDC";
06250		EXTERNAL SIMPLE PROCEDURE CLRBUF;	! THIS IS A TEMP UNTIL
06275							 THE COMPILER IS FIXED.;
06300	ELSEC
06310	  DEFINE
06320		SOURCE!L(FIL)="REQUIRE ""FIL[A610SP00]"" SOURCE!FILE",
06330		LOAD!L(FIL)="REQUIRE ""FIL[A610SP00]"" LOAD!MODULE";
06340	MESSC(THIS IS THE OLD SAIL -- YOU REALLY SHOULDN'T USE IT.
06370	 USING A610SP00 FOR THE SOURCE LIBRARY);
06400		DEFINE	REDEFINE "[]"=[DEFINE];	! This is temporary until new SAIL comes up;
06500	ENDC
06600	
06700	DEFINE	ISALTMODE(A)="(A='33 OR A='175 OR A='176)";
06800	
06900	! ADD1 (SUB1) increments (decrements) its argument and returns the result;
07000	INTEGER SIMPLE PROCEDURE ADD1(REFERENCE INTEGER NUM);
07100	START!CODE "ADD1" AOS 1,NUM; END "ADD1";
07200	INTEGER SIMPLE PROCEDURE SUB1(REFERENCE INTEGER NUM);
07300	START!CODE "SUB1" SOS 1,NUM; END "SUB1";
07400	! ADDR returns ADDRess of its argument;
07500	INTEGER SIMPLE PROCEDURE ADDR(REFERENCE INTEGER REF);
07600	START!CODE "ADDR" MOVEI 1,REF; END "ADDR";
07700	
07800	REQUIRE UNSTACK!DELIMITERS;
07900	
08000	ENDC
08100	
08200	! END OF BAYSAI.SAI[A710SA00];