def test_when_zero_result_sub_2comp(self): self.flags.set_from_add_result(emu8086.sub_2compl(1, 1, False), False) self.assertEquals(self.flags.cf(), 1)
def test_subtract_2compl(self): self.assertEqual(emu8086.sub_2compl(0, 1, True), 0xffff)
def test_sub_2compl_overflows(self): self.assertEqual(emu8086.sub_2compl(1, 1, True), 0x10000)