How to create an obj that will link with 32-bit high-level language obj's

Started by pwlynch, November 06, 2005, 05:15:15 PM

Previous topic - Next topic

pwlynch

Hi,

I have a 16-bit MASM assembly that compiles and runs well when called from programs under DOS.   I would like to convert/re-compile/etc... this source to an obj that I can link to other obj's into a 32-bit exe or dll.

Currently, when attempting to link my existing obj file, I received the following error:  COMM.OBJ : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt.  COMM.OBJ was created with the command: ML /I. /Zm /c /Ta COMM.ASM

I then attempted to create my COMM.OBJ file using the /coff option (Thinking that was the problem).  However, I received several compile-time errors.  I attempted to create this obj with the command: ML /coff /Zm COMM.ASM

Is there a simple solution to "convert" this code or will I have to re-write the source?  As assembly is not my forte, any pointers or help would be greatly appreciated.

Thanks in advance,
Pat

MichaelW

Hi Pat,

Welcome to the forum. As far as I know, because the 16-bit code must have some sort of segment structure and this structure will not work for a Windows executable, you must modify the source. Depending on what the code does and whether or not execution speed matters, the modifications could be relatively simple or relatively complex. If I were doing this I would lean towards a total rewrite, using the original as a guide.

eschew obfuscation