Q32773: LOCAL Directive Incorrect for Large Types
Article: Q32773
Product(s): See article
Version(s): 5.10 | 5.10
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | buglist5.10 | fixlist5.10A | mspl13_masm
Last Modified: 10-JUL-1990
The LOCAL directive allocates two bytes too few when applied to
data items with type larger than word.
Microsoft has confirmed this to be a problem in Version 5.10.
The 5.10A MASM update is available as an applications note, from
Microsoft Product Support Services.
The following source example demonstrates the problem:
.model large
.code
foo proc
local l1:byte
local l2:word
local l4:dword
local l6:fword
local l8:qword
local l10:tword
ret
foo endp
end
The listing file below illustrates the incorrect offsets generated:
L1 ........................ TEXT BYTE PTR [BP]-2
L10........................ TEXT TBYTE PTR [BP]-24
L2......................... TEXT WORD PTR [BP]-4
L4......................... TEXT DWORD PTR [BP]-6
L6......................... TEXT FWORD PTR [BP]-10
L8......................... TEXT QWORD PTR [BP]-16
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.