Class: Amaterasu::GameBoy::Cpu::Instructions::Cp
- Defined in:
- lib/amaterasu/game_boy/cpu/instructions/cp.rb
Overview
Handles the logic related to all possible CP instructions
-
CP A, r8
-
CP A, [HL]
-
CP A, n8
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(cpu:, source:) ⇒ Cp
constructor
A new instance of Cp.
Methods inherited from Base
Constructor Details
#initialize(cpu:, source:) ⇒ Cp
Returns a new instance of Cp.
15 16 17 18 19 20 |
# File 'lib/amaterasu/game_boy/cpu/instructions/cp.rb', line 15 def initialize(cpu:, source:) super(cpu:) @mnemonic = "CP A, #{source}" @logic = build_logic(source) end |