The MASM Forum Archive 2004 to 2012

Miscellaneous Forums => 16 bit DOS Programming => Topic started by: herge on May 15, 2006, 11:19:02 AM

Title: COM Files
Post by: herge on May 15, 2006, 11:19:02 AM
 Hi All:

I've being trying to use Qeditor to compile some old Assembler
programs. Something is not right or I am missing or forgetting
something. The offset or addresses it trys to load for Data are
totally out to lLunch. I know the logic is okay, but the addresses
are all wrong? Addresses out by over 256 bytes.

REM MTI.BAT 5:19 AM 5/15/2006
ML /c %1.asm
pause
LINK16 /tiny %1.obj;
pause
%1
Title: Re: COM Files
Post by: MichaelW on May 15, 2006, 04:40:29 PM
The batch file looks OK. For a COM file the program loader allocates a block of memory, writes a 256-byte Program Segment Prefix to the start of the block, and loads the program starting at offset 100h. For this to work with a program that contains jumps, calls, or data, the program must be assembled starting at offset 100h. This is normally done by specifying a tiny memory model, or by placing an ORG 100h at the start of the program code.

Title: Re: COM Files
Post by: herge on May 15, 2006, 09:03:15 PM
 Hi MichaelW:

I am now getting this message:

day.obj : warning LNK4033: converting object format from OMF to COFF
day.obj : fatal error LNK1190: invalid fixup found, type 0x0001
F:\MASM32\BIN>snap

It obviously doesn't like something.

[attachment deleted by admin]
Title: Re: COM Files
Post by: MichaelW on May 15, 2006, 10:02:49 PM
It looks like you are trying to use a 32-bit linker instead of a 16-bit linker. What version number is the linker reporting?