Class: Amaterasu::GameBoy::Cpu::Instructions::Add16
- Defined in:
- lib/amaterasu/game_boy/cpu/instructions/add16.rb
Overview
Handles the logic related to all possible ADD 16-bit instructions.
-
ADD HL, BC
-
ADD HL, DE
-
ADD HL, HL
-
ADD HL, SP
-
ADD SP, sig8
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(cpu:, source:, target:) ⇒ Add16
constructor
A new instance of Add16.
Methods inherited from Base
Constructor Details
#initialize(cpu:, source:, target:) ⇒ Add16
Returns a new instance of Add16.
15 16 17 18 19 20 |
# File 'lib/amaterasu/game_boy/cpu/instructions/add16.rb', line 15 def initialize(cpu:, source:, target:) super(cpu:) @mnemonic = "ADD #{format_operand(source)}, #{format_operand(target)}" @logic = build_logic(source, target) end |