Class: GBRb::InstructionSet::And

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) ⇒ And

Returns a new instance of And.



27
28
29
30
# File 'lib/gbrb/instruction_set/boolean.rb', line 27

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

Instance Method Details

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



32
33
34
35
# File 'lib/gbrb/instruction_set/boolean.rb', line 32

def call r, mem, v=nil
  super
  r.set_half_carry_flag
end