From 31075fd0b9de7e0d8fbf0fe2b32100c5a10c8f89 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Thu, 17 Dec 2015 00:52:47 +0100 Subject: [PATCH] Moved opcodes into their own file. Now the format is crazy extensible. --- infernal.py | 51 +++-------------------------- opcodes.py | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 98 insertions(+), 47 deletions(-) create mode 100644 opcodes.py diff --git a/infernal.py b/infernal.py index 8777788..f4d5afe 100644 --- a/infernal.py +++ b/infernal.py @@ -2,6 +2,8 @@ import re import sys +from opcodes import OPCODES + REGISTERS=["%rax", "%rbx", "%rcx", "%rdx", "%rsp", "%rbp", "%rsi", "%rdi", "%r8", "%r9", "%r10", "%r11", "%r12", "%r13", "%r14", "%r15"] REG_STATUS_TO_COLOR = { @@ -127,6 +129,7 @@ class Emulator: self.status["g"] = val1>val2 self.status["l"] = val1