Здравствуйте, MasterZiv, Вы писали:
>> MZ>Почему ? Я обратил, хороший вариант. (тебе легче ?)
>>
>> Вот теперь легче
MZ>Я рад
Я бы рекомендовал использовать участок ассемблерного кода:
asm
{
MOV EAx, x
ADD EAx, y
JC OverflowLabel
}
...
OverflowLabel:
...
Поскольку инструкция процессора ADD выполняет операцию сложения и устанавливает флаг переноса/переполнения.
Смотрим документацию Интел:
"The ADD instruction performs integer addition. It evaluates the result for both signed
and unsigned integer operands and sets the OF and CF flags to indicate a carry (overflow)
in the signed or unsigned result, respectively. The SF flag indicates the sign of
the signed result."