Class: GBRb::InstructionSet::Or

Inherits:
Boolean show all
Defined in:
lib/gbrb/instruction_set/boolean.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) ⇒ Or

Returns a new instance of Or.



39
40
41
42
# File 'lib/gbrb/instruction_set/boolean.rb', line 39

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

Instance Method Details

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



44
45
46
47
# File 'lib/gbrb/instruction_set/boolean.rb', line 44

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