logo

SimpleVM

infoA 'stack' in the context of data structures is like a pile of books. You can only add a new book on the top of the pile and remove the top book. This principle is called 'Last In, First Out' (LIFO), meaning the last item you put in is the first one you take out.
infoAn opcode is like a secret code that computers use to understand and follow instructions. It's a short command that tells the computer what action to perform, like adding numbers, subtracting, or moving information from one place to another. Just like we follow recipes to cook, computers use opcodes to execute tasks.
  • 0 = IADD(+)
  • 1 = ISUB(-)
  • 2 = IMUL(*)
  • 3 = IDIV(/)
  • 4 = IINC(+1)
  • 5 = IDEC(-1)
  • 6 = FDEL
  • 7 = SWAP
Result: