delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/01/27/12:36:01

From: Sam Littlewood <SAM AT argonaut DOT com>
Organization: Argonaut Ltd.
To: michaels <michaels AT vsl DOT com DOT au>
Date: Thu, 27 Jan 1994 15:14:29 GMT
Subject: Re: TASM -> DJ asm awk scripts
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu

One way of doing this, if you have access to Watcom C, is to use
wdisasm. It can dissasemble a .OBJ and write it out in unix AS format.
I have used the follwing dmake rule and sed script :

---- makefile ------

...

%.s: %.asm
    ml -c -Cp -DDOS386 -D__GNUC__=1 -Fotmp.obj $<
    wdisasm -au -l=tmp.lst tmp.obj
    sed -f wattogas.sed <tmp.lst >$@

...

--------------------

--- wattogas.sed ---

s/+0x/0x/g
s/repe[     ]*stos/repe ; stos/

--------------------
         ------------------------------------------
Sam Littlewood                                   sam AT argonaut DOT com
Argonaut Software Ltd.                   saml AT cix DOT compulink DOT co DOT uk
         Tel: +44 81 200 5777  Fax: +44 81 200 9866

- Raw text -


  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019