diff options
| author | krolxon <krolyxon@tutanota.com> | 2026-01-05 12:12:57 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2026-01-05 12:12:57 +0530 |
| commit | 8d479202b0c9dbe13bb95ad572a060b69642ec26 (patch) | |
| tree | 5a8f8c015c47bef497e4a54808da667db857fbfd /src/main.rs | |
| parent | 2fb5bbaa8d97a390b3175026040709c762cb93ec (diff) | |
add labels, improve documentation, add step debug
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 607fb34..3dc0121 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,6 +3,8 @@ mod cpu; mod instructions; mod memory; +use std::io; + use cpu::CPU; use memory::Memory; use clap::Parser; @@ -30,7 +32,10 @@ fn main() { } while !cpu.halted { + cpu.debug_instr(&mem); cpu.step(&mut mem); - println!("{:?}", cpu); + + let mut buf = String::new(); + io::stdin().read_line(&mut buf).unwrap(); } } |
