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.
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!