forked from Rativel/BurritOS
compare mem_checker and machine
This commit is contained in:
@@ -194,6 +194,19 @@ impl Mem_Checker{
|
||||
|
||||
}
|
||||
|
||||
pub fn compare_machine_memory(m_c: &Mem_Checker, machine: &Machine) -> bool {
|
||||
|
||||
for section in m_c.sections.iter() {
|
||||
for i in 0..section.len {
|
||||
if machine.main_memory[section.addr + i] != section.content[i] {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user