From 07018389507e790963f06348083796b650510592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoffer=20M=C3=BCller=20Madsen?= Date: Wed, 16 Dec 2015 22:20:33 +0100 Subject: [PATCH 1/2] Added checks in compareVal to set status-keys l and e to signify respectively 'lower than' and 'equal to'. Added the following control flow operations: * jl (less than) * je (equal to) * jge (greater than or equal to) * jle (less than or equal to) * jne (not equal to) --- infernal.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/infernal.py b/infernal.py index 17094b5..2255d23 100644 --- a/infernal.py +++ b/infernal.py @@ -123,8 +123,9 @@ class Emulator: def compareVal (self, valT1, valT2): val1 = self.getVal(valT2) val2 = self.getVal(valT1) - self.status = {"g":val1>val2} - + self.status["g"] = val1>val2 + self.status["l"] = val1 Date: Wed, 16 Dec 2015 22:20:33 +0100 Subject: [PATCH 2/2] Additional compare status flags added. Five new compare ops. Added checks in compareVal to set status-keys l and e to signify respectively 'lower than' and 'equal to'. Added the following control flow operations: * jl (less than) * je (equal to) * jge (greater than or equal to) * jle (less than or equal to) * jne (not equal to) --- infernal.py | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/infernal.py b/infernal.py index 17094b5..2255d23 100644 --- a/infernal.py +++ b/infernal.py @@ -123,8 +123,9 @@ class Emulator: def compareVal (self, valT1, valT2): val1 = self.getVal(valT2) val2 = self.getVal(valT1) - self.status = {"g":val1>val2} - + self.status["g"] = val1>val2 + self.status["l"] = val1