[alt.msdos.programmer] Lattice .OBJ to MSC .OBJ

hughes@tornado.Berkeley.EDU (Eric Hughes) (02/02/90)

Re: linking Lattice 2 binaries to Microsoft 5.

Back in the Lattice 2 days, the Microsoft and the Lattice compilers
were the same program; Microsoft had licensed from Lattice.  At that
point, at least the stack calling conventions were the same.

Microsoft then wrote their own, and changed the external naming
conventions (every public symbol from a C program has an underscore
tacked to the beginning of it).  I don't think they changed the way
the stack frame was created.  To create a glue function, get out your
assembler and write lines of the form
	_SYMBOL:	jmp SYMBOL
Use the proper .model directive for your C model to match the size jmp
instructions generated.

Now, if they really haven't changed the stack frames, this technique
should work.  Unfortunately, I threw out my Lattice 2.15 manual a
couple of years ago, so I cannot verify this.

Eric Hughes
hughes@ocf.berkeley.edu