Need Guru's help...

ZXNet echo conference «code.zx»

From Alexandr Sinyakov To All 26 February 2007

Hello, valker val> Imho; no way.; No, somehow it’s possible. You need to check the byte back like this, for example, 10 is the previous one check the byte for a 1-byte command, before it - for a 2-byte one, even before it - to 3-byte. The last one that matches will be the previous command.

From Yuri Potapov To All 26 February 2007

Hello, valker maximum instruction length in z80 4 bytes from this you can count - test -4 = 4 byte command? if not then test -3 = 3 byte command? etc.

From valker To All 26 February 2007

Hello, Strunov Str> There is a disassembler program. How to organize scrolling up. Str> More precisely, how to determine the number of bytes in the command coming from above?? Imho; no way.;

From valker To All 26 February 2007

Hello, valker val> Imho; no way.; Let me clarify, in the general case - no way. We step back 1 byte - there is a command - but not the fact that this is exactly it (possibly part of the data), we step back 2 bytes - there command with 1 byte parameter (or 2 byte command), step by 3 bytes back - there is a command with a 2-byte parameter or a 3-byte command. Automatically decide which of the 3 is correct without analyzing the progress program is impossible. Analysis may be difficult (for example, transitions along calculated addresses, when the data for calculations becomes known only at stage of the program).

From Vitaly Gavrilov To All 26 February 2007

Hello, valker The simplest way is to step back a certain number of bytes (~4) and try to disassemble (that is, determine the length of the command). If between the end of this disassembled command and the beginning of the current line is not gap, then we consider that we have received the address. Otherwise, we try to disassemble one byte further. But this method is inaccurate (IMHO it is used in STS). The most accurate way is to disassemble several instructions back. Also we step back a certain number of bytes (~16) and try to disassemble several commands until we reach the original one (without overlaps or gaps). Otherwise, we walk forward one byte. This is used in the US. If the program is unmodified (it’s in ROM or something) and the disasm is on a powerful machine is done, then you can simply make a bitmap of commands and just run on her.

From Vyacheslav Strunov To All 26 February 2007

Hello, All There is a disassembler program. How to organize scrolling up. More precisely how to determine the number of bytes in the command coming from above??

From Vitaly Gavrilov To All 26 February 2007

Hello Jerry jer> maximum command length in z80 4 bytes Nope... Don't forget about duplicating/alternating index register prefixes

From Yuri Potapov To All 27 February 2007

Hello Vitamin dd fd dd fd are you talking about these? they are stacked and only the last one is taken into account and if dd cb or dd ed then there are still commands in the total of 4 bytes I wrote a tracer, I had no commands longer than 4 bytes well, or name a command like this :)

From Alexandr Sinyakov To All 27 February 2007

Hello, Strunov checking back only 4 bytes is not enough. Example... ld de,#FD00 ldhl,#FFFF (x) if you check back from point (x) - 4 bytes back it will be LD IY,#FFFF IMHO, the design with a backspace of 16 bytes is just right.

From SMT To All 27 February 2007

Hello, Strunov in general it is impossible. for example, the data in front of the cursor is 21 21 21 3E FF can be dissembled as ┌─- code ─── some_byte db 21 my_procedure ld hl,#3E21 rst #38 cursor; └──; code ─── or how ┌─- code ─── my_procedure ld hl,#2121 ld a,#FF cursor; └──; code ─── depends on whether control is ever transferred to the first byte in chain or second

From Vitaly Gavrilov To All 27 February 2007

Hello SMT Speaking of birds. Is there at least one disasm that correctly decodes calculator commands?

From Vitaly Gavrilov To All 27 February 2007

Hello Jerry jer> dd fd dd fd are you talking about these? they are stacked and only the last one is taken into account jer> jer> and if dd cb or dd ed then there are still commands in the total of 4 bytes jer> I wrote a tracer; I had no commands longer than 4 bytes jer> jer> or name this command This is exactly what it’s about. They are joined, the last one is taken into account, but still the length of the command consists of the sum of ALL prefixes. And only in such cases, in all others just 4 bytes..

From Vyacheslav Strunov To All 27 February 2007

Hello, Jukov Juk> For what purpose are you interested, if it’s not a secret? I want to write a disassembler...

From Konstantin Zhukov To All 27 February 2007

Hello, Strunov Str> There is a disassembler program. How to organize scrolling up. Str> More precisely, how to determine the number of bytes in the command coming from above?? For what purpose are you interested, if it’s not a secret?