Class: GBRb::InstructionSet::Ldhlda
- Inherits:
-
Instruction
- Object
- Instruction
- GBRb::InstructionSet::Ldhlda
- Defined in:
- lib/gbrb/instruction_set/ld.rb
Instance Attribute Summary
Attributes inherited from Instruction
Instance Method Summary collapse
- #call(r, mem) ⇒ Object
-
#initialize(m = 2, t = 8) ⇒ Ldhlda
constructor
A new instance of Ldhlda.
Methods inherited from Instruction
Constructor Details
#initialize(m = 2, t = 8) ⇒ Ldhlda
Returns a new instance of Ldhlda.
107 108 109 |
# File 'lib/gbrb/instruction_set/ld.rb', line 107 def initialize m=2, t=8 super end |
Instance Method Details
#call(r, mem) ⇒ Object
111 112 113 114 |
# File 'lib/gbrb/instruction_set/ld.rb', line 111 def call r, mem mem.write_byte r.hl.read, r.a.read r.hl.store r.hl.read - 1 end |