← Code LabPython0/50 solved · 0%
Capstone · hard

48. A tiny stack-based VM

Execute simple opcodes against a stack.

Write `run(program)` executing a list of instruction tuples supporting `("PUSH", n)`, `("ADD",)`, `("MUL",)`, `("SUB",)`, returning the final top-of-stack value.
Required in your answer: "PUSH""ADD"stack.pop()