Class: Amaterasu::GameBoy::Cpu::Instructions::Call
- Defined in:
- lib/amaterasu/game_boy/cpu/instructions/call.rb
Overview
Holds the logic of all the CALL instructions.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(cpu:, condition: nil) ⇒ Call
constructor
Creates a Call instruction object with a mnemonic and logic to be executed.
Methods inherited from Base
Constructor Details
#initialize(cpu:, condition: nil) ⇒ Call
Creates a Call instruction object with a mnemonic and logic to be executed.
10 11 12 13 14 15 |
# File 'lib/amaterasu/game_boy/cpu/instructions/call.rb', line 10 def initialize(cpu:, condition: nil) super(cpu:) @mnemonic = "CALL #{format_operand(condition)}, imm16" @logic = build_logic(condition) end |