Coder Social home page Coder Social logo

monty's Introduction

Monty

Monty is an interpreter for Monty bytecode files. It reads Monty bytecode files (.m) and executes the operations specified in them.

Table of Contents

Features

  • Executes Monty bytecode files
  • Supports various stack and queue operations
  • Implements additional advanced opcodes
  • Interprets Brainf*ck scripts
  • Easy-to-use command line interface

Getting Started

To get started with Monty, you can follow these steps:

  1. Clone the repository: git clone https://github.com/Ayamigah16/monty.git

  2. Change to the project directory: cd monty

  3. Compile the source code: *gcc -Wall -Werror -Wextra -pedantic -std=c89 .c -o monty

  4. Run Monty with a bytecode file: ./monty bytecodes/file.m

Usage

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

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

Opcode Functions

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.

Brainf*ck Scripts

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

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.

monty's People

Contributors

ayamigah16 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.