mirror of
https://github.com/MoleskiCoder/EightBit.git
synced 2026-10-24 20:02:21 +00:00
Start adding comparison operations to EightBit classes
This commit is contained in:
1 parent
af7679505c
commit
945fcefb36
16 files changed
+154
-34
No files matched your search
+18
-1
@@ -13,11 +13,16 @@ EightBit::IntelProcessor::IntelProcessor(Bus& bus)
|
||||
RaisedHALT.connect([this](EventArgs) noexcept { ++PC(); });
|
||||
|
||||
RaisedPOWER.connect([this](EventArgs) {
|
||||
PC() = SP() = AF() = BC() = DE() = HL() = Mask16;
|
||||
PC() = SP() = Mask16;
|
||||
resetWorkingRegisters();
|
||||
raiseHALT();
|
||||
});
|
||||
}
|
||||
|
||||
void EightBit::IntelProcessor::resetWorkingRegisters() {
|
||||
AF() = BC() = DE() = HL() = Mask16;
|
||||
}
|
||||
|
||||
DEFINE_PIN_LEVEL_CHANGERS(HALT, IntelProcessor);
|
||||
|
||||
void EightBit::IntelProcessor::handleRESET() {
|
||||
@@ -85,3 +90,15 @@ void EightBit::IntelProcessor::ret() {
|
||||
Processor::ret();
|
||||
MEMPTR() = PC();
|
||||
}
|
||||
|
||||
bool EightBit::IntelProcessor::operator==(const EightBit::IntelProcessor& rhs) const {
|
||||
return
|
||||
Processor::operator==(rhs)
|
||||
&& HALT() == rhs.HALT()
|
||||
&& MEMPTR() == rhs.MEMPTR()
|
||||
&& SP() == rhs.SP()
|
||||
&& AF() == rhs.AF()
|
||||
&& BC() == rhs.BC()
|
||||
&& DE() == rhs.DE()
|
||||
&& HL() == rhs.HL();
|
||||
}
|
||||
Reference in new issue
Block a user