Ensure we use the pre-constructed I/O ports object.

Signed-off-by: Adrian.Conlon <adrian.conlon@gmail.com>
This commit is contained in:
Adrian.Conlon 2017-06-04 22:59:56 +01:00
parent 786249a25e
commit 3325b07a28
2 changed files with 3 additions and 2 deletions

View File

@ -65,7 +65,7 @@ namespace EightBit {
int step();
private:
InputOutput m_ports;
InputOutput& m_ports;
std::array<Instruction, 0x100> instructions;

View File

@ -8,7 +8,8 @@ EightBit::Intel8080::Intel8080(Memory& memory, InputOutput& ports)
: Processor(memory),
a(0),
f(0),
m_interrupt(false) {
m_interrupt(false),
m_ports(ports) {
bc.word = de.word = hl.word = 0;
installInstructions();
}