implemented run function to use one-instruction for several instruction

This commit is contained in:
Rémi Rativel 2022-11-21 13:17:42 +01:00
parent adf7f0a02e
commit 233d928b6f

View File

@ -37,6 +37,13 @@ impl Machine {
} }
} }
pub fn run(machine : Machine){
let mut m = machine;
loop{
Machine::one_instruction(&mut m);
}
}
pub fn one_instruction(machine :&mut Machine) { pub fn one_instruction(machine :&mut Machine) {
let mut unsigned_reg1 : u64 = 0; let mut unsigned_reg1 : u64 = 0;