diff options
author | Oxore <oxore@protonmail.com> | 2019-11-19 01:38:14 +0300 |
---|---|---|
committer | Oxore <oxore@protonmail.com> | 2019-11-19 01:38:14 +0300 |
commit | 1cbcbb5e2912c59b9c176dfd46e863e2bee045e1 (patch) | |
tree | 1df87343a9509fcac8de6765ee34cff299a4df13 /src/main.rs | |
parent | 2376146fe9ceee4429b77c4364eaf52ce57dd80c (diff) |
Implement getter for PC in Core, print offset for each instruction
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 8eb1648..87dd041 100644 --- a/src/main.rs +++ b/src/main.rs @@ -13,7 +13,7 @@ use self::core::Core; fn core_worker(mut core: Core, should_stop: &Mutex<bool>, cvar: &Condvar) { loop { while !(*should_stop.lock().unwrap()) { - println!("{}", core.op()); + println!("0x{:08x}: {}", core.pc(), core.op()); core.step(); sleep(time::Duration::from_millis(1000)); } |