From 532c6e7edbe67d5693131a2ca4e020fe11adb258 Mon Sep 17 00:00:00 2001 From: Nik Henson Date: Wed, 7 Sep 2011 07:36:08 +0000 Subject: [PATCH] Added method to fetch current PC value --- Src/CPU/Z80/Z80.cpp | 5 +++++ Src/CPU/Z80/Z80.h | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/Src/CPU/Z80/Z80.cpp b/Src/CPU/Z80/Z80.cpp index 85985db..8c72d4b 100644 --- a/Src/CPU/Z80/Z80.cpp +++ b/Src/CPU/Z80/Z80.cpp @@ -3742,6 +3742,11 @@ void CZ80::SetINT(BOOL state) intLine = state; } +UINT16 CZ80::GetPC(void) +{ + return pc; +} + void CZ80::Reset(void) { pc = 0x0000; diff --git a/Src/CPU/Z80/Z80.h b/Src/CPU/Z80/Z80.h index be7f0cb..1592587 100644 --- a/Src/CPU/Z80/Z80.h +++ b/Src/CPU/Z80/Z80.h @@ -109,6 +109,16 @@ public: */ void SetINT(BOOL state); + /* + * GetPC(void): + * + * Returns the current PC value. + + * Returns: + * Current value of PC register. + */ + UINT16 GetPC(void); + /* * Reset(void): *