News for hackers. Stuff that matters.
Re:Basic Virtual Machine Implementation in C99 by stevekemp on Friday August 09, 2019 @11:39PM (#20659987)
It is always nice to see projects like this. Creating a simple interpreter isn't a hard job, but it's still pretty educational.

One thing that you'll benefit from is documenting the instruction-set, and usage a little more clearly. For example my own toy language was written in C here:

https://github.com/skx/simple.vm

And I think I did a good job of showing how to use the instructions. Then for fun I rewrote it in golang https://github.com/skx/go.vm which showed some interesting differences.

Your own tastes might differ, but I'd think after the interpreter a compiler/decompiler would be good next steps. Makes it a lot easier to write code/programs in your assembly!

Re:Basic Virtual Machine Implementation in C99 by xorz57 on Friday August 09, 2019 @11:50PM (#20660032)
Thank you so much for the feedback! I will try do my best!
Re:Basic Virtual Machine Implementation in C99 by stevekemp on Saturday August 10, 2019 @04:46AM (#20660953)
The day you first write a "useful" program in your own instruction set is a good day to look forward to!

I've been dabbling in Z80 assembly recently, and wrote a program to convert lower-case input to upper-case. Not useful, but the first "real" thing I've done for 20 years in Z80.

Re:Basic Virtual Machine Implementation in C99 by xorz57 on Saturday August 10, 2019 @04:52AM (#20660969)
I think I am not even close to this day :/ But I agree!