Class: GBRb::InstructionSet::Sub
- Inherits:
-
Arithmetic
- Object
- Instruction
- Arithmetic
- GBRb::InstructionSet::Sub
- Defined in:
- lib/gbrb/instruction_set/arithmetic.rb
Instance Attribute Summary
Attributes inherited from Instruction
Instance Method Summary collapse
- #call(r, mem, right_value = nil) ⇒ Object
-
#initialize(target, m = 1, t = 4, indirect = false, immediates = 0) ⇒ Sub
constructor
A new instance of Sub.
Methods inherited from Arithmetic
Methods inherited from Instruction
Constructor Details
#initialize(target, m = 1, t = 4, indirect = false, immediates = 0) ⇒ Sub
Returns a new instance of Sub.
102 103 104 105 |
# File 'lib/gbrb/instruction_set/arithmetic.rb', line 102 def initialize target, m=1, t=4, indirect=false, immediates=0 super @op = :- end |
Instance Method Details
#call(r, mem, right_value = nil) ⇒ Object
107 108 109 110 |
# File 'lib/gbrb/instruction_set/arithmetic.rb', line 107 def call r, mem, right_value=nil super r.set_add_sub_flag end |