The goal of this project is to create a custom interpreter for Monty ByteCodes files. This is achieved by implementing Stack and Queues(using doubly linked list) as datastructures that the interpreter can switch in between as the need arises during different operations.
pushes element into stack
deletes the topmost element from the stack
prints the topmost element grom the stack
print all the elements in the stack starting from top
rotates stack to the bottom
rotates stack to the left
prints ascii value of the stacks elements starting from top
prints ascii value of the element at the to of the stack
multiplies the top fist two topmost elements in the stack
subtracts the top element of the stack from the second top element of the stack
computes the rest of the division of the second top element of the stack by the top element of the stack.
divides the second top element of the stack by the top element of the stack.
Usage: div
adds the top two elements of the stack.
Usage: add
doesn’t do anything.
Usage: nop
When the first non-space character of a line is #, treat this line as a comment (don’t do anything).
This project also exhibit the usage and operations of Brainf*ck programming.