From 59f8d31132783439fed8a8475f17304faa8deb03 Mon Sep 17 00:00:00 2001 From: Vladimir Date: Wed, 8 Jun 2011 02:46:54 +0400 Subject: DREAMWEB: fixed offsets shifting for db/dw --- devtools/tasmrecover/tasm/parser.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'devtools/tasmrecover') diff --git a/devtools/tasmrecover/tasm/parser.py b/devtools/tasmrecover/tasm/parser.py index 3eb553fdd1..2391aa442b 100644 --- a/devtools/tasmrecover/tasm/parser.py +++ b/devtools/tasmrecover/tasm/parser.py @@ -222,8 +222,9 @@ class parser: self.set_global(cmd0, op.const(self.fix_dollar(v))) elif cmd1 == 'db' or cmd1 == 'dw' or cmd1 == 'dd': binary_width = {'b': 1, 'w': 2, 'd': 4}[cmd1[1]] + offset = len(self.binary_data) self.binary_data += self.compact_data(binary_width, lex.parse_args(" ".join(cmd[2:]))) - self.set_global(cmd0.lower(), op.var(binary_width, len(self.binary_data))) + self.set_global(cmd0.lower(), op.var(binary_width, offset)) continue elif cmd1 == 'proc': name = cmd0.lower() -- cgit v1.2.3