Purely out of interest, how would I diassemble a DEC C routine on
VAX/VMS? Can I use DEBUG to do this?
Yes, you can use DEBUG for this.
Better still, use the public domain DISM32 by Andrew Pavlin. I can't remember
where I got it but even if it is not on the freeware cds, it should not be too
difficult to locate it. If not, I can provide a copy. If you don't get a
compiled version, you need a FORTRAN compiler to build it.
DISM32 takes a VAX executable/sharable/system image and generates assembler
source which can be run back through the MACRO assembler. Some tweaking may be
required before it will assemble properly. More tweaking may be required to
correctly differentiate between code and data in all cases, although it does
a pretty good job in general. It is especially good with device drivers and
knows how to regenerate many/most of the macros used to assemble them. It is
also very good with ordinary user mode code. It can get confused by code
sections that never get called and by some calculated addresses but it is
possible to give it hints about these and run it iteratively to achieve an
acceptable result.
You can use DISM32 on SYS$LIBRARY:DECC$SHR.EXE or an executable image linked
with SYS$LIBRARY:DECC$CRTL.OLB to disassemble bits of the C runtime library.
Unfortunately, some of the constructs uses by C compilers can look pretty
obscure when viewed as assembly language. If bits of the runtime library
are originally written in assembly, they will likely be easier to figure out.
Regards,
Peter Coghlan.