3 ms·
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 :)
by ltriant 7y ago
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 :)
- mkagenius 7y ago> but the - 1 is taken care of because of the fact that ADC and SBC do the opposite thing with the carry flag. 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 + C
- ltriant 7y agoAh yeah you’re right. I had a brain fart and got my -V and !V confused. At the time of writing I was sure I had it right too! I’ll fix that up. Thanks :)