Skip to content
/ monty Public

This is a custom interpreter for Monty ByteCodes files.

Notifications You must be signed in to change notification settings

jomojay/monty

Repository files navigation

0x19. C - Stacks, Queues - LIFO, FIFO

monty

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.

opcode operations

push

pushes element into stack

pop

deletes the topmost element from the stack

pint

prints the topmost element grom the stack

pall

print all the elements in the stack starting from top

rotr

rotates stack to the bottom

rotl

rotates stack to the left

pstr

prints ascii value of the stacks elements starting from top

pchar

prints ascii value of the element at the to of the stack

mul

multiplies the top fist two topmost elements in the stack

sub

subtracts the top element of the stack from the second top element of the stack

mod

computes the rest of the division of the second top element of the stack by the top element of the stack.

div

divides the second top element of the stack by the top element of the stack.

Usage: div

add

adds the top two elements of the stack.

Usage: add

nop

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).

Brainf*ck

This project also exhibit the usage and operations of Brainf*ck programming.

About

This is a custom interpreter for Monty ByteCodes files.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published