1
0
forked from Rativel/BurritOS

merge branch documentation

This commit is contained in:
Rémi Rativel
2023-05-25 14:16:59 +02:00
17 changed files with 200 additions and 41 deletions

View File

@@ -1,14 +1,31 @@
///! FILE.TXT FORMAT Representing machine memory memory
/// - PC
/// - SP
/// - Section_1
/// - Section_2
/// - ...
/// - Section_n
///
/// Each section is divided in 3 parts, on two lines of text
/// addr SPACE len
/// content
//! # Memory Comparator
//!
//! This module contains a MemChecker.
//!
//! It's used to compare state memory obtained after a dump memory from NachOS and BurritOS.
//!
//! This module is used exclusively for testing the instruction simulator.
//!
//! Basic usage:
//!
//! ```
//! let mut m = Machine::new(true, get_debug_configuration());
//! let mut MemChecker = mem_cmp::MemChecker::from(get_full_path!("memory", expr));
//! mem_cmp::MemChecker::fill_memory_from_mem_checker(&MemChecker, &mut m);
//! ```
//!
//!
//! ! FILE.TXT FORMAT Representing machine memory memory
//! - PC
//! - SP
//! - Section_1
//! - Section_2
//! - ...
//! - Section_n
//!
//! Each section is divided in 3 parts, on two lines of text
//! addr SPACE len
//! content
use std::{fs, io::{BufRead, BufReader, Lines, Error}};
use crate::Machine;
@@ -102,7 +119,7 @@ impl MemChecker {
/// Extract the values of pc, sp and sections
///
/// ### Parameter
/// -**path** addr to the file
/// - **path** addr to the file
///
/// ### Return
/// Mem-checker filled