Class: Amaterasu::GameBoy::Cpu::Instructions::Misc

Inherits:
Base
  • Object
show all
Defined in:
lib/amaterasu/game_boy/cpu/instructions/misc.rb

Overview

Holds the logic for CPL, SCF and CCF instructions.

Instance Attribute Summary

Attributes inherited from Base

#mnemonic

Instance Method Summary collapse

Methods inherited from Base

#execute

Constructor Details

#initialize(cpu:, operation:) ⇒ Misc

Returns a new instance of Misc.



9
10
11
12
13
14
# File 'lib/amaterasu/game_boy/cpu/instructions/misc.rb', line 9

def initialize(cpu:, operation:)
  super(cpu:)

  @mnemonic = format_operand(operation)
  @logic    = build_logic(operation)
end