https://github.com/princexz/monty
Monty 0.98 Interpreter Project
https://github.com/princexz/monty
brainfuck brainfuck-compiler brainfuck-interpreter c m matlab scri
Last synced: 3 months ago
JSON representation
Monty 0.98 Interpreter Project
- Host: GitHub
- URL: https://github.com/princexz/monty
- Owner: Princexz
- Created: 2023-03-21T08:49:29.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-23T16:25:50.000Z (over 3 years ago)
- Last Synced: 2025-09-14T03:38:36.226Z (10 months ago)
- Topics: brainfuck, brainfuck-compiler, brainfuck-interpreter, c, m, matlab, scri
- Language: C
- Homepage:
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MONTY

## Description
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.
***
## Installation
1. Clone the repository:
```console
https://github.com/princexz/monty.git
```
## Usage
1. Enter at directory
```console
cd monty
```
2. Compile:
```console
gcc -Wall -Werror -Wextra -pedantic -std=c89 *.c -o monty
```
3. Execute:
```console
./monty file.m
//The file contains the bytcode instructions for example
cat -e 000.m
push 0$
push 1$
push 2$
push 3$
pall $
push 4$
push 5 $
push 6 $
pall$
```
## Functions
The functions used are:
|Name | Description | Return| File
|:--: | :-- | :--| :--|
|_f_add | adds the top two elements of the stack | No Return | add.c|
| addnode | add node to the head stack | No Return | addnode.c|
| f_div | divides the top two elements of the stack. | No Return | div.c|
| execute | executes the opcode | No Return | execute.c|
| free_stack | frees a doubly linked list | No Return | free_stack.c|
| main | monty code interpreter | 0 on success | main.c|
### Examples
```console
$princexz> ls
basics.c general.c main.h memory.c shell.c
builders.c helper.c hsh README.md test
```
## Authors :black_nib:
[Prince Solomon](https://github.com/princexz) and [Thulile Makhubela](https://github.com/shadowp2066)
## Acknowledgements :pray:
All work contained in this project was completed as part of the curriculum for ALX Africa SE. ALX Africa is an online full-stack software engineering program that prepares students for careers in the tech industry using project-based peer learning. For more information, visit [this link](https://www.alxafrica.com//).