diff options
author | Oxore <oxore@protonmail.com> | 2019-09-30 03:56:26 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2019-09-30 03:56:26 +0300 |
commit | 615ef873ca3aff557b21658b54a7cb1081404d86 (patch) | |
tree | 434c30a9d3f918a031cca85ddb6e1b1276bca512 /src/main.rs | |
parent | 48030bad83a067388e473cba08f7b48b846c5468 (diff) |
Implement basic ram loader from hex
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 974ff5c..0d79c33 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,8 +3,10 @@ use std::io::prelude::*; use std::{thread, time}; use std::thread::sleep; use std::sync::{Arc, Mutex, Condvar}; +use std::string::String; mod core; +mod ram; use self::core::Core; fn core_worker(mut core: Core, should_stop: &Mutex<bool>, cvar: &Condvar) { @@ -42,10 +44,11 @@ fn cli_controller(asyncpair: Arc<(Mutex<bool>, Condvar)>) { } fn main() { - let core = Core::new(); let asyncpair = Arc::new((Mutex::new(false), Condvar::new())); let asyncpair2 = asyncpair.clone(); + let core = Core::with_ram_from_hex(String::from(":0300000075800008\n:00000001FF\n")); + thread::spawn(move || { let (ref should_stop, ref condvar) = *asyncpair2; core_worker(core, should_stop, condvar); |