Crates.io | vm_translator |
lib.rs | vm_translator |
version | 0.3.0 |
source | src |
created_at | 2024-01-21 12:46:19.721872 |
updated_at | 2024-06-26 21:25:42.385687 |
description | A VM translator for the hack machine (ref: The Element Of Compting System) |
homepage | |
repository | https://github.com/xpanvictor/hack/tree/master/software/vm_translator |
max_upload_size | |
id | 1107580 |
size | 33,806 |
This is a vm translator written in rust to facilitate the translation of the supported vm command to its associated Hack's assembly instruction.
I have ensured the translator documents each processed command to make debugging easier.
provide stack pointers initialization requirements
provide jump statement requirment
function init and goto statement
conditional goto
testing with recursion
git clone --depth=1 --no-checkout https://github.com/xpanvictor/hack/ && cd hack && git sparse-checkout set software/vm_translator && git checkout
cd software/vm_translator
cargo run <VM_FILE_PATH.vm>
Where
VM_FILE_PATH.vm
: a path leading to file to translate
NOTE
The output file is stored in VM_FILE_PATH.asm
.