Class: Amaterasu::GameBoy::Cpu::Instructions::CbSet
- Includes:
- Utils::BitOps
- Defined in:
- lib/amaterasu/game_boy/cpu/instructions/cb_set.rb
Overview
Holds the logic of all the SET instructions.
-
SET u3, r8
-
SET u3, [HL]
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(cpu:, bit_pos:, target:) ⇒ CbSet
constructor
Creates a new CbSet object containing the mnemonic (String) and logic (Proc).
Methods included from Utils::BitOps
Methods inherited from Base
Constructor Details
#initialize(cpu:, bit_pos:, target:) ⇒ CbSet
Creates a new CbSet object containing the mnemonic (String) and logic (Proc).
15 16 17 18 19 20 |
# File 'lib/amaterasu/game_boy/cpu/instructions/cb_set.rb', line 15 def initialize(cpu:, bit_pos:, target:) super(cpu:) @mnemonic = "SET #{bit_pos}, #{format_operand(target)}" @logic = build_logic(bit_pos, target) end |