Skip to content

Commit

Permalink
fix two inc instructions that were being passed as dec
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanballs committed Sep 12, 2024
1 parent 0feb9bd commit 8d082d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/instructions/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub fn parse(opcode: u8, arg1: u8, arg2: u8) -> (Instruction, u16, u8) {
0x12 => (Instruction::LdR16memA(R16mem::DE), 1, 8),
0x13 => (Instruction::IncR16(R16::DE), 1, 8),
0x14 => (Instruction::IncR8(R8::D), 1, 4),
0x15 => (Instruction::IncR8(R8::D), 1, 4),
0x15 => (Instruction::DecR8(R8::D), 1, 4),
0x16 => (Instruction::LdR8Imm8(R8::D, imm8), 2, 8),
0x17 => (Instruction::Rla, 1, 4),
0x18 => (Instruction::JrImm8(imm8 as i8), 2, 12),
Expand All @@ -54,7 +54,7 @@ pub fn parse(opcode: u8, arg1: u8, arg2: u8) -> (Instruction, u16, u8) {
0x22 => (Instruction::LdR16memA(R16mem::HLI), 1, 8),
0x23 => (Instruction::IncR16(R16::HL), 1, 8),
0x24 => (Instruction::IncR8(R8::H), 1, 4),
0x25 => (Instruction::IncR8(R8::H), 1, 4),
0x25 => (Instruction::DecR8(R8::H), 1, 4),
0x26 => (Instruction::LdR8Imm8(R8::H, imm8), 2, 8),
0x27 => (Instruction::Daa, 1, 4),
0x28 => (Instruction::JrCondImm8(Cond::Z, imm8 as i8), 2, 12),
Expand Down

0 comments on commit 8d082d4

Please sign in to comment.