Pelles C forum

Assembly language => Assembly discussions => Topic started by: HellOfMice on January 28, 2025, 02:33:22 PM

Title: ADC
Post by: HellOfMice on January 28, 2025, 02:33:22 PM
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) (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?
Title: Re: ADC
Post by: Vortex on January 29, 2025, 08:41:36 PM
Hi Philippe,

Here, the OF and CF flags should operate for both ıf the signed and unsigned arithmetics.
Title: Re: ADC
Post by: HellOfMice on January 29, 2025, 08:44:57 PM
i TRIED WITH OTHER NUMBERS i DON4T UNDERTANS