Skip to content

MemeAssembly playground with x86_64 assembler & emulation right in the browser

License

Notifications You must be signed in to change notification settings

xarantolus/MemeAssembly-playground-vue

Repository files navigation

MemeAssembly Playground

The MemeAssembly Playground is a website for writing, compiling and running MemeAssembly code in the browser.

MemeAssembly is a custom assembly-like language that is transpiled to x86-64 assembly, which is then turned into x86-64 machine code.

How it works

  1. The user writes MemeAssembly code in the editor
  2. This code is transpiled to the x86-64 assembly text format by my fork of the MemeAssembly compiler that can run in WASM
  3. This text is then compiled/assembled to real x86-64 machine code by my x86-64 assembler
  4. This machine code is then executed by my x86-64 emulator for WASM

The website emulates some syscalls by registering hooks for relevant instructions. This allows usage of syscalls like read, write and exit. The console on the page is used for the read and write syscalls.

Development setup

  1. Make sure Node, NPM, Rust and wasm-pack are installed
  2. Clone repository
  3. Run setup.sh
  4. Run npm install
  5. Run npm run dev to serve site locally