From 9bf80459a71838a051b07fb0b94315e8d6f3a1f1 Mon Sep 17 00:00:00 2001 From: Franco Colmenarez Date: Tue, 12 Oct 2021 12:52:04 -0500 Subject: [PATCH] Add illegal instruction --- src/cpu.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cpu.rs b/src/cpu.rs index 77e0540..522151e 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -186,6 +186,7 @@ pub enum CpuOpcode { RST, RET, RETI, + IllegalInstruction, } @@ -450,7 +451,7 @@ impl CPU { 0x76 => CpuOpcode::HALT, 0x10 => CpuOpcode::STOP, 0x00 => CpuOpcode::NOP, - _ => CpuOpcode::NOP, + _ => CpuOpcode::IllegalInstruction, } } }