From 095d90776e3882eff49a2d42fbda425f76182c96 Mon Sep 17 00:00:00 2001 From: mykola2312 <49044616+mykola2312@users.noreply.github.com> Date: Thu, 25 Jul 2024 03:53:45 +0300 Subject: [PATCH] add another 16 bit real mode filter --- genc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/genc.py b/genc.py index 25f5d73..fa9174f 100644 --- a/genc.py +++ b/genc.py @@ -21,6 +21,9 @@ class OpCode: return f"\topcode {self.opcode} args {self.args} op_enc {self.operand_encoding}" class Instruction: + SKIP_16BIT_REALMODE = ["rel16", "ptr16:16"] + + def __init__(self, common): self.brief = common.find("brief").text @@ -41,7 +44,7 @@ class Instruction: self.opcodes.append(OpCode(ins, operand_encodings)) # remove 16 bit real mode displacement value opcodes - self.opcodes = list(filter(lambda op: op.args != "rel16", self.opcodes)) + self.opcodes = list(filter(lambda op: op.args not in Instruction.SKIP_16BIT_REALMODE, self.opcodes)) def parse_file(path):