on the 6502 it was simple to save silicon (afaik)
sub was infact a + ~b (and as we all know -b is (~b +1)) so having the
carry as ~borrow there is no need to either invert the carry flag on sub or
negate the 2nd operand (i.e. butwise not and increment)
----- Original Message -----
From: "Morten Pedersen" <escapekey@...>
To: <gbadev@yahoogroups.com>
Sent: Monday, March 31, 2003 9:15 PM
Subject: Re: [gbadev] Re: The carry flag
>
> but that's completely retarded. that means (and i just tested this to be
> true) the following code ends up with '1' in r12.
>
> mov r10,#0x00000000
> mov r11,#0x00000000
> subs r12,r10,r11
> adc r12,r10,r11
>
>
>
>
> ----- Original Message -----
> From: "Damian Yerrick" <d_yerrick@...>
> To: <gbadev@yahoogroups.com>
> Sent: Monday, March 31, 2003 8:28 AM
> Subject: [gbadev] Re: The carry flag
>
>
> >
> > From what I've read, the carry flag on the ARM architecture seems
> > to operate under subtraction like the one on the 6502 architecture:
> > 0 for borrow and 1 for no borrow. The 6502 does subtraction like
> > this:
>
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>