diff options
author | yenatch <yenatch@gmail.com> | 2013-05-14 21:50:43 -0400 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2013-05-15 14:39:42 -0400 |
commit | 13c2378a8075fc294bd8cf84e4bce4acd4c35c0d (patch) | |
tree | ae2893345b644b06c9df36910f5c8b518c16e0af /gbz80disasm.py | |
parent | 66b9c8877d2d60228c463fc5cccbc16a9b799e52 (diff) |
gbz80disasm: space out blocks of asm
original-commit-id: 3cf6603b455530fa0c17e946118484a0126e2bf9
Diffstat (limited to 'gbz80disasm.py')
-rw-r--r-- | gbz80disasm.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gbz80disasm.py b/gbz80disasm.py index dd69be2..354490e 100644 --- a/gbz80disasm.py +++ b/gbz80disasm.py @@ -635,6 +635,7 @@ def output_bank_opcodes(original_offset, max_byte_count=0x4000, include_last_add if offset in byte_labels.keys(): line_label = byte_labels[offset]["name"] byte_labels[offset]["usage"] += 1 + output += "\n" else: line_label = asm_label(offset) byte_labels[offset] = {} @@ -819,6 +820,9 @@ def output_bank_opcodes(original_offset, max_byte_count=0x4000, include_last_add #offset += 1 #current_byte_number += 1 + if current_byte in relative_unconditional_jumps + end_08_scripts_with: + output += "\n" + first_loop = False #clean up unused labels @@ -828,6 +832,9 @@ def output_bank_opcodes(original_offset, max_byte_count=0x4000, include_last_add if label_line["usage"] == 0: output = output.replace((label_line["name"] + "\n").lower(), "") + #tone down excessive spacing + output = output.replace("\n\n\n","\n\n") + #add the offset of the final location if include_last_address: output += "; " + hex(offset) |