diff options
| author | Samuel Perrouault <samuel.perrouault@gmail.com> | 2025-03-26 13:54:02 +0100 |
|---|---|---|
| committer | Samuel Perrouault <samuel.perrouault@gmail.com> | 2025-03-26 13:54:02 +0100 |
| commit | 65e8ed900d238f46cc2af7a57e558b9b911966aa (patch) | |
| tree | b7cb8e974f6ef66304f1e48cd42a702745e04a78 | |
| parent | e63cd0f86c3aa6f66f616a1fe907263ccd679fb8 (diff) | |
handle SNE instruction
| -rw-r--r-- | src/chip8.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/chip8.rs b/src/chip8.rs index 0ea6d6d..773df97 100644 --- a/src/chip8.rs +++ b/src/chip8.rs @@ -77,6 +77,12 @@ impl Chip8 { self.pc += 2; } } + 0x4000 => { + eprintln!("SNE V{}, {}", x, nn); + if self.v[x] != nn { + self.pc += 2; + } + } 0x6000 => { eprintln!("LD V{}, {}", x, nn); self.v[x] = nn; |
