diff --git a/src/machine.rs b/src/machine.rs index 65c2e0d..705e940 100644 --- a/src/machine.rs +++ b/src/machine.rs @@ -30,6 +30,7 @@ impl<'a> Machine<'a> { while self.ip < self.code.len() { // get current instruction let instruction = &self.code[self.ip]; + println!("{:?}", instruction); // match type and execute match instruction.itype { InstructionType::Increment => { diff --git a/src/parser.rs b/src/parser.rs index a32310f..4645a95 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -43,7 +43,7 @@ impl Parser { fn load_instruction(&mut self, itype: InstructionType) { let instruction = Instruction { itype, - argument: 0, + argument: 1, }; self.instructions.push(instruction);