FIX: LOCAL Directive with a Structure

Last reviewed: September 11, 1997
Article ID: Q59585
5.10 5.10a | 5.10 5.10a
MS-DOS     | OS/2
kbtool kbfixlist kbbuglist

The information in this article applies to:

  • Microsoft Macro Assembler for MS-DOS, versions 5.1 and 5.1a
  • Microsoft Macro Assembler for OS/2, versions 5.1 and 5.1a

SYMPTOMS

On Page Update-42 of the "Microsoft Macro Assembler 5.1 Updates and Microsoft Editor" manual, it states that you can use the LOCAL directive with a structure type. When this is done, you may receive the following errors:

   A2003 Unknown Type Specifier
   A2010 Syntax Error

CAUSE

This feature was not implemented in MASM versions 5.1 or 5.1a.

RESOLUTION

To avoid the A2003 Unknown type specifier error, include the PTR keyword in the LOCAL directive. For example:

   LOCAL stuff:parms

becomes

   LOCAL stuff:ptr parms

STATUS

Microsoft has confirmed this to be a problem in MASM version 5.1. This problem has been corrected in MASM version 6.0.

MORE INFORMATION

The following code can bed used to demonstrate this problem.

Sample Code

; Assemble options needed: none

.MODEL small, c .STACK 4096

parms STRUC

      p1 DW ?
      p2 DW ?
parms ENDS

.CODE

      CALL test_func

test_func PROC
LOCAL stuff:parms             ; A2003 Unknown type specifier
      MOV ax, 0ffffh
      MOV stuff. p1,ax        ; A2010 Syntax error
      MOV stuff. p2,ax        ; A2010 Syntax error
      RET
test_func ENDP

END


Additional reference words: 5.10 5.10a buglist5.10 buglist5.10a fixlist6.00
KBCategory: kbtool kbfixlist kbbuglist
KBSubCategory: MLIss
Solution Type : kbfix


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.

Last reviewed: September 11, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.