.MODEL directive causing problems
From: Stephan Wolf (stewo68_at_hotmail.com)
Date: 01/20/04
- Next message: C: "Re: Thinking assembly?"
- Previous message: WhiteRavenEye: "Re: Damn asm Dll and VB code..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 20 Jan 2004 18:10:55 +0000 (UTC)
The MS C compiler 1.52 produces an .ASM file (-Fa option), which
causes problems when compiled using MASM 6.13 (also tried MASM 7.10).
We are actually experiencing two different problems:
- The original .ASM file compiles ok but the linker adds relocations
although there is absoluetly no need to. The actual instruction is:
push OFFSET DGROUP:_Ac
Note that we use the -G3 C compiler option and thus the following gets
inserted in the .ASM file:
.386p
.387
- The above problem goes away when we remove the .MODEL SMALL
directive (generated by the C compiler). However, we then see the
following error message:
error A2075: jump destination too far : by xyz byte(s)
Note that the C compiler marks all jumps "short", e.g.
je SHORT $L1971
It seems correct that such jumps cannot be lengthened due to the
explicit SHORT attribute. However, MASM *does* lengthen these jumps if
".MODEL SMALL" is specified.
Our program is a 16-bit DOS TSR running on i386 and above. Is there
any undocumented magic that the ".MODEL" directive does?
Any help is greatly appreciated.
Stephan
- Next message: C: "Re: Thinking assembly?"
- Previous message: WhiteRavenEye: "Re: Damn asm Dll and VB code..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|