* Re: How to convert .EXE or .OBJ to .MAR
1999-04-21 4:00 How to convert .EXE or .OBJ to .MAR Jerry
@ 1999-04-22 4:00 ` Ed Wensell III aka THE StormRaiser
0 siblings, 0 replies; 2+ messages in thread
From: Ed Wensell III aka THE StormRaiser @ 1999-04-22 4:00 UTC (permalink / raw)
Jerry wrote:
>
> Hi, Sir
> I wrote a program with MACRO assemble language under OpenVMS 7.1-1H2
> ago, and my machine is AlphaServer 2100 4/275.
> But now for some reason, I missed my source program.I was told that it
> is possible to convert .EXE files or .OBJ files to .MAR files.
> But I don't know how to do it?
> Is any other utility needed or DEBUG is enough ?
> Any advice is welcome,
> EMERGENCY !!!
> Thanks more,
> jerry
> jerryqin@163.net
> Apr 21 , 1999
First off, this is an OSF (aka Dgitial UNIX, aka Tru64 UNIX, aka generic
OSF) group. You may wish to post your question in comp.os.vms or some
other VMS related group. Also, you may wish to search through Dejanews
(www.dejanews.com).
I have always told it was possible to disassemble/decompile a program
into most languages using the standard commands on the system, but the
resulting output would be unrecognizeable (once a program is
assembled/compiled, it loses all of the human touches...
Variable/subroutine names... Unless it was compiled with /DEBUG).
Unfortunatly, I've never tried it.
Could the source be on a backup somewhere? Might be easier than
disassembling.
Below is an article I found through Dejanews... Perhaps it will be more
helpful...
--
Until soon...
Ed Wensell III
Systems and Operations Support, Pellissippi State
E-mail hint: A college with a dot net domain?
------------------------------------------------------------------
Arne Vajhoj wrote (in reply to someone):
>> Does anyone know of a product that will dis-assemble VAX / VMS objects?
>> The original source program was written in Fortran many years ago. It
>> would be extremely useful to be able to re-generate the source (or the
>> macro equivalent), so that we can maintain this system.
>
>DISM32 (available at FTP.WKU.EDU) will disassemble VMS VAX EXE-files
>(you can LINK/SHARE the OBJ's to create an EXE).
>
>DISM32 is quite a good program. But I will still consider the whole
>approach hope-less for larger applications. Macro-code with
>"automatic" names and no comments is not very usefull for
>maintaining a program !
I did not see the original post of this, but concur with Arne's final
paragraph.
If memory serves me there is another program called UNMACRO from the
same site,
I cannot compare them as I have only tried DISM32.
In my experience, unless you have unlimited time on your hands
disassembling
anything other than small executables for future enhancement/maintenance
is
worse than useless.
Regardless of the original source language, a disassembler can only
generate the
assembly code of the OS, in our case MACRO. (There may be attempts "out
there"
to re-create the source language from the assembly code, but I've not
heard of
any, nor would feel inclined to trust a second level of disassembly.)
I would guess that the original poster is referring to a small to medium
program, so there might be several strategies to get the desired source
for
future maintenance.
The following comments are therefore offered only as "food for thought".
I have
only been involved in "disassembly" for only a couple of very trivial
programs.
1). I would attempt to recreate the program from knowledge of the input
and
output and any documentation, no matter how sparse, e.g. "XYZ's
algorithm was
used". Obviously any HLL can be used, but I would tend to use the
original
language in that imitation of output might be easier - this is, however,
a moot
point. Bear in mind that in many (most) programs, no matter how
technical, the
source code content will be about 75-80% I/O and housekeeping and the
remainder
technical. The former should be easy to recreate because you've got the
input
and output in front of you.
2). If the above is successful for a typical case, try as many boundary
conditions as possible on the original and your new executable. Note
that you
may have to actually introduce bugs that you will eventually fix in
order to get
boundary cases equivalent.
3). If a "tricky" (i.e. difficult) algorithm is employed, try to isolate
that
part of the code in the disassembled code and try to manually convert
that back
to what Fortran would have translated to it. (You've got to use a lot of
GOTO's
here :-). At least, you are now working with a more manageable section
of the
disassembled macro, and can better survive the ""automatic" names and no
comments" that Arne mentioned.
4). Beyond this, I believe you will have to employ the services of a
specialist.
1)-3) were broadly the tactics that I used for the couple of trivial
cases that
I have experienced, and luckily I achieved success. There may be other
tactics
which perhaps others might advise.
BTW Arne, what is the coding for your name? I assume from different
ways I have
seen it that it is an ellided o and e? Pure curiosity, not VMS :-)
Regards, Paddy
Paddy O'Brien,
System Planning,
TransGrid,
PO Box A1000, Sydney South,
NSW 2000, Australia
Tel: +61 2 284-3063
Fax: +61 2 284-3148
Email: paddy.o'brien@transgrid.nswgovgrid.telememo.au
^ permalink raw reply [flat|nested] 2+ messages in thread