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