Code Monkey home page Code Monkey logo

monty's Introduction

Monty

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.

This project was built by Hugo Bayona and Alejo López

Table of Contents

  1. Authors
  2. Features
  3. How Use
  4. Brainfuck

Authors

👤 Kafui Kumah

Features

The following opcodes are suported.

  • (push) Push an integer to the stack.
  • (pall) Prints the entire stack.
  • (pint) Print the first element of the stack.
  • (pop) Removes the top element of the stack.
  • (swap) Swaps the top two elements of the stack.
  • (add, sub, mul, div, mod) Aritmetic op +, -, *, /, %.
  • (nop)
  • (pchar) Prints the char at the top of the stack, followed by a new line.
  • (pstr) Prints the string starting at the top of the stack, followed by a new line.
  • (rotl) Rotates the stack to the top.
  • (rotr) Rotates the stack to the bottom.
  • (stack) Sets the format of the data to a stack (LIFO). DEFAULT.
  • (queue) Sets the format of the data to a queue (FIFO).

How Use

How to compile

$ gcc -Wall -Werror -Wextra -pedantic *.c -o monty

Requirements

  • compile on Ubuntu 14.04 LTS
  • compile with gcc 4.8.4

Examples

$ cat -e bytecodes/00.m
push 1$
push 2$
push 3$
pall$
$ ./monty bytecodes/00.m
3
2
1
$

Brainfuck

Brainfuck is an esoteric programming language created in 1993 by Urban Müller, and is notable for its extreme minimalism.

This repository includes 4 files with Brainfuck implementations.

  • A Brainf*ck script that prints School, followed by a new line.
  • Add two digits given by the user.
  • Multiply two digits given by the user.
  • Multiply two digits given by the user + print a new line at the end.

How to compile

$ bf ./1001-add.bf

Requirements

  • compile on Ubuntu 14.04 LTS
  • compile with bf
$ apt-get install bf

monty's People

Contributors

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