ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Пятница
19 апреля
810140 Топик полностью
misyachniy (17.01.2018 09:29 - 10:21, просмотров: 222) ответил Bill на Я не сами инструкции имел в виду. Я о том, как они реализованы.
Реализация SUB, SBC бывает разная как и флаги http://www.shsu.edu/~csc_tjm/fall2004/cs272/flags.html
По ссылке классическое поведение флага переноса в моем понимании. The Carry Flag (CF) CF = 1 if there is a carry out from the msb (most significant bit) on addition, or there is a borrow into the msb on subtraction CF = 0 otherwise CF is also affected by shift and rotate instructions В Википедии как раз и разные варианты https://en.wikipedia.org/wiki/Carry_flag The second takes advantage of the identity that −x = not(x)+1 and computes a−b as a+not(b)+1. The carry flag is set according to this addition, and subtract with carry computes a+not(b)+C, while subtract without carry acts as if the carry bit were set. The result is that the carry bit is set if a≥b, and clear if a<b.Тhe System/360,[2] 6502, MSP430, ARM and PowerPC processors use this convention.