4 ms·
first assignment would be to add the multiply and divide operators... I admit I have trouble understanding how the VM run() function works... anybody can give
by jokoon 4y ago
first assignment would be to add the multiply and divide operators...
I admit I have trouble understanding how the VM run() function works... anybody can give some insight?
- mav88 4y agoThe function runs through the program by incrementing the program counter (*pc++) and dispatching what instruction it sees. It's a stack-based VM so individual instructions are pushed onto and popped from the stack depending on the operation. Is there anything specific you don't grok? Happy to help.