Class: Amaterasu::GameBoy::Cpu::Instructions::Ldh
- Defined in:
- lib/amaterasu/game_boy/cpu/instructions/ldh.rb
Overview
Holds the logic of all the LDH (Load High RAM) instructions.
Constant Summary collapse
- IO_BASE_ADDRESS =
0xFF00
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(cpu:, target:, source:) ⇒ Ldh
constructor
A new instance of Ldh.
Methods inherited from Base
Constructor Details
#initialize(cpu:, target:, source:) ⇒ Ldh
Returns a new instance of Ldh.
11 12 13 14 15 16 17 18 |
# File 'lib/amaterasu/game_boy/cpu/instructions/ldh.rb', line 11 def initialize(cpu:, target:, source:) super(cpu:) @mnemonic = "LDH #{format_operand(target)}, #{format_operand(source)}" @bytes = 2 @m_cycles = 2 @logic = build_logic(target, source) end |