From a11ca01368282787ecab5f1b7814f9488f9ca2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Autin?= Date: Wed, 8 Mar 2023 15:38:19 +0100 Subject: [PATCH] Main now initializes System object --- src/main.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 986cf3b..9e6d750 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,15 +2,14 @@ mod simulator; mod kernel; pub mod utility; +use kernel::{ + scheduler::Scheduler, + system::System +}; use simulator::machine::Machine; fn main() { - let mut m = Machine::_init_machine(); - m.main_memory[4] = 43; - m.main_memory[5] = 150; - 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)); + let machine = Machine::_init_machine(); + let scheduler = Scheduler::new(); + let system = System::new(machine, scheduler); }