change memory to a vector, it can now be fill

This commit is contained in:
Baptiste
2023-03-01 16:12:46 +01:00
parent e82af4ae67
commit 5a90419ebb
4 changed files with 27 additions and 37 deletions

View File

@ -1,11 +1,14 @@
mod simulator;
use simulator::machine::Machine;
use simulator::{mem_cmp, loader};
use simulator::mem_cmp;
fn main() {
let path = "test_file_section.txt".to_string();
let mut m = loader::load(&path, 4);
Machine::print_memory(&mut m);
let mut m = Machine::_init_machine();
let path = "memory.txt".to_string();
let checker = mem_cmp::Mem_Checker::from(&path);
mem_cmp::Mem_Checker::fill_memory_from_Mem_Checker(&checker, &mut m);
mem_cmp::Mem_Checker::print_Mem_Checker(&checker);
Machine::print_memory(&mut m, 0x400000, 0x405000);
Machine::run(m);
}