[M3devel] cm3: what are *.mc files

Elmar Stellnberger estellnb at elstel.org
Fri Jun 12 16:51:53 CEST 2015


Thanks a lot Rodney and Jay;
that will certainly help my implementation.

So far all *.mc files found on my machine have the
following signature:
16_FD,00,01,{00}

except a few text - .mc from PM3 which start
alltogether with "begin_unit".

Rodney, do you believe that I can rely on the 4th byte
to be zero as generated by the Modula-3 middle end. -
or would anyone be ready to uphold such a guarantee
for the future?

Anyone here who has applied "od" on an .mc generated
by a very recent compiler? - do they start with
16_FD,10,01,?00?

Most binary file types would guarantee a header of at
least 4 Byte and it should be more straight forward and
secure to check 32bit instead of 24bit if possible.

Any suggestions?


Am 10.06.15 um 02:21 schrieb Rodney M. Bates:
>
>
> On 06/09/2015 03:02 PM, Elmar Stellnberger wrote:
>> What are *.mc - files?
>> They appear in TARGET - directories;
>> most of them are just called _m3main.mc but some of them have other 
>> names.
>>
>> I ask because I am writing a program which should recognize and clear 
>> object files.
>> It does not seem to be sufficient to check for uppercase directories 
>> which are located together with an src directory.
>>
>> Usually files of a specific type start with a 32bit magic;
>> however the mc files all have different starting sequences.
>>
>> Is there still a straight forward way to recognize an .mc file just 
>> by its binary content?
>>
>
> They will start with either 16_FD 16_00 16_01, produced by older 
> versions of cm3,
>                          or 16_FD 16_10 16_01, produced by a very 
> recent head compiler.
> Ignore the 4th byte.


Am 09.06.15 um 22:14 schrieb Jay K:
> ps:
>
>   foo.m3 => foo.mc => cm3cg => foo.ms => as => foo.mo
>   foo.i3 => foo.ic => cm3cg => foo.is => as => foo.io
>
>  again, see cm3 -keep, err better yet, cm3 -keep -verbose
>  You can see it running cm3cg and as and rm.
>
>
>  - Jay
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://m3lists.elegosoft.com/pipermail/m3devel/attachments/20150612/90f39db0/attachment-0002.html>


More information about the M3devel mailing list