How s-mv/smvm works
Project type and purpose
• This repository implements “smvm,” a register-based bytecode virtual machine written in C.
• It’s both a standalone CLI tool (main.c + asmv,dsmv front-ends) and an embeddable C library (src/smvm.{c,h}, util, functions).
File structure
• Top-level:
• main.c – CLI entrypoint
• src/asmv.{c,h} – assembler frontend
• src/dsmv.{c,h} – disassembler frontend
• src/smvm.{c,h} – VM core and public API
• src/functions.c/.h – built-in host functions (puts, puti, etc.)
• src/util.c/.h – support routines (memory, string, I/O helpers)
• examples/ – sample assembly and C embedding use-cases
• docs/ – bytecode and instruction-set specifications
• Makefile, .github/workflows – build and CI scripts
README for additional insights
• Confirms dual usage: standalone CLI vs. embedded C library
• Describes core workflow: assemble text → bytecode → execute on VM → host I/O