Wow, yeah, that's a bit off. And incorrect. It should end up being equivalent to:
SBC = A - V - 1 + C
Thanks. I'll fix this up :)
SBC = A - V - 1 + C
Thanks. I'll fix this up :)
Also, this line is bothersome, they do opposite things but that's why you have already done (1 - C).
Maybe the fact that -V is actually (!V + 1) (in 2's complement) that eats up the extra -1 is the correct explanation?
So,
SBC = A - V - 1 + C
SBC = A + !V + 1 - 1 + C
SBC = A + !V + CAt the time of writing I was sure I had it right too!
I’ll fix that up. Thanks :)