diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index f43a33e..5aa3307 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,10 +6,13 @@ use std::io::prelude::*; use std::sync::mpsc::{channel, Receiver, Sender}; use std::thread; use std::time::Duration; +use std::rc::Rc; +use std::cell::RefCell; mod cpu8051; -mod memory; +mod bus; mod progmem; +mod ram; use self::cpu8051::Cpu8051; use self::progmem::ProgramMemory; @@ -135,7 +138,7 @@ fn main() { fs::read_to_string(filename).unwrap_or_else(|_| panic!("Unable to read file {}", filename)); let cpu = Cpu8051::new().rom(match ProgramMemory::from_hex(data) { - Ok(value) => value, + Ok(value) => Rc::new(RefCell::new(value)), Err(err_string) => { println!("{}", err_string); return; |