I am reading the book from Andrei Alexandrescu about the D programming language. He's an excellent writer and does a pretty good job at explaining aspects of the D language. I however find certain constructs hard to understand when I cannot imagine the ASM output or consequences of certain keywords (such as in, out, etc. or other constructs). Even though my ASM is pretty bad and I never use it, it helps me a lot to be able to understand how certain keywords work out to the computer and the work being done.
The DMD compiler has many interesting features (code coverage, generating interfaces (header files), generating documentation, profiling, ...) but I haven't seen a switch to output ASM code. The compiler does generate .obj files, and from reading the following link: http://www.digitalmars.com/ctg/obj2asm.html I suspect I need a tool to convert the object files manually. I would prefer a compiler switch, is there one?
On the bottom of that page, I get linked to a page where I can pay for the products mentioning containing that tool. Coming from a GNU background I highly frowned up on that. Is this for C/C++ only, or does this also apply for the D compiler?
Is there any other way to convert these .obj files to readable ASM code, or must I resort to other D compilers (such as GDC or LDC) to acquire ASM output? I prefer not to. DMD is created by the founder himself, I'm sure he implemented most features correctly / largely optimized.
So, how can I take a peek at the ASM code?
Thank you.