(no title)
t0mek | 2 years ago
SBC:
result = byte1 - byte2 - carry
carry = result < 0
return result & 0xff
ADC:
result = byte1 + byte2 + carry
carry = result > 0xff
return result & 0xff
Source - my implementation, passes tests. Look for SBC & ADC in
https://github.com/trekawek/coffee-gb/blob/master/src/main/j...
grishka|2 years ago