Fix INX and DCX not being wrapping
This commit is contained in:
parent
dcbce1a1a5
commit
227e1e779b
@ -401,8 +401,8 @@ impl I8080 {
|
||||
self.update_arith_flags(ac, self.carry, res);
|
||||
self.regs[src] = res;
|
||||
}
|
||||
Opcode::Inx(dst) => self.set_pair(dst, self.get_pair(dst) + 1),
|
||||
Opcode::Dcx(dst) => self.set_pair(dst, self.get_pair(dst) + 2),
|
||||
Opcode::Inx(dst) => self.set_pair(dst, self.get_pair(dst).wrapping_add(1)),
|
||||
Opcode::Dcx(dst) => self.set_pair(dst, self.get_pair(dst).wrapping_sub(1)),
|
||||
Opcode::Dad(src) => {
|
||||
let a = u32::from(self.get_pair(RegisterPair::HL));
|
||||
let b = u32::from(self.get_pair(src));
|
||||
|
Loading…
Reference in New Issue
Block a user