Ejemplo n.º 1
0
def _dec_value(processor, value):
    processor.set_condition('p', value == 0x80)
    result, half_carry, _ = bitwise_sub(value, 1)

    processor.set_condition('s', to_signed(result) < 0)
    processor.set_condition('z', result == 0)
    processor.set_condition('h', half_carry)
    processor.set_condition('n', True)
    return result
Ejemplo n.º 2
0
def _dec_value(processor, value):
    processor.set_condition('p', value == 0x80)
    result, half_carry, _ = bitwise_sub(value, 1)

    processor.set_condition('s', to_signed(result) < 0)
    processor.set_condition('z', result == 0)
    processor.set_condition('h', half_carry)
    processor.set_condition('n', True)
    return result
Ejemplo n.º 3
0
def _inc_value(processor, value):
    processor.set_condition('p', value == 0x7f)
    result, half_carry, _ = bitwise_add(value, 1)

    processor.set_condition('s', to_signed(result) < 0)
    processor.set_condition('z', result == 0)
    processor.set_condition('h', half_carry)
    processor.set_condition('n', False)
    return result
Ejemplo n.º 4
0
def _inc_value(processor, value):
    processor.set_condition('p', value == 0x7f)
    result, half_carry, _ = bitwise_add(value, 1)

    processor.set_condition('s', to_signed(result) < 0)
    processor.set_condition('z', result == 0)
    processor.set_condition('h', half_carry)
    processor.set_condition('n', False)
    return result