lvm.js

changeset 21
9b5cc503bc31
parent 20
977ae93f612c
child 22
8391b51517df
equal deleted inserted replaced
20:977ae93f612c 21:9b5cc503bc31
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)];

mercurial