Class: Amaterasu::GameBoy::Cpu::Instructions::Rst
- Defined in:
- lib/amaterasu/game_boy/cpu/instructions/rst.rb
Overview
Holds the logic of all the RST instructions.
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(cpu:, vector:) ⇒ Rst
constructor
Creates a Call instruction object with a mnemonic and logic to be executed.
Methods inherited from Base
Constructor Details
#initialize(cpu:, vector:) ⇒ Rst
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/rst.rb', line 10 def initialize(cpu:, vector:) super(cpu:) @mnemonic = "RST $#{format('%02X', vector)}" @logic = -> { rst(vector) } end |