/* Stack Operations */ #define PUSH 0 #define POP 1 /* Arithmetic instructions */ #define ADD 2 #define SUB 3 #define MUL 4 /* Memory instructions */ #define LD 5 #define ST 6 /*Control instructions */ #define JMP 7 #define JEQ 8 #define CMP 9 /* Empty operand */ #define EMPTY 98 /* End instruction */ #define END 99 /* Machine configuration */ #define MEM_SIZE 4 #define STACK_SIZE 30 /* Instruction type */ struct inst { int opcode; int val; };