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