3 ms·
Very concise implementation. I keep thinking there's missing files or at least I'm missing something in my understanding. :) I wrote a 0-operand VM in C a few
by dsturnbull2049 12y ago
Very concise implementation. I keep thinking there's missing files or at least I'm missing something in my understanding. :)
I wrote a 0-operand VM in C a few years ago that used a lot of the same concepts but considerably more code, like 10x at least. I will learn a lot from this.
- tekknolagi 12y agoWhat kinds of files look missing? I'm curious. What is a 0 operand VM? I'd love to see it!
- chewxy 12y agoUsing only PUSH and POP I think. i.e a stack machine. also, OP, your code looks great.
- tekknolagi 12y agoOh interesting. That sounds... complicated. Thanks! It's my first big C project that isn't hideous :D
- dsturnbull2049 12y agoYeah, a stack machine. https://github.com/dsturnbull/stack_cpu https://github.com/dsturnbull/stack_cpu What I mean by missing files is that it's so clean that at first glance it didn't look like the whole deal :)
- tekknolagi 12y agoOh well thanks — that's quite a compliment. This is pretty cool!
- Hytosys 12y agoJust for anyone looking for more information: http://en.wikipedia.org/wiki/Instruction_set#Number_of_operands http://en.wikipedia.org/wiki/Instruction_set#Number_of_opera...
- tekknolagi 12y agoAwesome!
- listic 12y agoUnfortunately, with the ever-increasing processor-memory gap (the growing discrepancy between processor and memory speeds, also called Memory Wall, if I'm not mistaken), 0-operand, or stack VM's are seeing ever-increasing performance penalties.