mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-04 10:44:37 +00:00
Starting the SBC instruction
This commit is contained in:
+2
-1
@@ -393,7 +393,6 @@ namespace ComSquare::CPU
|
|||||||
//! @brief Return from Interrupt - Used to return from a interrupt handler.
|
//! @brief Return from Interrupt - Used to return from a interrupt handler.
|
||||||
void RTI();
|
void RTI();
|
||||||
//! @brief Add with carry - Adds operand to the Accumulator; adds an additional 1 if carry is set.
|
//! @brief Add with carry - Adds operand to the Accumulator; adds an additional 1 if carry is set.
|
||||||
//! @return The number of extra cycles that this operation took.
|
|
||||||
void ADC(uint24_t valueAddr);
|
void ADC(uint24_t valueAddr);
|
||||||
//! @brief Store the accumulator to memory.
|
//! @brief Store the accumulator to memory.
|
||||||
void STA(uint24_t addr);
|
void STA(uint24_t addr);
|
||||||
@@ -461,6 +460,8 @@ namespace ComSquare::CPU
|
|||||||
void XCE();
|
void XCE();
|
||||||
//! @brief And accumulator with memory.
|
//! @brief And accumulator with memory.
|
||||||
void AND(uint24_t valueAddr);
|
void AND(uint24_t valueAddr);
|
||||||
|
//! @brief Subtract with Borrow from Accumulator.
|
||||||
|
void SBC(uint24_t valueAddr);
|
||||||
public:
|
public:
|
||||||
explicit CPU(std::shared_ptr<Memory::MemoryBus> bus, Cartridge::Header &cartridgeHeader);
|
explicit CPU(std::shared_ptr<Memory::MemoryBus> bus, Cartridge::Header &cartridgeHeader);
|
||||||
CPU(const CPU &) = default;
|
CPU(const CPU &) = default;
|
||||||
|
|||||||
@@ -26,4 +26,9 @@ namespace ComSquare::CPU
|
|||||||
this->_registers.p.z = this->_registers.a == 0;
|
this->_registers.p.z = this->_registers.a == 0;
|
||||||
this->_registers.p.n = this->_registers.a & negativeMask;
|
this->_registers.p.n = this->_registers.a & negativeMask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CPU::SBC(uint24_t valueAddr)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user