1
0
Fork
You've already forked hvm
1
c99+posix compliant heph emulator
C 96.7%
Makefile 3.3%
2025年09月02日 00:02:22 +01:00
src add dump function, which'll link packs before dumping memory to stdout without execution 2025年09月02日 00:02:22 +01:00
test add second test 2025年08月06日 17:48:28 +01:00
.clang-format add clang format file to disable clang format 2025年09月01日 12:35:11 +02:00
.gitignore add bin dir to gitignore 2025年09月01日 12:33:26 +02:00
LICENSE added mit license 2025年06月28日 13:39:48 +01:00
Makefile fix makefile install 'installing to' message 2025年09月01日 22:50:21 +01:00
README.md add dump function, which'll link packs before dumping memory to stdout without execution 2025年09月02日 00:02:22 +01:00

hvm

hvm is a c99+posix compliant virtual machine for running heph packs in hosted environments.

rationale

Heph is a forth container format that aims to provide a consistent forth environment for any system with a 16-bit address space. it does this by capturing an indirectly threaded forth dictionary, and encoding it in a manner that is completely independent of any particular platform or architecture. this format can then be translated to just about any platform available today, and executed at native speed.

the eventual goal of heph, and the ecosystem surrounding it, is to produce an operating system contained in a heph pack, capable of running on any computer in the last thirty years, and building itself to any other target from just about any platform.

however, since the system itself would be contained with the format, there is a need for a program capable of bootstrapping the system from existing operating systems. this is the purpose of hvm.

building

to build a hvm executable, execute the command CC="compiler" make in your shell, replacing compiler with whatever the name of your C compiler is. if you'd also like to install the executable to an appropriate location, you can execute make install, which'll copy the executable to /usr/local/bin, or specify a different install location with bindir="foo" make install, where foo is the target directory.

usage

hvm's primary functionality is the execution of heph packs. this is done by invoking hvm run followed by the filename(s) of the pack(s) you want to execute. if you provide multiple packs, then hvm will link them in the order you provide before executing the topmost word.

you can also instruct hvm to perform translation and linking without execution, instead dumping the resulting memory to stdout: invoke hvm dump with filenames for this function.

you can invoke hvm without any other arguments if you want to hear this information from the program itself.

license

hvm is licensed under the MIT License, meaning that anyone is free to modify and redistribute it as they see fit.