From 3325b07a28f4183e3aa1b5d145188cdb9b542271 Mon Sep 17 00:00:00 2001 From: "Adrian.Conlon" Date: Sun, 4 Jun 2017 22:59:56 +0100 Subject: [PATCH] Ensure we use the pre-constructed I/O ports object. Signed-off-by: Adrian.Conlon --- Intel8080/inc/Intel8080.h | 2 +- Intel8080/src/Intel8080.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Intel8080/inc/Intel8080.h b/Intel8080/inc/Intel8080.h index 368da3c..d75da2a 100644 --- a/Intel8080/inc/Intel8080.h +++ b/Intel8080/inc/Intel8080.h @@ -65,7 +65,7 @@ namespace EightBit { int step(); private: - InputOutput m_ports; + InputOutput& m_ports; std::array instructions; diff --git a/Intel8080/src/Intel8080.cpp b/Intel8080/src/Intel8080.cpp index 6350ff6..57c047d 100644 --- a/Intel8080/src/Intel8080.cpp +++ b/Intel8080/src/Intel8080.cpp @@ -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(); }