Main now initializes System object
This commit is contained in:
parent
de502973c7
commit
a11ca01368
15
src/main.rs
15
src/main.rs
@ -2,15 +2,14 @@ mod simulator;
|
|||||||
mod kernel;
|
mod kernel;
|
||||||
pub mod utility;
|
pub mod utility;
|
||||||
|
|
||||||
|
use kernel::{
|
||||||
|
scheduler::Scheduler,
|
||||||
|
system::System
|
||||||
|
};
|
||||||
use simulator::machine::Machine;
|
use simulator::machine::Machine;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut m = Machine::_init_machine();
|
let machine = Machine::_init_machine();
|
||||||
m.main_memory[4] = 43;
|
let scheduler = Scheduler::new();
|
||||||
m.main_memory[5] = 150;
|
let system = System::new(machine, scheduler);
|
||||||
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));
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user