Z80 disassembler for Linux

From: Stan Sieler <sieler_at_allegro.com>
Date: Tue Apr 13 18:30:22 2004

Tom writes:
> COMMENTS!? I'd like to see a disassembler comment code! Humans
> even are areally bad at this...

Ok...you ask, you receive...from a PA-RISC disassembler:

 offset instruct instruction disassembled comments
 ------ -------- ------------------------ --------
...
 460c: 48212691 LDW -3256(0,r1),r1 ; [W r1-3256]
 4610: 483f0078 LDW 60(0,r1),r31 ; [W [W r1-3256]+60]
...
 61a0: 0a7f0414 SUB r31,r19,r20 ; ([W sp-80]) - ([W sp-64])
...
 643c: e7e02938 BLE 1180(4,r31) ; P_2c49c
 6440: 081f0242 COPY r31,rp ; $00006444
   ; r26 = $00045c20 --> $00000000
   ; r25 = $0003c72c --> $48454c50 ("HELP")

The first comment is fairly obvious, the second is a bit more
sophisticated. The comment "[W xxx]" means "32-bit word loaded from
memory at address xxx". Thus, we see that the instruction at offset
4610 is a load via a pointer.

The comment on 61a0 is useful in many cases.

The last section (starting at offset 643c) shows a procedure call to
an as-yet-unnamed procedure (temporarily called P_2c49c), passing
two parameters (code to load the parameters not shown above). The
first parameter (in r26) is the constant 0, loaded from memory (which
is unusual), the second parameter (in r25) is the integer constant
corresponding to the ASCII characters "HELP" (big-endian machine, BTW).

Stan
-- 
Stan Sieler
sieler_at_allegro.com
www.allegro.com/sieler/wanted/index.html 
Received on Tue Apr 13 2004 - 18:30:22 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:29 BST