Is the disassembler discontinued

Other misc things
Post Reply
MikeLynx
New member
Posts: 3
Joined: Thu Feb 25, 2021 10:52 am

Is the disassembler discontinued

Post by MikeLynx »

I have discovered a bug in the disassembler and I was just wondering if the disassembler is still active or discontinued, and whether I need to submit a new issue on github?

The issue is that the disassembler is producing the following statements:

LD (IX+$04),$00
LD (IX+$04),$01
LD (IX-$01),$02

whereas it should be outputting:

LD (IX+$00),$04
LD (IX+$01),$04
LD (IX+$02),$0FF

(the operands have been flipped)

Thanks,

Mike.
User avatar
dom
Well known member
Posts: 1469
Joined: Sun Jul 15, 2007 10:01 pm

Re: Is the disassembler discontinued

Post by dom »

Which disassembler are you referring to? I've just checked z88dk-dis and it seems to be handling these correctly.
MikeLynx
New member
Posts: 3
Joined: Thu Feb 25, 2021 10:52 am

Re: Is the disassembler discontinued

Post by MikeLynx »

dom wrote: Mon Oct 11, 2021 7:12 pm Which disassembler are you referring to? I've just checked z88dk-dis and it seems to be handling these correctly.
OK. Thanks. I'll investigate my version further and report back...perhaps I need a refresh?
User avatar
dom
Well known member
Posts: 1469
Joined: Sun Jul 15, 2007 10:01 pm

Re: Is the disassembler discontinued

Post by dom »

MikeLynx wrote: Mon Oct 11, 2021 10:39 pmOK. Thanks. I'll investigate my version further and report back...perhaps I need a refresh?
I don't think it's ever been broken which is odd.

Code: Select all

% cat test.asm
	ld	(ix+10),2
	ld	(ix-20),$dd
	
% hexdump test.bin
0000000 dd 36 0a 02 dd 36 ec dd

% z88dk-dis test.bin
                    ld      (ix+$0a),$02                    ;[0000] dd 36 0a 02
                    ld      (ix-$14),$dd                    ;[0004] dd 36 ec dd	
stefano
Well known member
Posts: 1695
Joined: Mon Jul 16, 2007 7:39 pm

Re: Is the disassembler discontinued

Post by stefano »

could Mike be disassembling zx81 code? That -ixiy swap trick is sometimes confusing.
MikeLynx
New member
Posts: 3
Joined: Thu Feb 25, 2021 10:52 am

Re: Is the disassembler discontinued

Post by MikeLynx »

Ok, sorry for the delay in getting back to this. These are my steps. My assembly file is as follows:

Code: Select all

LD (IX+$00),$04
LD (IX+$01),$04
LD (IX+$02),$0FF
I assemble it using the command:

Code: Select all

z88dk-z80asm -mz80 -b test.asm
This produces a test.bin file, which I disassemble using:

Code: Select all

z88dk-dis -mz80 test.bin
Which produces this:

Code: Select all

                    ld      (ix+$04),$00                    ;[0000] dd 36 00 04
                    ld      (ix+$04),$01                    ;[0004] dd 36 01 04
                    ld      (ix-$01),$02                    ;[0008] dd 36 02 ff
Unfortunately, as you can see, the opcodes are swapped. My z88dk install is dated 24/03/2021. I don't recall if I downloaded my binaries or built from source code.

Strange. Thanks.
Post Reply