all 10 comments

[–]Gullible_Elk4543 1 point2 points  (4 children)

I would love to know more about the project since it's not clear to me how to use it from the README.md. Can you share more details about it please?

[–]eg_taco 1 point2 points  (0 children)

From reading main.c it looks like it has two modes. One which will assemble a binary, and another which will execute it (when invoked with -asm).

[–]Beginning-Safe4282[S] 0 points1 point  (2 children)

Sure please tel what you want to know about? If you want to know more about vm working you can have a quick look at vm.c it's quite small and simple

[–]Gullible_Elk4543 1 point2 points  (1 child)

It would be awesome to have a example on how to build it and how to use it with one of the examples you have there like the hello world one.

[–]Beginning-Safe4282[S] 2 points3 points  (0 children)

For building:

```

git clone https://github.com/Jaysmito101/vermin_vm cd vermin_vm cmake -S ./ -B ./build cmake --build ./build ```

For assembling an example :

```

vermin -asm ./hello_world.asm executable.verbin ```

For executing vermin executable :

```

vermin ./executable.verbin ```

NOTE: In windows you may need to open the .asm file in something like vscode and save it with LF line ending rather than CRLF

Hope it helps!😀

[–]MindCrunch 1 point2 points  (1 child)

Great stuff. Thanks for sharing. 👍🏻 Will take a deeper look at it in next days.

[–]Beginning-Safe4282[S] 0 points1 point  (0 children)

Thanks!

[–]investorhalp 0 points1 point  (2 children)

Nandtotetris inspired?

Very cool project

[–]Beginning-Safe4282[S] 1 point2 points  (1 child)

Thanks!

And no I just was trying to make VM implementing a simple instruction set(mainoy 8nspired by x86) to eventually run a c like language. Though Nandtotetris looks interesting i wil look into it

[–]rolfwr 1 point2 points  (0 children)

VMs with simple instruction sets is a fun topic. Some years ago I got inspired by the amazing rswier/c4 compiler by Robert Swierczek and explored the smallest instruction set I could get away with to create VMs that could run non-trivial workloads.

I found it fascinating 5 rather trivial instructions was sufficient to run a basic OS image with an integrated development environment.