PRB: No Warning for INVOKE Between 16-Bit and 32-Bit Segments (85508)
The information in this article applies to:
- Microsoft Macro Assembler (MASM) 6.0
- Microsoft Macro Assembler (MASM) 6.0a
- Microsoft Macro Assembler (MASM) 6.0b
This article was previously published under Q85508 SYMPTOMS
The Microsoft Macro Assembler (MASM) version 6.0 does not support transfer
of control between 16-bit and 32-bit code segments through the INVOKE
command. If the assembler encounters an INVOKE in a 16-bit segment, it
assumes that the procedure being invoked is also in a 16-bit segment and
places the parameters on the stack using WORDs. On the other hand, if the
assembler encounters an INVOKE in a 32-bit code segment, the parameters are
placed on the stack as DWORDs with the assumption that the called routine
will also be in a 32-bit code segment. MASM does not generate warnings when
the segment being called does not match the calling segment.
CAUSE
The INVOKE command, introduced in MASM 6.0, is not designed to support
transferring control between 16-bit and 32-bit code segments.
RESOLUTION
You can work around this problem by pushing the necessary parameters on the
stack and making the appropriate call instead of using INVOKE.
STATUS
This feature is under review and will be considered for inclusion in a
future release.
Modification Type: | Minor | Last Reviewed: | 11/17/2003 |
---|
Keywords: | KB85508 |
---|
|