DEFINITION MODULE Interpreter;			(* gf	06.01.89 *)

(*EXPORT QUALIFIED	INSTR,
			Command, maxlev,
			Interpret;
*)

CONST	maxlev = 15;

TYPE	Command = ( MSP,  LDA,	LDI,  LDIs,
		    JMP,  JMPC, CALL, RET,
		    LD,   ST,	MV,   NEGi, ODDi,
		    ADDi, SUBi, MULi, DIVi,
		    EQ,   NE,	LT,   GE,   GT,   LE,
		    ANDb, ORb,	NOTb,
		    INi,  OUTi, OUTc);

	level	 = [0..maxlev];

	instrKind = (instr, val);

	INSTR = RECORD
		   CASE  :instrKind OF
		     instr:
			  cmd : Command;
			  lev : level;
			  val : CARDINAL (* address | offset | lit. value *)
		   | val:
			  sval: ARRAY[0..5] OF CHAR;  (* string literal *)
		   END
		END;



PROCEDURE Interpret(VAR code : ARRAY OF INSTR);


END Interpreter.

