4 ms·
Basic Virtual Machine Implementation in C99
- stevekemp 7y agoIt 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 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 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!
- xorz57 7y agoThank you so much for the feedback! I will try do my best!
- stevekemp 7y agoThe 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.
- xorz57 7y agoI think I am not even close to this day :/ But I agree!