forked from Lea/invadeez
carry and complement instructions
This commit is contained in:
parent
cb26b0ff77
commit
d8cf03afa1
|
@ -111,6 +111,11 @@ fn tick(state: &mut EmulatorState) {
|
|||
0x2b => arithmetic::dcx(Register::H, state),
|
||||
0x3b => arithmetic::dcx(Register::SP, state),
|
||||
|
||||
0x27 => panic!("Auxiliary Carry not implemented, unable to execute DAA instruction"),
|
||||
0x2f => state.a = !state.a, // CMA
|
||||
0x37 => state.cc.c = true, // STC
|
||||
0x3f => state.cc.c = !state.cc.c, // CMC
|
||||
|
||||
0x80..=0x87 => arithmetic::add_reg(register_from_num(instruction & 0xf), false, state), // ADD
|
||||
0x88..=0x8f => arithmetic::add_reg(register_from_num(instruction & 0xf), state.cc.c, state), // ADC
|
||||
0xc6 => arithmetic::add(next_byte(), false, state), // ADI
|
||||
|
|
Loading…
Reference in a new issue