summaryrefslogtreecommitdiff
path: root/romstr.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2012-06-07 01:37:55 -0500
committerBryan Bishop <kanzure@gmail.com>2012-06-07 01:37:55 -0500
commit5727b4e9ac09a41ccfdb5d4df1b3b10cd07e3160 (patch)
treefdb03baf1f2cf5e09ebf728bc6b18a4135551407 /romstr.py
parent3d231ef1a4c5329bb692efe61b7f409e13fac5f3 (diff)
sleepy disassembling
original-commit-id: 3233cead330abefa6d9d266f5dd5de5b58622901
Diffstat (limited to 'romstr.py')
-rw-r--r--romstr.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/romstr.py b/romstr.py
index a121d9c..cf17c22 100644
--- a/romstr.py
+++ b/romstr.py
@@ -182,7 +182,6 @@ class Asm:
byte_labels[offset]["name"] = line_label
byte_labels[offset]["usage"] = 0
byte_labels[offset]["definition"] = True
- output += .. add label here (well, not really)
#find out if there's a two byte key like this
temp_maybe = maybe_byte
@@ -214,7 +213,8 @@ class Asm:
current_byte_number += 2
offset += 2
-
+
+ asm_commands.append({"address": offset, "command": opstr})
output += spacing + opstr #+ " ; " + hex(offset)
output += "\n"
@@ -345,17 +345,13 @@ class Asm:
#offset += 1
#current_byte_number += 1
- #clean up unused labels
+ # clean up unused labels.. used to be in 'output', but is now in asm_commands
for label_line in byte_labels.keys():
address = label_line
label_line = byte_labels[label_line]
if label_line["usage"] == 0:
output = output.replace((label_line["name"] + "\n").lower(), "")
-
- #add the offset of the final location
- output += "; " + hex(offset)
-
- return (output, offset, last_hl_address, last_a_address, used_3d97)
+ raise NotImplementedError
def __str__(self):
""" ASM pretty printer.