Monty Interpreter

A bytecode interpreter for executing Monty scripts with support for stack and queue modes, arithmetic operations, and control opcodes.

CCINTInterpreterBCBytecodeDSData StructuresSTStackQQueue

What I Built

  • Built a Monty bytecode interpreter in C to execute scripts line by line from source files.
  • Implemented dual execution modes: stack (LIFO) and queue (FIFO) behavior.
  • Added opcode support for output, arithmetic operations, rotation, and mode/control behavior.
  • Designed parsing and execution flow to handle invalid opcodes, file failures, and memory errors cleanly.

Outcome

This project became a working interpreter for Monty bytecode programs and a strong systems-level exercise. It demonstrates low-level parsing and execution flow design, disciplined data structure manipulation, and practical understanding of stack and queue semantics.