diff options
author | Oxore <oxore@protonmail.com> | 2019-11-11 01:43:23 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2019-11-11 01:43:23 +0300 |
commit | 59e2c93bb5fd4301a7653c568419376374c2c33a (patch) | |
tree | 6d1e5913fd10c16f10bc135f6eb558fb5c682a37 /src/main.rs | |
parent | b5be6c86d3764131d328389ceeedeb2af46039cc (diff) |
Add ram and rom, implement basic MOV functionality
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.rs b/src/main.rs index 358ac4e..dc2f600 100644 --- a/src/main.rs +++ b/src/main.rs @@ -7,14 +7,14 @@ use std::thread::sleep; use std::{thread, time}; mod core; -mod ram; +mod rom; use self::core::Core; fn core_worker(mut core: Core, should_stop: &Mutex<bool>, cvar: &Condvar) { loop { while !(*should_stop.lock().unwrap()) { - core.step(); println!("{}", core.op()); + core.step(); sleep(time::Duration::from_millis(1000)); } @@ -55,7 +55,7 @@ fn main() { let asyncpair = Arc::new((Mutex::new(false), Condvar::new())); let asyncpair2 = asyncpair.clone(); - let core = match Core::new_with_ram_from_hex(data) { + let core = match Core::new_with_rom_from_hex(data) { Ok(value) => value, Err(err_string) => { println!("{}", err_string); @@ -63,8 +63,6 @@ fn main() { } }; - println!("{}", core.op()); - thread::spawn(move || { let (ref should_stop, ref condvar) = *asyncpair2; core_worker(core, should_stop, condvar); |