Search the web
Sign In
New User? Sign Up
gbadev
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
The carry flag   Message List  
Reply | Forward Message #13870 of 15019 |
Re: [gbadev] Re: The carry flag


> > sub was infact a + ~b (and as we all know -b is (~b +1))
>
> You must mean that SBC was (A + ~B + C) = (A - B - 1 + C) = (A - B -
> borrow). SUB has to include the 1 adjustment or else its just *wrong* :-)
>
yes, I was taking about the old 6502 (history of the Arm being the
replacement for the 6502 in acorn computers)
(still it was sbc without the sub etc etc).

SUB is A + ~b + 1; SBC A+~b+C (RSB ~A + B + 1) etc

not Idea why anyone would consider that retarded, just different from the
Z80. (GB)
was a pain on the 6502 having to clear and set the carry flag b4 all add/sub
ops, thankfully the Arm has add/sub with carry/borrow in/out.

is there any reason to want to borrow carry, or carry borrow ?






Wed Apr 2, 2003 2:45 am

mike.wynn@...
Send Email Send Email

Forward
Message #13870 of 15019 |
Expand Messages Author Sort by Date

... maybe an old speccy owner that still cant resist any 6502-ish behaviour no matter what? :o) gpz...
Groepaz
groepaz2000
Offline Send Email
Apr 3, 2003
2:17 am

... yes, I was taking about the old 6502 (history of the Arm being the replacement for the 6502 in acorn computers) (still it was sbc without the sub etc etc)....
Mike Wynn
mike.wynn@...
Send Email
Apr 2, 2003
2:43 am

of course this might very well be purely academic, but the result is still incorrect regardless of how you turn it. ((0-0)+0+(c)) should never result in 1. as...
Morten Pedersen
escapekey@...
Send Email
Apr 2, 2003
11:36 pm

... Academically, does Peano arithmetic define 'c'? What's incorrect academically is to use the carry flag for anything other than carrying from less...
Damian Yerrick
yerricde
Offline Send Email
Apr 2, 2003
11:54 pm

... This really perplexed me so I tried it out myself as a sanity check. I was unable to reproduce this behaviour either in VBA or on the hardware. ?!?...
Chris Hayton
you_oughta_b...
Offline Send Email
Apr 3, 2003
2:16 am

i cant reproduce it either so i probably forgot the s bit or something anyway, cheers all ... From: "Chris Hayton" <chayton@...> To:...
Morten Pedersen
escapekey@...
Send Email
Apr 3, 2003
9:36 am
 First  |  |  Next > Last 
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help