Class: Amaterasu::GameBoy::Cpu::Instructions::Inc
- Defined in:
- lib/amaterasu/game_boy/cpu/instructions/inc.rb
Overview
Holds the logic of all the INC (Increment) instructions.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(cpu:, operand:) ⇒ Inc
constructor
A new instance of Inc.
Methods inherited from Base
Constructor Details
#initialize(cpu:, operand:) ⇒ Inc
Returns a new instance of Inc.
9 10 11 12 13 14 |
# File 'lib/amaterasu/game_boy/cpu/instructions/inc.rb', line 9 def initialize(cpu:, operand:) super(cpu:) @mnemonic = "INC #{format_operand(operand)}" @logic = build_logic(operand) end |