Class: GBRb::CPU::Xor

Inherits:
Boolean show all
Defined in:
lib/gbrb/cpu/instruction.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(target, m = 1, t = 4, indirect = false, immediates = 0) ⇒ Xor

Returns a new instance of Xor.



483
484
485
486
# File 'lib/gbrb/cpu/instruction.rb', line 483

def initialize target, m=1, t=4, indirect=false, immediates=0
  @op = :^
  super
end

Instance Method Details

#call(r, mem, right_value = nil) ⇒ Object



488
489
490
491
# File 'lib/gbrb/cpu/instruction.rb', line 488

def call r, mem, right_value=nil
  super
  r.clear_half_carry_flag
end