Class: Amaterasu::GameBoy::Cpu::Instructions::Ld16
- Defined in:
- lib/amaterasu/game_boy/cpu/instructions/ld16.rb
Overview
Holds the logic of all the 16-bit Load instructions.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(cpu:, target:, source:) ⇒ Ld16
constructor
A new instance of Ld16.
Methods inherited from Base
Constructor Details
#initialize(cpu:, target:, source:) ⇒ Ld16
Returns a new instance of Ld16.
9 10 11 12 13 14 |
# File 'lib/amaterasu/game_boy/cpu/instructions/ld16.rb', line 9 def initialize(cpu:, target:, source:) super(cpu:) @mnemonic = "LD #{format_operand(target)}, #{format_operand(source)}" @logic = build_logic(target, source) end |