From 2d64967f2edea6e668ce8f1d31297150023ea52c Mon Sep 17 00:00:00 2001 From: Niles Rogoff Date: Sun, 2 Jul 2017 14:27:00 -0700 Subject: [PATCH] Add warning message --- emulator.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/emulator.py b/emulator.py index 9e18cab..2d8bf43 100644 --- a/emulator.py +++ b/emulator.py @@ -90,4 +90,6 @@ while True: elif len(instruction) != 0: print("Found suspiciously long instruction \"" + " ".join(instruction) + "\"") rs["ip"] += 1 +if rs["sp"] != 0: + print("WARNING - Stack was not empty at program exit") debug()