Class: GBRb::InstructionSet::Cpl

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

Instance Attribute Summary

Attributes inherited from Instruction

#i, #m, #t

Instance Method Summary collapse

Methods inherited from Instruction

#carry?, #immediate_count, #initialize

Constructor Details

This class inherits a constructor from GBRb::InstructionSet::Instruction

Instance Method Details

#call(r, mem) ⇒ Object



6
7
8
9
10
# File 'lib/gbrb/instruction_set/cpl.rb', line 6

def call r, mem
  r.set_add_sub_flag
  r.set_half_carry_flag
  r.a.store r.a.read ^ 0xff
end