The information in this article applies to:
SYMPTOMSIf a variable is referenced externally in an assembler routine in the following manner:
and declared globally in a large model C program as follows:
the following error is generated:
CAUSE
This error occurs because the assembler would expect to find Var in
the segment _DATA in DGROUP. The C declaration, however, will put var
in the segment FAR_BSS, since it is an uninitialized global data
item in the large memory model.
RESOLUTIONOne way to eliminate this error is to initialize Var in the C code:
This will put it in the _DATA logical segment in DGROUP.
Another work-around is to delcare Var in the Assembly code so that the assembler would expect to find Var in FAR_BSS, as follows:
In addition, be sure to use a segment override to access Var:
Additional query words: 5.00 5.10 5.10a 6.00 6.00a 6.00b
Keywords : |
Last Reviewed: January 5, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |