Class: Amaterasu::GameBoy::Cpu::Instructions::Rotate
- Includes:
- Utils::BitOps
- Defined in:
- lib/amaterasu/game_boy/cpu/instructions/rotate.rb
Overview
Holds the logic of all the Rotate instructions.
-
RLCA: Rotate Left Circular A.
-
RRCA: Rotate Right Circular A.
-
RLA: Rotate Left Through Carry A.
-
RRA: Rotate Right Through Carry A.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(cpu:, operation:) ⇒ Rotate
constructor
A new instance of Rotate.
Methods included from Utils::BitOps
Methods inherited from Base
Constructor Details
#initialize(cpu:, operation:) ⇒ Rotate
Returns a new instance of Rotate.
16 17 18 19 20 21 |
# File 'lib/amaterasu/game_boy/cpu/instructions/rotate.rb', line 16 def initialize(cpu:, operation:) super(cpu:) @mnemonic = format_operand(operation).to_s @logic = build_logic(operation) end |