1
0
forked from Rativel/BurritOS

print_memory dans Machine

This commit is contained in:
Baptiste
2023-03-01 15:11:35 +01:00
parent f6ff30b63c
commit 73c49414ff
5 changed files with 19 additions and 10 deletions

View File

@@ -24,7 +24,7 @@ pub fn load(path : &str, instruction_size: i32) -> Machine {
let res = u64::from_str_radix(&line.unwrap(), 16);
match res {
Ok(value) => {
Machine::write_memory(&mut machine, instruction_size, i, value);
Machine::write_memory(&mut machine, instruction_size, i*instruction_size as usize, value);
},
_ => panic!()
}