aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorDavid Li <li.davidm96@gmail.com>2015-12-15 16:25:58 -0500
committerDavid Li <li.davidm96@gmail.com>2015-12-15 16:25:58 -0500
commit98475b71bcf5a89c8c1c4c59a0c9f9ade74494f5 (patch)
treeb97cf27b7e7ed29831992880db1378b876e80f87 /src/lib.rs
parent391dceacc280d6a339b36a85e4f0665da992b91e (diff)
Load hexdump of ELF
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index f710c03..8e26888 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1,3 +1,4 @@
+#![feature(as_slice)]
mod isa;
mod binary;
mod memory;
@@ -6,4 +7,10 @@ mod simulator;
#[test]
fn it_works() {
+ use std::path::Path;
+ println!("Test");
+ match binary::Binary::new_from_hex_file(Path::new("../riscv/kernel.hex")) {
+ Ok(_) => println!("Ok"),
+ Err(err) => println!("Error: {:?}", err),
+ }
}