.instructionset

We've now reversed all the VM instructions, and have a full understanding about how it works. Here is the VM's instruction set:

Instruction1st arg2nd argWhat does it do?
"A""M"arg2*sym.current_memory_ptr += arg2
"P"arg2sym.current_memory_ptr += arg2
"C"arg2sym.written_by_instr_C += arg2
"S""M"arg2*sym.current_memory_ptr -= arg2
"P"arg2sym.current_memory_ptr -= arg2
"C"arg2sym.written_by_instr_C -= arg2
"I"arg1n/ainstr_A(arg1, 1)
"D"arg1n/ainstr_S(arg1, 1)
"P"arg1n/a*sym.current_memory_ptr = arg1; instr_I("P")
"X"arg1n/a*sym.current_memory_ptr ^= arg1
"J"arg1n/aarg1_and_0x3f = arg1 & 0x3f;
if (arg1 & 0x40 != 0)
  arg1_and_0x3f *= -1
if (arg1 >= 0) return arg1_and_0x3f;
else if (*sym.written_by_instr_C != 0) {
  if (arg1_and_0x3f < 0)
    ++*sym.good_if_ne_zero;
  return arg1_and_0x3f;
} else return 2;
"C"arg1n/a*sym.written_by_instr_C = arg1
"R"arg1n/areturn(arg1)