♻️ Started refactoring instruction.rs

This commit is contained in:
François Autin
2023-03-29 16:26:27 +02:00
parent 3fa3ce0e99
commit 2d241e4dd5
2 changed files with 195 additions and 187 deletions

View File

@ -236,10 +236,10 @@ impl Machine {
}
let val = u32::from_be_bytes(val) as u64;
let inst : Instruction = decode(val);
let inst : Instruction = Instruction::new(val);
self.print_status();
println!("executing instruction : {:016x} at pc {:x}", val, self.pc);
println!("{}", instruction::print(decode(val), self.pc as i32));
println!("{}", instruction::print_instruction_debug(&inst, self.pc as i32));
let trace = Self::string_registers(self);
self.registers_trace.push_str(format!("{}\n", trace).as_str());