2018-08-17 20:53:49 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Processor.h"
|
|
|
|
|
|
|
|
namespace EightBit {
|
2020-04-06 22:11:21 +00:00
|
|
|
|
|
|
|
class Bus;
|
|
|
|
|
2018-08-17 20:53:49 +00:00
|
|
|
class LittleEndianProcessor : public Processor {
|
2018-08-27 10:27:33 +00:00
|
|
|
public:
|
2020-05-03 19:29:18 +00:00
|
|
|
~LittleEndianProcessor() = default;
|
2018-11-27 22:36:54 +00:00
|
|
|
|
2020-11-07 09:41:12 +00:00
|
|
|
[[nodiscard]] register16_t peekWord(register16_t address) final;
|
2018-11-27 22:36:54 +00:00
|
|
|
void pokeWord(register16_t address, register16_t value) final;
|
2018-08-27 10:27:33 +00:00
|
|
|
|
2018-08-17 20:53:49 +00:00
|
|
|
protected:
|
2018-08-25 21:51:56 +00:00
|
|
|
LittleEndianProcessor(Bus& memory);
|
2018-08-17 20:53:49 +00:00
|
|
|
|
2021-01-02 11:49:34 +00:00
|
|
|
[[nodiscard]] register16_t getWord() override;
|
2018-11-27 22:36:54 +00:00
|
|
|
void setWord(register16_t value) override;
|
2018-08-17 20:53:49 +00:00
|
|
|
|
2021-01-02 11:49:34 +00:00
|
|
|
[[nodiscard]] register16_t getWordPaged(uint8_t page, uint8_t offset) override;
|
2018-11-27 22:36:54 +00:00
|
|
|
void setWordPaged(uint8_t page, uint8_t offset, register16_t value) override;
|
2018-08-17 20:53:49 +00:00
|
|
|
|
2021-01-02 11:49:34 +00:00
|
|
|
[[nodiscard]] register16_t fetchWord() final;
|
2018-08-17 20:53:49 +00:00
|
|
|
|
2019-12-29 13:03:44 +00:00
|
|
|
void pushWord(register16_t value) override;
|
2021-01-02 11:49:34 +00:00
|
|
|
[[nodiscard]] register16_t popWord() override;
|
2018-08-17 20:53:49 +00:00
|
|
|
};
|
|
|
|
}
|