Search code examples
emulationgameboy

Difference between RL n and RLA CPU instructions


According to the GameBoy manual, these instructions are as follows:

rla 17 4 000c rotate akku left through carry

rl r CB 1x 8 z00c rotate left through carry

However, I'm having hard time understanding the difference between them from the implementation point of view. Can someone clarify?


Solution

  • RL sets Z flag depending on the result.

    RLA clears Z regardless of the result.

    Other than that they're identical in their implementation.