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