zobjinspect: tool for inspecting z80asm object / library files

Other misc things
Post Reply
gasman
New member
Posts: 9
Joined: Sat May 30, 2009 7:30 pm

zobjinspect: tool for inspecting z80asm object / library files

Post by gasman »

Something I've cobbled together for my own use, which might possibly come in useful to other z88dk hackers... zobjinspect and zlibinspect, two command line utilities that will dump out the details of a z80asm .obj or .lib file. Handy if you're trying to figure out why your library isn't exporting the symbols it ought to...

http://zobjinspect.rubyforge.org/zobjinspect/

An example run:

Code: Select all

$> zobjinspect clus_erase.o 
CLUS_ERASE, org 65535
===============
Expression declarations:
Constant at 3 = CLUS_TOBUF_NOREAD
Constant at 22 = CLUS_GETSECTOR

Name declarations:
L A BADERASE = 51
L C BLOCKDEV_SIZE = 4
L C BUF_NUMBUFS = 4
L C BUF_SECSIZE = 512
L A CLUS_ERASE_LOOP = 29
L A CLUS_ERASE_SECTOROK = 45
L C DRIVE_NUMDRIVES = 16
L C FATFS_DATA_AREA = 49152
L C FBH_SIZE = 7
L C FDH_SIZE = 9
L C FFH_SIZE = 35
L C FILE_NUMHANDLES = 16
L C FPH_CLUSSIZE = 16
X A CLUS_ERASE = 0

Library name declarations:
CLUS_GETSECTOR
CLUS_TOBUF_NOREAD
It's written in Ruby, and if you have a working Ruby environment with Rubygems (comes as standard in OS X I think, and on Linux it should be a couple of apt-get installs away at most) then you should be able to install it with

Code: Select all

sudo gem install zobjinspect
Otherwise, get the .gem package from the Rubyforge project page.
User avatar
dom
Well known member
Posts: 2091
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

Gasman, support/z80nm does the same job though possibly with a more cryptic output, it also prints the relocation expressions. It also has the added advantage that it's native and not written in ruby :D (not that I'm partial towards python for quick hackups of course...)
Post Reply