Closed weibell closed 4 years ago
I don't have access to the hardware right now but it does work in both BGB and SameBoy.
The flag changes themselves are correct, but your description of them isn't. The original bit 0 is stored in the carry flag and bit 7 is left unchanged. (there's no bit 8 in an 8-bit number, as well)
@weibell Thanks for the contribution! Do you think you can work on some fixes for the descriptions?
@JL2210 You are right, I mixed up the description and yours is correct: Shift right into carry, storing the original bit 0 into the carry flag and leaving bit 7 unchanged.
@avivace Thank you. However, since #8 (containing exactly the same made in this pull request) has already been merged, I think we can close this pull request.
Great, thanks anyway, @weibell !
According to multiple sources, instructions CB28 ("SRA B") up to CB2F ("SRA A") use the carry flag to store the value of bit 8 prior to the right shift.