Monty is an interpreter for Monty bytecode files. It reads Monty bytecode files (.m) and executes the operations specified in them.
- Features
- Getting Started
- Usage
- Bytecode Files
- Opcode Functions
- Brainf*ck Scripts
- Contributing
- License
- Executes Monty bytecode files
- Supports various stack and queue operations
- Implements additional advanced opcodes
- Interprets Brainf*ck scripts
- Easy-to-use command line interface
To get started with Monty, you can follow these steps:
-
Clone the repository: git clone https://github.com/Ayamigah16/monty.git
-
Change to the project directory: cd monty
-
Compile the source code: *gcc -Wall -Werror -Wextra -pedantic -std=c89 .c -o monty
-
Run Monty with a bytecode file: ./monty bytecodes/file.m
Monty accepts bytecode files (.m) as input. You can pass a bytecode file to the interpreter to execute the specified operations. ./monty bytecodes/file.m
Bytecode files contain a series of instructions that Monty interprets and executes. Each instruction is written on a separate line.
Example bytecode file (file.m): push 1 push 2 add pall This bytecode file pushes two values onto the stack, adds them, and prints the result
Monty supports various opcode functions that perform operations on the stack and queue. These functions are implemented in separate files in the opcode_functions/ directory.
To add a new opcode function, create a new file in the opcode_functions/ directory and implement the corresponding functionality.
Monty also includes support for interpreting Brainfck scripts. Brainfck is an esoteric programming language.
Brainfck scripts should be stored in the bf/ directory. You can run a Brainfck script using the bf command: bf bf/script.bf
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.