Class: Amaterasu::GameBoy::Cpu::Instructions::Pop

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

Overview

Holds the logic of all the POP instructions.

Instance Attribute Summary

Attributes inherited from Base

#mnemonic

Instance Method Summary collapse

Methods inherited from Base

#execute

Constructor Details

#initialize(cpu:, reg16:) ⇒ Pop

Creates a Pop instruction object with a mnemonic and logic to be executed.



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

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

  @mnemonic = "POP #{format_operand(reg16)}"
  @logic    = build_logic(reg16)
end