calling mem_checker in main

This commit is contained in:
Baptiste
2023-02-15 18:01:50 +01:00
parent 4425ac747e
commit 39b7db864a
4 changed files with 75 additions and 66 deletions

View File

@ -1,14 +1,13 @@
mod simulator;
use simulator::machine::Machine;
use simulator::mem_cmp;
fn main() {
let mut m = Machine::_init_machine();
m.main_memory[4] = 43;
m.main_memory[5] = 150;
let a : u8 = 128;
let b : i8 = a as i8;
let c : u8 = b as u8;
println!("aaa {c}");
println!("read_memory : {}", Machine::read_memory(&mut m, 2, 4));
let path = "test_file_section.txt".to_string();
let checker = mem_cmp::Mem_Checker::from(&path);
mem_cmp::Mem_Checker::fill_memory_from_Mem_Checker(&checker, &mut m);
Machine::run(m);
mem_cmp::Mem_Checker::print_Mem_Checker(&checker);
}