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. Monty Intepreter is a languange used to inteprete Byte code Files.
- Project Title
- Table of Contents
- Getting Started
- Opcodes
- ByteCodes
- Running the Tests
- Built With
- Authors
These instructions will help you set up the project locally, for development and testing purposes.
i. Clone this repo
git clone https://github.com/timmySpark/Playground.git
ii. Compile the codes
gcc -Wall -Werror -Wextra -pedantic -std=c89 *.c -o monty
iii. Run the script
./monty text
Below are some of the opcodes that work with this Monty Intepreter:-
This opcode pushes an element to the stack
push <integer>
The opcode pall prints all the values on the stack, starting from the top of the stack.
pall
The opcode pint prints the value at the top of the stack, followed by a new line.
pint
The opcode pop removes the top element of the stack.
pop
The opcode swap swaps the top two elements of the stack.
swap
The opcode add adds the top two elements of the stack.
Add
The opcode nop doesn’t do anything.
nop
The opcode sub subtracts the top element of the stack from the second top element of the stack.
sub
The opcode div divides the second top element of the stack by the top element of the stack.
div
The opcode mul multiplies the second top element of the stack with the top element of the stack.
mul
The opcode mod computes the rest of the division of the second top element of the stack by the top element of the stack.
mod
Text file contains certain bytecodes the monty bytecode reads and intepretes, you can edit it to your taste
push 1
push 2
push 3
pall
pop
pall
pop
pall
pop
pall
Explain how to run the automated tests for this system.
coming soon ...
- C Programming Language.
- Timmy - Developer - timmySpark
- Wondahs - Developer - Wondahs