Skip to content

uncognic/blackbox

Repository files navigation

 ____  _            _    _
| __ )| | __ _  ___| | _| |__   _____  __
|  _ \| |/ _` |/ __| |/ / '_ \ / _ \ \/ /
| |_) | | (_| | (__|   <| |_) | (_) >  <
|____/|_|\__,_|\___|_|\_\_.__/ \___/_/\_\

A small, Turing-complete bytecode virtual machine with an assembly and BASIC-like language. It also features a disassembler/decompiler and debugger.

Links

Build

Unix-like:

  1. Ensure you have GCC and CMake installed. On Ubuntu 24.04:
sudo apt install g++-14 cmake
  1. Run the following commands in the project directory:
cmake -B build
cmake --build build

Windows

Visual Studio 2022

  1. Ensure you have Visual Studio 2022 with the "Desktop development with C++" workload installed.
  2. Open the repo folder in Visual Studio
  3. Visual Studio will detect CMakeLists.txt and configure automatically.
  4. Build with Build All (Ctrl+Shift+B).

Command Line (clang-cl)

  1. Ensure you have Visual Studio 2022 with the "Desktop development with C++" workload installed.
  2. Open the Developer Command Prompt for Visual Studio.
  3. Run the following in the project directory:
cmake -B build
cmake --build build

Examples

Assemble and run the Hello World example in Assembly:

./bbxc examples/helloworld.bbx hello.bcx
./bbx hello.bcx

Compile and run the Hello World example in BASIC:

./bbxc examples/basic/helloworld.bbs hello.bcx
./bbx hello.bcx

Or compile an arbitrary program (there are many examples)

./bbxc path/to/program.bbx program.bcx
./bbx program.bcx

License

This project is Free Software under the GPLv3 license.

About

bytecode virtual machine

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors