Code Monkey home page Code Monkey logo

bf.asm's Introduction

bf.asm

A simple brainfuck interpreter, written entirely in x86 assembly. Works on Linux x86 and x86_64, and (in theory) DOS-16.

CircleCI Status License

Why

idk lmao

Installation

Prerequisites

  • Python 3
  • nasm
  • CMake >= 3.12
  • A functioning C++ compiler (use g++-multilib on Debian-based systems if you want to run the tests)
  • dosemu (for running tests)

Building

Build and run tests

./test.sh

This will build for all architectures, and will run some tests on the resulting binaries.

Manually

mkdir build
cd build
cmake -DBITS=64 ..
make
./c-test [some brainfuck file]

Future Work

This is very much a work in progress, especially since my laptop is currently bricked. Here's some notable improvements to make:

  • Cleaning up the code
  • Giving the binaries more sensible names
  • More elegant error handling on DOS
  • An overview of the architecture of the project
  • Tests for the C library
  • More bin tests
  • Usage of a stack-like system instead of manual searching for loops
  • Trying to decrease the size of the DOS binary to <= 296 bytes (the size of the original)
  • Allowing the use of non-static memory for the interpreter's memory area (so it can be used multithreaded!)

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.