|
Compiling Compiling Code C Implementation C++ Implementation Language Extensions Mixing Languages Assembly Language Inline Assembler Optimizing Code Numerics Programming Regular Expressions Acrtused Pragmas Precompiled Headers Predefined Macros Warning Messages Error Messages Runtime Messages Linking Optlink Switches Module Definition Files Operation and Design Error Messages Win32 Programming Win32 Programming DOS and Win16 Programming Memory Models 16 Bit Pointer Types and Type Modifiers Handle Pointers DOS DOS 32 (DOSX) Win16 Win16 DLLs Win16 Prolog/Epilog C/C++ Extensions Contract Programming __debug statement __debug declaration Dynamic Profiling Embedding C in HTML Tools BCC CHMOD CL COFF2OMF COFFIMPLIB DMC DIFF DIFFDIR DUMP DUMPOBJ DUMPEXE EXE2BIN FLPYIMG GREP HC IMPLIB LIB LIBUNRES MAKE MAKEDEP ME OBJ2ASM PATCHOBJ RC RCC SC SHELL SMAKE TOUCH UNMANGLE WHEREIS Porting to DMC++ Switching to DMC++ from Microsoft from Borland Porting Guide |
OBJ2ASM: Object File DisassemblerOBJ2ASM disassembles object (.obj) files in Intel OMF, Microsoft COFF format, or linux ELF format. (DMC++ generates Intel OMF format object files.) Looking at the assembly language output of the compiler is highly useful for:
Compiling the file with the -gl option embeds line number information in the object file, enabling OBJ2ASM to match the source code up with the generated assembler instructions. Compiling the file with the -g option embeds debug records in the object file, which OBJ2ASM will format and output. OBJ2ASM commands have the following format: obj2asm [-l -o -x] objectfile[.obj] [sourcefile] [-coutfile[.cod]]
To see the code generated by compiling test.cpp, use the following commands: dmc -c -gl test obj2asm testNote: Although the output of OBJ2ASM is in MASM format, it usually requires a little editting before MASM will accept it. |