summaryrefslogtreecommitdiffstats
path: root/ue4/mycpu/ccpu.h
diff options
context:
space:
mode:
Diffstat (limited to 'ue4/mycpu/ccpu.h')
-rw-r--r--ue4/mycpu/ccpu.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/ue4/mycpu/ccpu.h b/ue4/mycpu/ccpu.h
index 519cee9..545b870 100644
--- a/ue4/mycpu/ccpu.h
+++ b/ue4/mycpu/ccpu.h
@@ -22,7 +22,7 @@
22#include "cprogram.h" 22#include "cprogram.h"
23 23
24/* forward declare CProgram */ 24/* forward declare CProgram */
25template <class T> 25template <class T=CDat<int>, int width=0>
26class CProgram; 26class CProgram;
27 27
28/** 28/**
@@ -31,7 +31,7 @@ class CProgram;
31 * CPU implementation. Used as a container for memory and instructions. 31 * CPU implementation. Used as a container for memory and instructions.
32 * Implements a run method to execute the program (= the instructions). 32 * Implements a run method to execute the program (= the instructions).
33 */ 33 */
34template <class T> 34template<class T=CDat<int>, int width=0>
35class CCPU 35class CCPU
36{ 36{
37 typedef typename std::set<CDisplay<T> *>::iterator displayiterator; 37 typedef typename std::set<CDisplay<T> *>::iterator displayiterator;
@@ -250,8 +250,8 @@ class CCPU
250 250
251/*----------------------------------------------------------------------------*/ 251/*----------------------------------------------------------------------------*/
252 252
253template <class T> 253template<class T, int width>
254CCPU<T>::CCPU(const unsigned cnt) 254CCPU<T, width>::CCPU(const unsigned cnt)
255 : m_regcnt(cnt), m_memory(NULL), m_program(NULL), m_flagzero(false), m_flagsign(false) 255 : m_regcnt(cnt), m_memory(NULL), m_program(NULL), m_flagzero(false), m_flagsign(false)
256{ 256{
257 /* create registers */ 257 /* create registers */
@@ -266,7 +266,7 @@ CCPU<T>::CCPU(const unsigned cnt)
266 266
267/*----------------------------------------------------------------------------*/ 267/*----------------------------------------------------------------------------*/
268 268
269template <class T> 269template<class T, int width>
270CCPU<T>::~CCPU() 270CCPU<T>::~CCPU()
271{ 271{
272 /* delete registers */ 272 /* delete registers */
@@ -280,7 +280,7 @@ CCPU<T>::~CCPU()
280 280
281/*----------------------------------------------------------------------------*/ 281/*----------------------------------------------------------------------------*/
282 282
283template <class T> 283template<class T, int width>
284void CCPU<T>::run() 284void CCPU<T>::run()
285{ 285{
286 if (m_memory == NULL) 286 if (m_memory == NULL)
@@ -312,7 +312,7 @@ void CCPU<T>::run()
312/*----------------------------------------------------------------------------*/ 312/*----------------------------------------------------------------------------*/
313 313
314#if DEBUG 314#if DEBUG
315template <class T> 315template<class T, int width>
316void CCPU<T>::dumpRegisters(std::ostream& out) 316void CCPU<T>::dumpRegisters(std::ostream& out)
317{ 317{
318 out << "[REGISTER DUMP]" << std::endl; 318 out << "[REGISTER DUMP]" << std::endl;