PRB: A2102 Warnings Generated for Possible 80286 ProblemsLast reviewed: January 9, 1995Article ID: Q34985 |
The information in this article applies to:
SYMPTOMSThe Microsoft Macro Assembler (MASM) versions 5.1 and 5.1a will generate a warning for the following sample code, while MASM version 6.0, 6.0a, and 6.0b will assemble it without error. The warning generated by 5.1 and 5.1a is as follows
A4102: segment near (or at) 64K limitThe linkers that shipped with both products (versions 3.64 and 5.13, respectively) will report the following error at link time
L4020: code-segment size exceeds 64K-36 CAUSEWarnings are generated because code segments in the range of 65,501 - 65,536 bytes may be unreliable on certain 80286 processors.
MORE INFORMATIONThe size of a 16-bit segment is limited to 64K. The recommendation of having segments no larger than 65,500 (64K-36) is to avoid problems with certain 80286 processors. When the segment really does exceed 64K, MASM 5.1 and 5.1a generate an error rather than a warning
A2102: segment near (or at) 64K limitand MASM 6.0, 6.0a, 6.0b generates an error as well
A2103: segment exceeds 64K limitThe following sample code will cause MASM to generate warnings, since the segment size is between 65,501 and 65,536 bytes. Increasing the size of 'value' to 65,550 will result in errors rather than warnings.
Sample Code; Assemble options needed: none .model small,c .286 .stack .code start:
MOV ax, @data MOV ds, ax value db 65500 dup ( ? ) MOV ah, 4ch INT 21h END start |
Additional reference words: 5.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |