Class: GBRb::InstructionSet::Ldca

Inherits:
Instruction show all
Defined in:
lib/gbrb/instruction_set/ld.rb

Instance Attribute Summary

Attributes inherited from Instruction

#i, #m, #t

Instance Method Summary collapse

Methods inherited from Instruction

#carry?, #immediate_count

Constructor Details

#initialize(m = 2, t = 8) ⇒ Ldca

Returns a new instance of Ldca.



141
142
143
# File 'lib/gbrb/instruction_set/ld.rb', line 141

def initialize m=2, t=8
  super m, t
end

Instance Method Details

#call(r, mem) ⇒ Object



145
146
147
# File 'lib/gbrb/instruction_set/ld.rb', line 145

def call r, mem
  mem.write_byte r.c.read + 0xff00, r.a.read
end