views:

117

answers:

2

Hi! Can COM program be 32 bit?

How can I compile COM program? I have TLINK32 and TASM32.

tasm32 \t alex_7.asm
pause
tlink32 alex_7.obj 
pause
td32 main.exe

I ve got following error:

Fatal: 16 bit segments not supported in module alex_7.asm

I have DOSBOX and I'am running Windows 7 x64

I got same when I try to compile my program inside DOSBOX

A: 

COM objects can most definitely be 32 bit, the problem you're having is that you're using 16bit code on a 64 bit system. You can only run 32bit and 64bit programs under a 64 bit system (but you can't mix them up together under most scenarios).

Blindy
When I say .com I mean program format similar to .exe
Fantomas
Oh. Oops. I don't think COM files can be anything but 16-bit.
Blindy
I tried to compile my program using tasm and tlink (16 bit).tlink says `no stack`
Fantomas
@Fantomas: Then the term you are looking for is PE-Executable.
George Edison
+2  A: 

No, .com files are small (max. 64kb) DOS/16-bit-era executable files, with a segmented memory model. In MASM, you'd use .MODEL TINY, ORG 100h and fit everything into the code segment. As far as I know, there are no 32-bit .com files.

PhiS