diff options
author | David Li <li.davidm96@gmail.com> | 2015-12-16 16:15:29 -0500 |
---|---|---|
committer | David Li <li.davidm96@gmail.com> | 2015-12-16 16:15:29 -0500 |
commit | 55a9ca94d64249280438da9b90186e0a4973f90d (patch) | |
tree | 7c2f4d5abdce0b0b00e75bfaa49e154b9be52868 /src/lib.rs | |
parent | 98475b71bcf5a89c8c1c4c59a0c9f9ade74494f5 (diff) |
Load and recognize a minimal set of instructions
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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), } } |