www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - How to convert D to x86 assembly

reply Jerry <Jerry_member pathlink.com> writes:
Hi, 
Does anyone know how to convert D to x86 assembly? I noticed obj2asm in the bin
folder, but I don't know how to use it. Cygwin and DOS both won't run it. 

thanks in advance, 
Jerry
Aug 09 2005
next sibling parent reply Sean Kelly <sean f4.ca> writes:
In article <ddb35q$cvq$1 digitaldaemon.com>, Jerry says...
Hi, 
Does anyone know how to convert D to x86 assembly? I noticed obj2asm in the bin
folder, but I don't know how to use it. Cygwin and DOS both won't run it. 

obj2asm is available as a part of the Digital Mars Extended Utility Package (http://www.digitalmars.com/eup.html). I think the file in dmd/bin is probably a reference file of some sort. For $15, the EUP is a great deal IMO. Sean
Aug 09 2005
parent reply "Jarrett Billingsley" <kb3ctd2 yahoo.com> writes:
"Sean Kelly" <sean f4.ca> wrote in message 
news:ddb63s$fpm$1 digitaldaemon.com...
 obj2asm is available as a part of the Digital Mars Extended Utility 
 Package
 (http://www.digitalmars.com/eup.html).  I think the file in dmd/bin is 
 probably
 a reference file of some sort.  For $15, the EUP is a great deal IMO.

Why is it free with the Linux distro, but you have to guy the EUP to get it on Windows?
Aug 09 2005
parent reply Sean Kelly <sean f4.ca> writes:
In article <ddberv$pgg$1 digitaldaemon.com>, Jarrett Billingsley says...
"Sean Kelly" <sean f4.ca> wrote in message 
news:ddb63s$fpm$1 digitaldaemon.com...
 obj2asm is available as a part of the Digital Mars Extended Utility 
 Package
 (http://www.digitalmars.com/eup.html).  I think the file in dmd/bin is 
 probably
 a reference file of some sort.  For $15, the EUP is a great deal IMO.

Why is it free with the Linux distro, but you have to guy the EUP to get it on Windows?

No idea. (and I suppose that's what dmd/bin/obj2asm is, huh) Sean
Aug 09 2005
parent reply Jerry <Jerry_member pathlink.com> writes:
 obj2asm is available as a part of the Digital Mars Extended Utility 
 Package
 (http://www.digitalmars.com/eup.html).  I think the file in dmd/bin is 
 probably
 a reference file of some sort.  For $15, the EUP is a great deal IMO.



and Linux)?
Aug 09 2005
next sibling parent "Walter" <newshound digitalmars.com> writes:
"Jerry" <Jerry_member pathlink.com> wrote in message
news:ddbsda$1c8q$1 digitaldaemon.com...
 But wait. Does obj2asm produce the intel syntax or GAS(AT&T) syntax (on

 and Linux)?

Intel syntax only.
Aug 09 2005
prev sibling parent Sean Kelly <sean f4.ca> writes:
In article <ddbsda$1c8q$1 digitaldaemon.com>, Jerry says...
 obj2asm is available as a part of the Digital Mars Extended Utility 
 Package
 (http://www.digitalmars.com/eup.html).  I think the file in dmd/bin is 
 probably
 a reference file of some sort.  For $15, the EUP is a great deal IMO.



and Linux)?

From the docs here: http://www.digitalmars.com/ctg/obj2asm.html "OBJ2ASM disassembles object (.obj) files in Intel OMF, Microsoft COFF format, or linux ELF format. (DMC++ generates Intel OMF format object files.)" Sean
Aug 10 2005
prev sibling next sibling parent "Walter" <newshound digitalmars.com> writes:
"Jerry" <Jerry_member pathlink.com> wrote in message
news:ddb35q$cvq$1 digitaldaemon.com...
 Hi,
 Does anyone know how to convert D to x86 assembly? I noticed obj2asm in

 folder, but I don't know how to use it. Cygwin and DOS both won't run it.

\dmd\bin\obj2asm is the linux version of obj2asm. obj2asm.exe is the Windows version, and it comes with the Extended Utility Package for $15. So why is it free only on linux? Because the only ones using it will be DMD users. On Windows, obj2asm.exe is incredibly useful (it'll read OMF 16 and 32 bit, MS-COFF, and ELF), and very often it is the only tool people want from Digital Mars.
Aug 09 2005
prev sibling parent =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= <afb algonet.se> writes:
Jerry wrote:

 Does anyone know how to convert D to x86 assembly? I noticed obj2asm in the bin
 folder, but I don't know how to use it. Cygwin and DOS both won't run it. 

As a side-note, if you want to convert D to assembly with GDC you use: gdc -S file.d If you run that on "file.d", it will create "file.s" with (GNU) asm... --anders PS. You can of course also add other flags too, like -O2 and -frelease
Aug 09 2005