Thread overview
How to convert D to x86 assembly
Aug 09, 2005
Jerry
Aug 09, 2005
Sean Kelly
Aug 10, 2005
Sean Kelly
Aug 10, 2005
Jerry
Aug 10, 2005
Walter
Aug 10, 2005
Sean Kelly
Aug 10, 2005
Walter
August 09, 2005
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


August 09, 2005
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


August 09, 2005
"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?


August 10, 2005
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


August 10, 2005
>>> 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.
>>
But wait. Does obj2asm produce the intel syntax or GAS(AT&T) syntax (on Windows
and Linux)?



August 10, 2005
"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
Windows
> and Linux)?

Intel syntax only.


August 10, 2005
"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
the bin
> 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.


August 10, 2005
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
August 10, 2005
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.
>>>
>But wait. Does obj2asm produce the intel syntax or GAS(AT&T) syntax (on Windows
>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