diff options
| author | taitep <taitep@taitep.se> | 2025-12-23 09:51:09 +0100 |
|---|---|---|
| committer | taitep <taitep@taitep.se> | 2025-12-23 09:51:09 +0100 |
| commit | 1b409cd14eb51298724c0a8aab89d2845c4a392f (patch) | |
| tree | 3768c8906e56674449016c00434f335f2ff4559a /src/core.rs | |
| parent | 976bd688b061a236e616ab69a8fb7a6baea7a82d (diff) | |
Improve error messaging
Diffstat (limited to 'src/core.rs')
| -rw-r--r-- | src/core.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core.rs b/src/core.rs index 350db31..16405c5 100644 --- a/src/core.rs +++ b/src/core.rs @@ -49,12 +49,13 @@ impl Core { Ok(i) => i, Err(_) => { eprintln!("Memory access fault while fetching instruction"); + eprintln!("PC: {:x}", self.pc); break; } }; if instr == 0 { - eprintln!("Executing 0 instruction at {:X}", self.pc); + eprintln!("Executing 0 instruction at {:x}", self.pc); break; } @@ -69,7 +70,7 @@ impl Core { InstructionResult::Normal => {} InstructionResult::Exception(_e) => { eprintln!("Exception from instruction"); - eprintln!("PC: {:016X}, instr: {:08X}", self.pc, instr.0); + eprintln!("PC: {:016x}, instr: {:08x}", self.pc, instr.0); break; } InstructionResult::Pause => { |
