Merge branch 'bin-loader' into 'thread_scheduler'
Binary loader See merge request simpleos/burritos!12
This commit is contained in:
@ -177,7 +177,7 @@ impl Machine {
|
||||
/// ### Parameters
|
||||
///
|
||||
/// - **machine** contains the memory
|
||||
pub fn _extract_memory(&self){
|
||||
pub fn _extract_memory(&mut self){
|
||||
let file_path = "burritos_memory.txt";
|
||||
let write_to_file = |path| -> std::io::Result<File> {
|
||||
let mut file = File::create(path)?;
|
||||
@ -207,9 +207,9 @@ impl Machine {
|
||||
}
|
||||
println!("________________SP________________");
|
||||
let sp_index = self.int_reg.get_reg(2);
|
||||
for i in 0..5 {
|
||||
/* for i in 0..5 {
|
||||
println!("SP+{:<2} : {:16x}", i*8, self.read_memory(8, (sp_index + i*8) as usize));
|
||||
}
|
||||
} */
|
||||
println!("##################################");
|
||||
}
|
||||
|
||||
@ -253,6 +253,7 @@ impl Machine {
|
||||
Ok(MachineOk::Shutdown) => break,
|
||||
Err(e) => { if e.to_string().contains("System") { break; } panic!("FATAL at pc {} -> {}", self.pc, e) }
|
||||
}
|
||||
self.write_int_register(0, 0); // In case an instruction write on register 0
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user