aboutsummaryrefslogtreecommitdiffstats
path: root/asm/ffi.py
diff options
context:
space:
mode:
authorGravatar Peter McGoron 2023-02-11 21:24:48 +0000
committerGravatar Peter McGoron 2023-02-11 21:24:48 +0000
commitb425e26ea3ff2df3f6b98b475ae870900efaf2e6 (patch)
treed134435547ee287f23b237b4be0c14bd353d87a7 /asm/ffi.py
parentrename idiv to sdiv (diff)
jump tests
Diffstat (limited to 'asm/ffi.py')
-rw-r--r--asm/ffi.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/asm/ffi.py b/asm/ffi.py
index 4c1ca15..ba327bf 100644
--- a/asm/ffi.py
+++ b/asm/ffi.py
@@ -120,13 +120,15 @@ class Environment:
def syscall(self, sc):
raise InvalidSyscallError(sc)
- def __call__(self):
+ def __call__(self, debug=False):
sc = c_size_t()
ret = RunRet.CONTINUE
while not ret.is_halt():
ret = RunRet(dll.creole_step(byref(self.cenv), byref(sc)))
if ret == RunRet.SYSCALL:
self.syscall(sc)
+ if debug:
+ print(self.cenv.reg[0])
return ret
class CParseLineException(Exception):