Class: GBRb::InstructionSet::Ldahld
- Inherits:
-
Instruction
- Object
- Instruction
- GBRb::InstructionSet::Ldahld
- 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) ⇒ Ldahld
constructor
A new instance of Ldahld.
Methods inherited from Instruction
Constructor Details
#initialize(m = 2, t = 8) ⇒ Ldahld
Returns a new instance of Ldahld.
96 97 98 |
# File 'lib/gbrb/instruction_set/ld.rb', line 96 def initialize m=2, t=8 super end |
Instance Method Details
#call(r, mem) ⇒ Object
100 101 102 103 |
# File 'lib/gbrb/instruction_set/ld.rb', line 100 def call r, mem r.a.store mem.read_byte r.hl.read r.hl.store r.hl.read - 1 end |