MASM386 & why you shouldn’t do this

I found myself unable to sleep and went looking at the masm386.c in the old GCC 1.2 line of code to discover what everyone had figured out at the time, that it was interesting to include it, but it didn’t do anything at all as it was never called in GCC.

So for some other reason I thought it’d be fun to mess with MASM386 the assembler that was in the original NT pre-releases up to the 3.1 DDK (maybe later, I dont’ have the 3.5 SDK/DDK on hand).

D:\temp\i>type hi.c
#include <stdio.h>
void main(){printf("hi!\\n");}

D:\temp\i>cl /c /G3 /Gd /Fahi.asm hi.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 8.00
Copyright (c) Microsoft Corp 1984-1993. All rights reserved.

hi.c

D:\temp\i>masm386 /Ml hi.asm hi.obj nul.lst nul.crf
Microsoft (R) Macro Assembler Version 5.NT.02
Copyright (C) Microsoft Corp 1981, 1989.  All rights reserved.

      0 Warning Errors
      0 Severe  Errors

D:\temp\i>link hi.obj -debug:none -out:hi.exe /SUBSYSTEM:CONSOLE -defaultlib:LIBC -defaultlib:OLDNAMES
Microsoft (R) 32-Bit Executable Linker Version 1.00
Copyright (C) Microsoft Corp 1992-93. All rights reserved.

D:\temp\i>hi
hi!

Yes this was a total waste of time.  Some things work, while other files explode for seemingly no apparent reason.

Windows NT 3.1 Pre-Release from October 1991

What is interesting is that it’s the same reported version from the 1991 pre-release.

With of course it making an appearance on the Microsoft OS/2 2.00 betas & SDK.

OS/2 2.0 build 123

The only thing more insane to waste time on is converting a.out to OMF…

2 thoughts on “MASM386 & why you shouldn’t do this”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.