News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

ADC

Started by HellOfMice, January 28, 2025, 02:33:22 PM

Previous topic - Next topic

HellOfMice

I found something strange:


14 01                               | ADC      AL,114
14 FF                               | ADC      AL,-114



Felix Cloutier on his site (https://www.felixcloutier.com/x86/adc) tells:
QuoteThe ADC instruction does not distinguish between signed or unsigned operands. Instead, the processor evaluates the result for both data types and sets the OF and CF flags to indicate a carry in the signed or unsigned result, respectively. The SF flag indicates the sign of the signed result.
But the result is strange, why does it proceed like this?

Vortex

Hi Philippe,

Here, the OF and CF flags should operate for both ıf the signed and unsigned arithmetics.
Code it... That's all...

HellOfMice

i TRIED WITH OTHER NUMBERS i DON4T UNDERTANS