ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Среда
3 июля
810257 Топик полностью
mut (17.01.2018 16:53, просмотров: 148) ответил Bill на Видимо, у ARM нет операции вычитания. Вместо нее используется сложение с дополнительным кодом вычитаемого
В MSP430 команда CMP.W(B) src,dst выполняет похожие действия: (.not.src) + 1 + dst. И помимо флага переноса действует на N, Z, V:
N: Set if result is negative (src > dst), reset if positive (src ≤ dst) Z: Set if result is zero (src = dst), reset otherwise (src ≠ dst) C: Set if there is a carry from the MSB, reset otherwise V: Set if the subtraction of a negative source operand from a positive destination operand delivers a negative result, or if the subtraction of a positive source operand from a negative destination operand delivers a positive result, reset otherwise (no overflow).