260 { |
260 { |
261 instruction = this.frame.f.instructions[this.frame.pc++]; |
261 instruction = this.frame.f.instructions[this.frame.pc++]; |
262 if(debugMode) |
262 if(debugMode) |
263 { |
263 { |
264 sys.puts("PC: "+(this.frame.pc-1)+" OP: "+instruction[0]); |
264 sys.puts("PC: "+(this.frame.pc-1)+" OP: "+instruction[0]); |
265 sys.puts("STACK: "+JSON.stringify(this.frame.reg)); |
265 sys.puts("STACK: "+sys.inspect(this.frame.reg)); |
266 } |
266 } |
267 switch(INS_OPCODE(instruction)) |
267 switch(INS_OPCODE(instruction)) |
268 { |
268 { |
269 case OP_MOVE: |
269 case OP_MOVE: |
270 this.frame.reg[INS_A(instruction)] = this.frame.reg[INS_B(instruction)]; |
270 this.frame.reg[INS_A(instruction)] = this.frame.reg[INS_B(instruction)]; |