A BytePusher virtual machine that translates the one ByteByteJump instruction to x86-64 assembly.
I wanted to explore Just-In-Time compilers with the hope of maybe writing one for a more complicated instruction set sometimes in the future. This was my "first step" towards that goal. This project's compiler is non-optimizing and so it's not actually any faster than the interpreter from what I could see (note: didn't do any serious benchmarking)
- Audio
This application is run from the terminal. A typical command might look like: ./bp-jit ./bin/demo/nyan.bp
Most recently built on Zig v2024.1.0-mach
Dependency | Source |
---|---|
mach-glfw | https://github.com/hexops/mach-glfw |
zgui | https://github.com/michal-z/zig-gamedev |
zig-clap | https://github.com/Hejsil/zig-clap |
gl.zig |
https://github.com/MasterQ32/zig-opengl |
gl.zig
is an auto-generated file providing bindings for OpenGL
The BytePusher inherits the CHIP-8 set of controls. In this project, they're defined as:
+---+---+---+---+
| 1 | 2 | 3 | 4 |
+---+---+---+---+
| Q | W | E | R |
+---+---+---+---+
| A | S | D | F |
+---+---+---+---+
| Z | X | C | V |
+---+---+---+---+