aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorDavid Li <li.davidm96@gmail.com>2015-12-16 16:15:29 -0500
committerDavid Li <li.davidm96@gmail.com>2015-12-16 16:15:29 -0500
commit55a9ca94d64249280438da9b90186e0a4973f90d (patch)
tree7c2f4d5abdce0b0b00e75bfaa49e154b9be52868 /src/lib.rs
parent98475b71bcf5a89c8c1c4c59a0c9f9ade74494f5 (diff)
Load and recognize a minimal set of instructions
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 8e26888..cf0b4be 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -10,7 +10,10 @@ fn it_works() {
use std::path::Path;
println!("Test");
match binary::Binary::new_from_hex_file(Path::new("../riscv/kernel.hex")) {
- Ok(_) => println!("Ok"),
+ Ok(b) => {
+ let mut simulator = simulator::Simulator::new(1, b);
+ simulator.run();
+ },
Err(err) => println!("Error: {:?}", err),
}
}