On 7 September 2010 18:08, Steve Smith <[email protected]> wrote:
>  On 9/7/2010 1:26, Robert A. Rosenberg wrote:

>> The result is ONLY the same if the original value is positive (high
>> bit = 0). If it is negative (high bit = 1) then the result is wrong
>> since it results in a positive intermediate value being subtracted
>> from the signed value and a negative intermediate value being added
>> to the signed value.
>>
> John is correct.  The results of A and AL are always the same, except
> for the condition code.  That's what makes 2s-complement so cool.

It's also how "classic" (base & displacement) addressing arithmetic,
which we all know deals only with unsigned values, can subtract.

Tony H.

Reply via email to