Skip to content

Commit b5ceaf8

Browse files
authored
Merge pull request #34 from cormacj/bugfixing
bugfix for dropped JP (IY)
2 parents 00ba1f3 + 29ccb99 commit b5ceaf8

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
2025-03-21: Bump to v0.80 - Add support for external labels, such as BIOS calls. Improved code detection methods.
44
2025-06-13: Bump to v0.85 - Add the ability to define user-defined labels to the labels file. Increased error handling, more informational messages.
55
2025-06-18: Bump to v0.87 - Corrected issues with string detection where strings weren't being properly decoded.
6+
2025-06-20: Bump to v0.89 - Bugfix for dropped `JP (IY)` instructions. Made JR decoding match the style of other jumps.

z80-disassembler.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class Pointer(NamedTuple):
9090
str_sizes = {}
9191
style = "asm"
9292
hexstyle = "0x"
93-
myversion = "0.87"
93+
myversion = "0.89"
9494

9595

9696
#--- Debugging functions ---
@@ -1722,6 +1722,17 @@ def findstring(memstart, memend):
17221722
)
17231723
program_counter += b.len
17241724
else:
1725+
#It's something like JP (IY)
1726+
tmp=z80.disasm(b)
1727+
if "+0)" in tmp:
1728+
tmp=tmp.split("+0)")[0]+")" #The code library produces a JP (IY+0) which while techically ok, isn't understood by many assemblers.
1729+
code_output(
1730+
program_counter,
1731+
tmp,
1732+
list_address,
1733+
explain.code(z80.disasm(b),explainlevel),
1734+
add_extra_info(decode_buffer),
1735+
)
17251736
program_counter += b.len
17261737
elif b.op is b.op.LD: # and b.operands[0][0] is not b.operands[0][0].REG_DEREF:
17271738
# debug("C2 - 3")

0 commit comments

Comments
 (0)