Monty 0.98 is a scripting language that is first compiled into Monty byte codes (Just like Python). It relies on a unique stack, with specific instructions to manipulate it. The goal of this project is to create an interpreter for Monty ByteCodes files.
The compilation file is monty
, you can run this with the following command:
./monty <file.m>
Example:
$ cat bytecodes/00.m
push 1
push 2
push 3
pall
$ ./monty bytecodes/00.m
3
2
1
Opcode | Functionality |
---|---|
push | Add element to the 'top' of stack and 'end' of queue |
pall | Print every member of the structure |
pint | Prints the member value at the top of stack |
pop | Remove element from 'top' of stack and 'end' of queue |
swap | Swaps the order of the 1st and 2nd elements in stack |
add | Add top two member values |
nop | Opcode should do nothing |
Betty Style was implemented for all files.
Felipe Villamizar |
Andres Rodriguez |
---|