You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
sleepy disassembling
This commit is contained in:
@@ -182,7 +182,6 @@ class Asm:
|
|||||||
byte_labels[offset]["name"] = line_label
|
byte_labels[offset]["name"] = line_label
|
||||||
byte_labels[offset]["usage"] = 0
|
byte_labels[offset]["usage"] = 0
|
||||||
byte_labels[offset]["definition"] = True
|
byte_labels[offset]["definition"] = True
|
||||||
output += .. add label here (well, not really)
|
|
||||||
|
|
||||||
#find out if there's a two byte key like this
|
#find out if there's a two byte key like this
|
||||||
temp_maybe = maybe_byte
|
temp_maybe = maybe_byte
|
||||||
@@ -215,6 +214,7 @@ class Asm:
|
|||||||
current_byte_number += 2
|
current_byte_number += 2
|
||||||
offset += 2
|
offset += 2
|
||||||
|
|
||||||
|
asm_commands.append({"address": offset, "command": opstr})
|
||||||
output += spacing + opstr #+ " ; " + hex(offset)
|
output += spacing + opstr #+ " ; " + hex(offset)
|
||||||
output += "\n"
|
output += "\n"
|
||||||
|
|
||||||
@@ -345,17 +345,13 @@ class Asm:
|
|||||||
#offset += 1
|
#offset += 1
|
||||||
#current_byte_number += 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():
|
for label_line in byte_labels.keys():
|
||||||
address = label_line
|
address = label_line
|
||||||
label_line = byte_labels[label_line]
|
label_line = byte_labels[label_line]
|
||||||
if label_line["usage"] == 0:
|
if label_line["usage"] == 0:
|
||||||
output = output.replace((label_line["name"] + "\n").lower(), "")
|
output = output.replace((label_line["name"] + "\n").lower(), "")
|
||||||
|
raise NotImplementedError
|
||||||
#add the offset of the final location
|
|
||||||
output += "; " + hex(offset)
|
|
||||||
|
|
||||||
return (output, offset, last_hl_address, last_a_address, used_3d97)
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
""" ASM pretty printer.
|
""" ASM pretty printer.
|
||||||
|
Reference in New Issue
Block a user