еще раз код для сложения
signed short ss_add (signed short arg1, signed short arg2)
{
signed short result = arg1 + arg2;
if (OV)
{
if (CY) result = 0x8000; // -32768
else
if (result & 0x8000) result = 0x7FFF; // 32767
else result = 0x8000; // -32768
}
return result;
}