Class: GBRb::InstructionSet::Ldhln
- Inherits:
-
Instruction
- Object
- Instruction
- GBRb::InstructionSet::Ldhln
- Defined in:
- lib/gbrb/instruction_set/ld.rb
Instance Attribute Summary
Attributes inherited from Instruction
Instance Method Summary collapse
- #call(r, mem) ⇒ Object
-
#initialize(target, m = 2, t = 8) ⇒ Ldhln
constructor
A new instance of Ldhln.
Methods inherited from Instruction
Constructor Details
#initialize(target, m = 2, t = 8) ⇒ Ldhln
Returns a new instance of Ldhln.
31 32 33 34 |
# File 'lib/gbrb/instruction_set/ld.rb', line 31 def initialize target, m=2, t=8 super m, t @target = target.to_sym end |
Instance Method Details
#call(r, mem) ⇒ Object
36 37 38 |
# File 'lib/gbrb/instruction_set/ld.rb', line 36 def call r, mem mem.write_byte r.hl.read, r.public_send(@target).read end |