https://github.com/cameronclay/asm-vm
This is a two-pass assembler which converts assembly code into byte-code which can then be run on the virtual machine.
https://github.com/cameronclay/asm-vm
assembler boost-program-options boost-test cmake cpp20 cpp20-modules multithreading stl vcpkg virtual-machine
Last synced: about 1 month ago
JSON representation
This is a two-pass assembler which converts assembly code into byte-code which can then be run on the virtual machine.
- Host: GitHub
- URL: https://github.com/cameronclay/asm-vm
- Owner: CameronClay
- Created: 2024-03-16T22:28:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-10T21:44:20.000Z (11 months ago)
- Last Synced: 2025-03-15T05:14:43.393Z (about 1 month ago)
- Topics: assembler, boost-program-options, boost-test, cmake, cpp20, cpp20-modules, multithreading, stl, vcpkg, virtual-machine
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Assembler and Virtual machine
Two-pass assembler which converts assembly code into byte-code which can then be run on the virtual machine. Based on Reduced Instruction Set Computing (RISC) architecture.## How to run
```
Allowed options:
-h [ --help ] Produce help message
-m [ --mem-sz ] arg (=2) Specifies the amount of memory in MB for use
in assembling and running in the virtual
machine.
-t [ --max-thrd ] arg (=15) Specifies the maximum number of threads the
virtual machine will support. Making use of
the threads requires use of multithreaded
instructions.
-f [ --input-file ] arg Specifies the source file to be assembled and
run.
-l [ --log ] arg (=log.dat) Enables debug logging to specified filename
via TRAP calls.
-i [ --inst-per-thrd ] arg (=1) Specifies how many instructions are run per
thread before initiating a context switch.
-d [ --dump ] Output the bytecode to a .byt file instead of
running it (incompatible when loading a .byt
file).
```### Unit Testing
- Unit testing done with Boost.Test.### Tooling
- C++ 20 (with **C++ 20 modules**)
- CMake
- Boost.Test
- Boost.Program_options
- vcpkg
- Visual Studio Code
- MSVC compiler### Note
The code for this project is private but I am more than happy to show and explain the code.