File psl-1983/comp/comp-decls.red artifact d852803e8e part of check-in 4f9bfc4337


%
% COMP-DECLS.RED - Machine-independent declaractions used by the compiler
% 
% Author:      Eric Benson
%	       Symbolic Computation Group
%              Computer Science Dept.
%              University of Utah
% Date:        16 October 1981
% Copyright (c) 1981 University of Utah
%
%  <PSL.COMP>COMP-DECLS.RED.16,  3-Sep-82 09:46:43, Edit by BENSON
%  Added PA1REFORMFN for WNOT
%  <PSL.COMP>COMP-DECLS.RED.5,   3-Dec-82 18:20:08, Edit by PERDUE
%  Removed PA1REFORMFN for NE
%  <PSL.COMP>COMP-DECLS.RED.6,  24-Jan-83 16:04:00, Edit by MLGriss
%  Changed W to !%!%!%W in the EQCAR to avoid subst W into EQCAR form

%  Pass 1 functions

put('Apply,	'PA1FN,		'!&PaApply);
PUT('ASSOC,	'PA1FN,		'!&PAASSOC);
PUT('EQUAL,	'PA1FN,		'!&PAEQUAL);
PUT('MEMBER,	'PA1FN,		'!&PAMEMBER);
put('Catch,	'Pa1Fn,		'!&PaCatch);
PUT('COND,	'PA1FN,		'!&PACOND);
PUT('DIFFERENCE,'PA1FN,		'!&PADIFF);
PUT('FUNCTION,	'PA1FN,		'!&PAFUNCTION);
PUT('GETMEM,	'PA1FN,		'!&PAGETMEM);
PUT('GO,	'PA1FN,		'!&PAIDENT);
PUT('CASE,	'PA1FN,		'!&PACASE);
PUT('INTERN,	'PA1FN,		'!&PAINTERN);
PUT('LAMBDA,	'PA1FN,		'!&PALAMBDA);
PUT('LESSP,	'PA1FN,		'!&PALESSP);
PUT('LIST,	'PA1FN,		'!&PALIST);
PUT('LOC,	'PA1REFORMFN,	'!&REFORMLOC);
PUT('MAP,	'PA1FN,		'!&PAMAP);
PUT('MAPC,	'PA1FN,		'!&PAMAPC);
PUT('MAPCAN,	'PA1FN,		'!&PAMAPCAN);
PUT('MAPCAR,	'PA1FN,		'!&PAMAPCAR);
PUT('MAPCON,	'PA1FN,		'!&PAMAPCON);
PUT('MAPLIST,	'PA1FN,		'!&PAMAPLIST);
PUT('MINUS,	'PA1FN,		'!&PAMINUS);
PUT('NULL,	'PA1REFORMFN,	'!&REFORMNULL);
% PUT('NE,	'PA1REFORMFN,	'!&REFORMNE);		% Perdue 12/3/82
put('Nth,	'Pa1Fn,		'!&PaNth);
put('PNth,	'Pa1Fn,		'!&PaPNth);
PUT('PLUS2,	'PA1FN,		'!&PAPLUS2);
PUT('PROG,	'PA1FN,		'!&PAPROG);
PUT('PUTMEM,	'PA1FN,		'!&PAPUTMEM);
PUT('PUTLISPVAR,'PA1FN,		'!&PAPUTLISPVAR);
PUT('LISPVAR,	'PA1FN,		'!&PALISPVAR);
PUT('QUOTE,	'PA1FN,		'!&PAIDENT);
PUT('WCONST,	'PA1FN,		'!&PAWCONST);
PUT('SETQ,	'PA1FN,		'!&PASETQ);
PUT('WPLUS2,	'PA1FN,		'!&GROUP);
PUT('WDIFFERENCE,'PA1FN,	'!&GROUP);
PUT('WMINUS,	'PA1FN,		'!&GROUP);
PUT('WTIMES2,	'PA1FN,		'!&ASSOCOP);
PUT('WAND,	'PA1FN,		'!&ASSOCOP);
PUT('WOR,	'PA1FN,		'!&ASSOCOP);
PUT('WXOR,	'PA1FN,		'!&ASSOCOP);
PUT('WPLUS2,	'PA1ALGFN,		'!&GROUPV);
PUT('WDIFFERENCE,'PA1ALGFN,	'!&GROUPV);
PUT('WMINUS,	'PA1ALGFN,		'!&GROUPV);
PUT('WTIMES2,	'PA1ALGFN,		'!&ASSOCOPV);
PUT('WAND,	'PA1ALGFN,		'!&ASSOCOPV);
PUT('WOR,	'PA1ALGFN,		'!&ASSOCOPV);
PUT('WXOR,	'PA1ALGFN,		'!&ASSOCOPV);
PUT('WSHIFT,	'PA1REFORMFN,	'!&DOOP);
PUT('WNOT,	'PA1REFORMFN,	'!&DOOP);
put('WTimes2,	'PA1Reformfn,	function !&PaReformWTimes2);

% Simplification
PUT('WPLUS2,	'DOFN,		'PLUS2);
PUT('WDIFFERENCE,'DOFN,		'DIFFERENCE);
PUT('WMINUS,	'DOFN,		'MINUS);
PUT('WTIMES2,	'DOFN,		'TIMES2);
PUT('WQUOTIENT,	'DOFN,		'QUOTIENT);
PUT('WREMAINDER,'DOFN,		'REMAINDER);
PUT('WAND,	'DOFN,		'LAND);
PUT('WOR,	'DOFN,		'LOR);
PUT('WXOR,	'DOFN,		'LXOR);
PUT('WNOT,	'DOFN,		'LNOT);
PUT('WSHIFT,	'DOFN,		'LSHIFT);

PUT('WTIMES2,	'ONE,		1);
PUT('WTIMES2,	'ZERO,		0);
PUT('WPLUS2,	'ONE,		0);
PUT('WPLUS2,	'GROUPOPS,	'(WPLUS2 WDIFFERENCE WMINUS));
PUT('WMINUS,	'GROUPOPS,	'(WPLUS2 WDIFFERENCE WMINUS));
PUT('WDIFFERENCE,'GROUPOPS,	'(WPLUS2 WDIFFERENCE WMINUS));
PUT('WAND,	'ZERO,		0);
PUT('WOR,	'ONE,		0);
PUT('WXOR,	'ONE,		0);

% Compile functions

PUT('AND,	'COMPFN,	'!&COMANDOR);
PUT('APPLY,	'COMPFN,	'!&COMAPPLY);
PUT('COND,	'COMPFN,	'!&COMCOND);
PUT('CONS,	'COMPFN,	'!&COMCONS);
PUT('GO,	'COMPFN,	'!&COMGO);
PUT('CASE,	'COMPFN,	'!&COMCASE);
PUT('OR,	'COMPFN,	'!&COMANDOR);
PUT('PROG,	'COMPFN,	'!&COMPROG);
PUT('PROG2,	'COMPFN,	'!&COMPROGN);
PUT('PROGN,	'COMPFN,	'!&COMPROGN);
PUT('RETURN,	'COMPFN,	'!&COMRETURN);

% Patterns for the tests and SETQ

PUT('EQ,	'OPENTST,	'(TSTPAT !*JUMPEQ));
PUT('EQ,	'OPENFN,	'(TVPAT !*JUMPEQ));
PUT('NE,	'OPENTST,	'(TSTPAT !*JUMPNOTEQ));
PUT('NE,	'OPENFN,	'(TVPAT !*JUMPNOTEQ));
PUT('AND,	'OPENTST,	'!&TSTANDOR);
PUT('OR,	'OPENTST,	'!&TSTANDOR);
PUT('PAIRP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE PAIR));
PUT('ATOM,	'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE PAIR));
PUT('STRINGP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE STR));
PUT('NOTSTRINGP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE STR));
PUT('VECTORP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE VECT));
PUT('NOTVECTORP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE VECT));
PUT('CODEP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE CODE));
PUT('NOTCODEP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE CODE));
PUT('FLOATP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE FLTN));
PUT('NOTFLOATP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE FLTN));
PUT('INTP,	'OPENTST,	'(TSTPAT2 !*JUMPINTYPE POSINT));
PUT('NOTINTP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTINTYPE POSINT));
PUT('FIXP,	'OPENTST,	'(TSTPAT2 !*JUMPINTYPE BIGN));
PUT('NOTFIXP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTINTYPE BIGN));
PUT('NUMBERP,	'OPENTST,	'(TSTPAT2 !*JUMPINTYPE FLTN));
PUT('NOTNUMBERP,'OPENTST,	'(TSTPAT2 !*JUMPNOTINTYPE FLTN));
PUT('FIXNP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE FIXN));
PUT('NOTFIXNP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE FIXN));
PUT('BIGP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE BIGN));
PUT('NOTBIGP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE BIGN));
PUT('POSINTP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE POSINT));
PUT('NOTPOSINTP,'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE POSINT));
PUT('NEGINTP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE NEGINT));
PUT('NOTNEGINTP,'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE NEGINT));
PUT('IDP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE ID));
PUT('NOTIDP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE ID));
PUT('BYTESP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE BYTES));
PUT('NOTBYTESP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE BYTES));
PUT('WRDSP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE WRDS));
PUT('NOTWRDSP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE WRDS));
PUT('HALFWORDSP,	'OPENTST,	'(TSTPAT2 !*JUMPTYPE HALFWORDS));
PUT('NOTHALFWORDSP,	'OPENTST,	'(TSTPAT2 !*JUMPNOTTYPE HALFWORDS));
PUT('PAIRP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE PAIR));
PUT('ATOM,	'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE PAIR));
PUT('STRINGP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE STR));
PUT('NOTSTRINGP,'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE STR));
PUT('VECTORP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE VECT));
PUT('NOTVECTORP,'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE VECT));
PUT('CODEP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE CODE));
PUT('NOTCODEP,	'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE CODE));
PUT('FLOATP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE FLTN));
PUT('NOTFLOATP,	'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE FLTN));
PUT('INTP,	'OPENFN,	'(TVPAT1 !*JUMPINTYPE POSINT));
PUT('NOTINTP,	'OPENFN,	'(TVPAT1 !*JUMPNOTINTYPE POSINT));
PUT('FIXP,	'OPENFN,	'(TVPAT1 !*JUMPINTYPE BIGN));
PUT('NOTFIXP,	'OPENFN,	'(TVPAT1 !*JUMPNOTINTYPE BIGN));
PUT('NUMBERP,	'OPENFN,	'(TVPAT1 !*JUMPINTYPE FLTN));
PUT('NOTNUMBERP,'OPENFN,	'(TVPAT1 !*JUMPNOTINTYPE FLTN));
PUT('FIXNP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE FIXN));
PUT('NOTFIXNP,	'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE FIXN));
PUT('BIGP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE BIGN));
PUT('NOTBIGP,	'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE BIGN));
PUT('POSINTP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE POSINT));
PUT('NOTPOSINTP,'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE POSINT));
PUT('NEGINTP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE NEGINT));
PUT('NOTNEGINTP,'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE NEGINT));
PUT('IDP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE ID));
PUT('NOTIDP,	'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE ID));
PUT('BYTESP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE BYTES));
PUT('NOTBYTESP,	'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE BYTES));
PUT('WRDSP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE WRDS));
PUT('NOTWRDSP,	'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE WRDS));
PUT('HALFWORDSP,	'OPENFN,	'(TVPAT1 !*JUMPTYPE HALFWORDS));
PUT('NOTHALFWORDSP,	'OPENFN,	'(TVPAT1 !*JUMPNOTTYPE HALFWORDS));
PUT('SETQ,	'OPENFN,	'(SETQPAT NIL));
PUT('RPLACA,	'OPENFN,	'(RPLACPAT CAR));
PUT('RPLACD,	'OPENFN,	'(RPLACPAT CDR));
PUT('WPLUS2,	'OPENFN,	'(ASSOCPAT !*WPLUS2));
PUT('WDIFFERENCE,'OPENFN,	'(SUBPAT !*WDIFFERENCE));
PUT('WTIMES2,	'OPENFN,	'(ASSOCPAT !*WTIMES2));
PUT('WMINUS,	'OPENFN,	'(UNARYPAT !*WMINUS));
PUT('WAND,	'OPENFN,	'(ASSOCPAT !*WAND));
PUT('WOR,	'OPENFN,	'(ASSOCPAT !*WOR));
PUT('WXOR,	'OPENFN,	'(ASSOCPAT !*WXOR));
PUT('WNOT,	'OPENFN,	'(UNARYPAT !*WNOT));
PUT('WSHIFT,	'OPENFN,	'(NONASSOCPAT !*WSHIFT));
PUT('MKITEMREV,	'OPENFN,	'(NONASSOCPAT !*MKITEM));
PUT('LOC,	'OPENFN,	'(UNARYPAT !*LOC));
PUT('!*ADDMEM,	'OPENFN,	'(MODMEMPAT !*ADDMEM));
PUT('!*MPYMEM,	'OPENFN,	'(MODMEMPAT !*MPYMEM));
PUT('FIELD,	'OPENFN,	'(FIELDPAT !*FIELD));
PUT('SIGNEDFIELD,'OPENFN,	'(FIELDPAT !*SIGNEDFIELD));
PUT('PUTFIELDREV,'OPENFN,	'(PUTFIELDPAT !*PUTFIELD));
PUT('WGREATERP,'OPENTST,	'(TSTPATC !*JUMPWGREATERP !*JUMPWLESSP));
PUT('WLEQ,	'OPENTST,	'(TSTPATC !*JUMPWLEQ !*JUMPWGEQ));
PUT('WGEQ,	'OPENTST,	'(TSTPATC !*JUMPWGEQ !*JUMPWLEQ));
PUT('WLESSP,	'OPENTST,	'(TSTPATC !*JUMPWLESSP !*JUMPWGREATERP));
PUT('WGREATERP,	'OPENFN,	'(TVPAT !*JUMPWGREATERP));
PUT('WLEQ,	'OPENFN,	'(TVPAT !*JUMPWLEQ));
PUT('WGEQ,	'OPENFN,	'(TVPAT !*JUMPWGEQ));
PUT('WLESSP,	'OPENFN,	'(TVPAT !*JUMPWLESSP));

PUT('EQ,'FLIPTST,'NE);
PUT('NE,'FLIPTST,'EQ);
PUT('ATOM,'FLIPTST,'PAIRP);
PUT('PAIRP,'FLIPTST,'ATOM);
PUT('STRINGP,'FLIPTST,'NOTSTRINGP);
PUT('NOTSTRINGP,'FLIPTST,'STRINGP);
PUT('BytesP,'FLIPTST,'NOTBytesP);
PUT('NOTBytesP,'FLIPTST,'BytesP);
PUT('WrdsP,'FLIPTST,'NOTWrdsP);
PUT('NOTWrdsP,'FLIPTST,'WrdsP);
PUT('HalfwordsP,'FLIPTST,'NOTHalfwordsP);
PUT('NOTHalfwordsP,'FLIPTST,'HalfwordsP);
PUT('CODEP,'FLIPTST,'NOTCODEP);
PUT('NOTCODEP, 'FLIPTST,'CODEP);
PUT('IDP,'FLIPTST,'NOTIDP);
PUT('NOTIDP,'FLIPTST,'IDP);
PUT('INTP,'FLIPTST,'NOTINTP);
PUT('NOTINTP,'FLIPTST,'INTP);
PUT('POSINTP,'FLIPTST,'NOTPOSINTP);
PUT('NOTPOSINTP,'FLIPTST,'POSINTP);
PUT('NEGINTP,'FLIPTST,'NOTNEGINTP);
PUT('NOTNEGINTP,'FLIPTST,'NEGINTP);
PUT('FIXP,'FLIPTST,'NOTFIXP);
PUT('NOTFIXP,'FLIPTST,'FIXP);
PUT('NUMBERP,'FLIPTST,'NOTNUMBERP);
PUT('NOTNUMBERP,'FLIPTST,'NUMBERP);
PUT('FIXNP,'FLIPTST,'NOTFIXNP);
PUT('NOTFIXNP,'FLIPTST,'FIXNP);
PUT('FLOATP,'FLIPTST,'NOTFLOATP);
PUT('NOTFLOATP,'FLIPTST,'FLOATP);
PUT('BIGP,'FLIPTST,'NOTBIGP);
PUT('NOTBIGP,'FLIPTST,'BIGP);
PUT('VECTORP,'FLIPTST,'NOTVECTORP);
PUT('NOTVECTORP,'FLIPTST,'VECTORP);
PUT('WLESSP,'FLIPTST,'WGEQ);
PUT('WGEQ,'FLIPTST,'WLESSP);
PUT('WLEQ,'FLIPTST,'WGREATERP);
PUT('WGREATERP,'FLIPTST,'WLEQ);

% Match functions

PUT('ANY,'MATCHFN,'!&ANY);
PUT('VAR,'MATCHFN,'!&VAR);
PUT('REG,'MATCHFN,'!&REGFP);
PUT('DEST,'MATCHFN,'!&DEST);
PUT('USESDEST,'MATCHFN,'!&USESDEST);
PUT('REGN,'MATCHFN,'!&REGN);
PUT('NOTDEST,'MATCHFN,'!&NOTDEST);
PUT('NOTANYREG,'MATCHFN,'!&NOTANYREG);
PUT('MEM,'MATCHFN,'!&MEM);
PUT('ANYREGFN,'MATCHFN,'!&ANYREGFNP);

% Tag properties

FLAG('(!$LOCAL !$GLOBAL !$FLUID QUOTE WCONST IDLOC WVAR
       REG LABEL FRAME !*FRAMESIZE IREG),
	'TERMINAL);
FLAG('(!$LOCAL !$GLOBAL !$FLUID WVAR),'VAR);
FLAG('(QUOTE WCONST IDLOC FRAMESIZE),'CONST);
FLAG('(REG),'REG);
FLAG('(!$FLUID !$GLOBAL),'EXTVAR);
FLAG('(CAR CDR !$NAME MEMORY FRAMESIZE), 'ANYREG);

FLAG('(!*ADDMEM !*MPYMEM),'MEMMOD);

% Optimizing functions

PUT('!*LBL,	'OPTFN,	'!&LBLOPT);
PUT('!*MOVE,	'OPTFN,	'!&STOPT);
PUT('!*JUMP,	'OPTFN,	'!&JUMPOPT);		

% Things which can be compiled

FLAG('(EXPR FEXPR MACRO NEXPR),'COMPILE);

% Some compiler macros

DEFLIST('((CAAR (LAMBDA (U) (CAR (CAR U))))
          (CADR (LAMBDA (U) (CAR (CDR U))))
          (CDAR (LAMBDA (U) (CDR (CAR U))))
          (CDDR (LAMBDA (U) (CDR (CDR U))))
          (CAAAR (LAMBDA (U) (CAR (CAR (CAR U)))))
          (CAADR (LAMBDA (U) (CAR (CAR (CDR U)))))
          (CADAR (LAMBDA (U) (CAR (CDR (CAR U)))))
          (CADDR (LAMBDA (U) (CAR (CDR (CDR U)))))
          (CDAAR (LAMBDA (U) (CDR (CAR (CAR U)))))
          (CDADR (LAMBDA (U) (CDR (CAR (CDR U)))))
          (CDDAR (LAMBDA (U) (CDR (CDR (CAR U)))))
          (CDDDR (LAMBDA (U) (CDR (CDR (CDR U)))))
	  (EQCAR (LAMBDA (U V)
		 ((LAMBDA (!%!%!%W) (AND (PAIRP !%!%!%W) 
				         (EQ (CAR !%!%!%W) V))) U)))
	  (CONSTANTP (LAMBDA (U)
			     ((LAMBDA (V) (NOT (OR (PAIRP V) (IDP V))))
			      U)))
	  (WEQ (LAMBDA (U V) (EQ U V)))
	  (WNEQ (LAMBDA (U V) (NE U V)))
	  (IPLUS2 (LAMBDA (U V) (WPLUS2 U V)))
	  (IADD1 (LAMBDA (U) (WPLUS2 U 1)))
	  (IDIFFERENCE (LAMBDA (U V) (WDIFFERENCE U V)))
	  (ISUB1 (LAMBDA (U) (WDIFFERENCE U 1)))
	  (ITIMES2 (LAMBDA (U V) (WTIMES2 U V)))
	  (IQUOTIENT (LAMBDA (U V) (WQUOTIENT U V)))
	  (IREMAINDER (LAMBDA (U V) (WREMAINDER U V)))
	  (IGREATERP (LAMBDA (U V) (WGREATERP U V)))
	  (ILESSP (LAMBDA (U V) (WLESSP U V)))
	  (ILEQ (LAMBDA (U V) (WLEQ U V)))
	  (IGEQ (LAMBDA (U V) (WGEQ U V)))
	  (ILOR (LAMBDA (U V) (WOR U V)))
	  (ILSH (LAMBDA (U V) (WSHIFT U V)))
	  (ILAND (LAMBDA (U V) (WAND U V)))
	  (ILXOR (LAMBDA (U V) (WXOR U V)))
	  (IZEROP (LAMBDA (U) (EQ U 0)))
	  (IONEP (LAMBDA (U) (EQ U 1)))
	  (IMINUSP (LAMBDA (U) (WLESSP U 0)))
	  (IMINUS (LAMBDA (U) (WMINUS U)))
	  (PUTFIELD (LAMBDA (U V W X) (PUTFIELDREV X U V W)))
	  (MKITEM (LAMBDA (U V) (MKITEMREV V U)))
	  (NEQ (LAMBDA (U V) (NOT (EQUAL U V))))
	  (GEQ (LAMBDA (U V) (NOT (LESSP U V))))
	  (LEQ (LAMBDA (U V) (NOT (GREATERP U V))))
          (NOT (LAMBDA (U) (NULL U)))),'CMACRO);

% Macro functions

PUT('A1,'SUBSTFN,'!&ARG1);
PUT('A2,'SUBSTFN,'!&ARG2);
PUT('A3,'SUBSTFN,'!&ARG3);
PUT('A4,'SUBSTFN,'!&ARG4);
PUT('FN,'SUBSTFN,'!&PARAM1);
PUT('MAC,'SUBSTFN,'!&PARAM2);
PUT('P2,'SUBSTFN,'!&PARAM3);
PUT('P3,'SUBSTFN,'!&PARAM4);
PUT('T1,'SUBSTFN,'!&GETTEMP);
PUT('T2,'SUBSTFN,'!&GETTEMP);
PUT('T3,'SUBSTFN,'!&GETTEMP);
PUT('T4,'SUBSTFN,'!&GETTEMP);
PUT('L1,'SUBSTFN,'!&GETTEMPLBL);
PUT('L2,'SUBSTFN,'!&GETTEMPLBL);
PUT('L3,'SUBSTFN,'!&GETTEMPLBL);
PUT('L4,'SUBSTFN,'!&GETTEMPLBL);

% Emit functions

PUT('!*LOAD,'EMITFN,'!&EMITLOAD);
PUT('!*STORE,'EMITFN,'!&EMITSTORE);
PUT('!*JUMP,'EMITFN,'!&EMITJUMP);
PUT('!*LBL,'EMITFN,'!&EMITLBL);
PUT('!*ADDMEM,'EMITFN,'!&EMITMEMMOD);
PUT('!*MPYMEM,'EMITFN,'!&EMITMEMMOD);
PUT('!*ADDMEM, 'UNMEMMOD, '!*WPLUS2);
PUT('!*MPYMEM, 'UNMEMMOD, '!*WTIMES2);

% In memory operations

PUT('WPLUS2,'MEMMODFN,'!*ADDMEM);
PUT('WTIMES2,'MEMMODFN,'!*MPYMEM);

% Flip jump for conditional jump macros

PUT('!*JUMPEQ,'NEGJMP,'!*JUMPNOTEQ);
PUT('!*JUMPNOTEQ,'NEGJMP,'!*JUMPEQ);
PUT('!*JUMPTYPE,'NEGJMP,'!*JUMPNOTTYPE);
PUT('!*JUMPNOTTYPE,'NEGJMP,'!*JUMPTYPE);
PUT('!*JUMPINTYPE,'NEGJMP,'!*JUMPNOTINTYPE);
PUT('!*JUMPNOTINTYPE,'NEGJMP,'!*JUMPINTYPE);
PUT('!*JUMPWEQ,'NEGJMP,'!*JUMPWNEQ);
PUT('!*JUMPWNEQ,'NEGJMP,'!*JUMPWEQ);
PUT('!*JUMPWLESSP,'NEGJMP,'!*JUMPWGEQ);
PUT('!*JUMPWGEQ,'NEGJMP,'!*JUMPWLESSP);
PUT('!*JUMPWLEQ,'NEGJMP,'!*JUMPWGREATERP);
PUT('!*JUMPWGREATERP,'NEGJMP,'!*JUMPWLEQ);

% Assorted other flags

FLAG('(!*JUMP !*LINKE !*EXIT),'TRANSFER);
FLAG('(!*LINK !*LINKE),'UNKNOWNUSE);
PUT('!*LINK, 'EXITING, '!*LINKE);

% Initialize variables
!*MSG := T;				% Do print messages
!*INSTALLDESTROY := NIL;
!*USINGDESTROY := T;
!*SHOWDEST := NIL;
!*NOFRAMEFLUID := T;
!*USEREGFLUID := NIL;
!*NOLINKE := NIL;       %. Permit LINKE
!*ORD := NIL;		%. Dont force ORDER
!*R2I := T;		%. Do convert Rec to Iter
GLOBALGENSYM!&:=LIST GENSYM();	 % initialize symbol list
MAXNARGS!&:=15;
LASTACTUALREG!& := 5;

END;


REDUCE Historical
REDUCE Sourceforge Project | Historical SVN Repository | GitHub Mirror | SourceHut Mirror | NotABug Mirror | Chisel Mirror | Chisel RSS ]