LOCAL Requires Language Specifier on .MODEL

Last reviewed: January 23, 1995
Article ID: Q75247
The information in this article applies to:
  • Microsoft Macro Assembler for MS-DOS, versions 5.1, 5.1a, and 6.0
  • Microsoft Macro Assembler for OS/2, versions 5.1, 5.1a, and 6.0

SUMMARY

The LOCAL directive used inside a procedure requires a language specifier on the .MODEL directive in the Microsoft Macro Assembler (MASM) versions 5.1 and 5.1a, and in the Microsoft QuickAssembler versions 2.01 and 2.51. If a language is not specified on the PROC line, the warning

   A4001: Extra characters on line

will be generated by MASM 5.1 and 5.1a. The error

   A2135: feature requires language specifier on .MODEL

will be generated by QuickAssembler 2.01 and 2.51.

MORE INFORMATION

To correct the code, specify a language on the .MODEL statement. To correct the following program, replace the statement ".MODEL small" with ".MODEL small, language" where language is either FORTRAN, PASCAL, Basic, or C.

MASM 6.0 does not require a language specifier on the .MODEL statement to use the LOCAL directive.

Sample Code

; Assemble options needed: none

      .MODEL small
      .CODE
      PUBLIC proc1
proc1 PROC
      LOCAL loc1:WORD
proc1 ENDP
      END


Additional reference words: kbinf 5.10 5.10a 6.00
KBCategory: kbprg
KBSubCategory: MASMLngIss


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: January 23, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.