aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorkrolxon <krolyxon@tutanota.com>2026-01-05 12:12:57 +0530
committerkrolxon <krolyxon@tutanota.com>2026-01-05 12:12:57 +0530
commit8d479202b0c9dbe13bb95ad572a060b69642ec26 (patch)
tree5a8f8c015c47bef497e4a54808da667db857fbfd /src/main.rs
parent2fb5bbaa8d97a390b3175026040709c762cb93ec (diff)
add labels, improve documentation, add step debug
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
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();
}
}