summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2003-12-24 18:19:00 +0000
committerIan C <ianc@noddybox.co.uk>2003-12-24 18:19:00 +0000
commit6a86fc4668ce7e213330bb78aff45c578e159f54 (patch)
tree360d7295ff108f6408ab740ff297fb99468faa08 /src/main.c
parent33dfea1c74749124379ef8052f0689577ebe68ff (diff)
devel snapshot
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index e69eb77..c97aab3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -91,8 +91,19 @@ int main(int argc, char *argv[])
while(!quit)
{
+ Z80State s1,s2;
+
+ Z80GetState(z80,&s1);
Z80SingleStep(z80);
+ Z80GetState(z80,&s2);
+
+ if (s2.PC>0x3fff)
+ {
+ printf("PC > 0x3fff - from 0x%4.4x\n",s1.PC);
+ return 0;
+ }
+
if (trace)
{
DisplayState(z80);