summaryrefslogtreecommitdiff
path: root/Q1.core/Exceptions.cs
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-18 23:08:58 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2026-03-18 23:08:58 +1000
commit7d20ff2a8e89e646fa79be69c8d07a512081daba (patch)
tree67433c74d55f778065363010a593c44a0f65296b /Q1.core/Exceptions.cs
parent0bb62fc65526a0981cd328dea1b09aba8ce0a576 (diff)
test: Add tests for all control instructions and base CPU implementation
Diffstat (limited to 'Q1.core/Exceptions.cs')
-rw-r--r--Q1.core/Exceptions.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/Q1.core/Exceptions.cs b/Q1.core/Exceptions.cs
new file mode 100644
index 0000000..fa5156f
--- /dev/null
+++ b/Q1.core/Exceptions.cs
@@ -0,0 +1,7 @@
+namespace Q1.core;
+
+public class ChipException(string message) : Exception(message);
+
+public class InvalidInstructionException(u8 opcode) : ChipException($"Invalid instruction: 0x{opcode:X2}");
+public class InvalidAddressingModeException(u8 mode) : ChipException($"Invalid addressing mode: 0x{mode:X2}");
+public class HaltException() : ChipException("Execution halted"); \ No newline at end of file