[dmd-internals] OMF format Comment Record (0x88) issues

Yao Gómez yao.gomez at gmail.com
Sat Feb 11 15:42:17 PST 2012


Walter, just a quick question.

I was experimenting with a OMF object file dumper that I'm programming,  
and then comparing the results with the OMF spec. But there's a record  
that I can't managed to 'decipher' (so to speak).

Specifically, I'm having issues with the Comment Record (0x88) with the  
class 0x9d, that according to the spec represents the Memory Model. This  
record is almost always the second one to appear in the object files, and  
its contents, according to the spec are:

     "The byte string consists of from one to three ASCII
      characters and indicates the following:"

      0, 1, 2, or 3    - 8086, 80186, 80286, or 80386
                         instructions generated,
                         respectively

      O                - Optimization performed on code

      s, m, c, l, or h - Small, medium, compact, large, or
                         huge model

      A, B, C, D       - 68000, 68010, 68020, or 68030
                         instructions generated, respectively

However, when I extract the aforementioned byte string, I get '7nO'. Now,  
I suppose that the 'O' means that the code is optimized, but what about  
'7' and 'n'. They aren't specified on the spec and don't know what they  
mean. Can you shed some light on this?

I know that you have a tool to read this kind of information (objdump or  
something like that), but I would like to understand a little bit what's  
going on. It's the object file I'm analyzing corrupt? Is there something  
different between the spec and how the OMF files that DMD generates?

Thanks.


More information about the dmd-internals mailing list