KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q75248: PROC w/ Parameters Requires Language Specifier on .MODEL

Article: Q75248
Product(s): Microsoft Macro Assembler
Version(s): MS-DOS:5.1,5.10a,6.0
Operating System(s): 
Keyword(s): 
Last Modified: 04-MAY-2001

-------------------------------------------------------------------------------
The information in this article applies to:

- Microsoft Macro Assembler (MASM), versions 5.1, 5.10a, 6.0 
-------------------------------------------------------------------------------

SUMMARY
=======

The PROC directive used with arguments requires a language specifier in the
.MODEL directive in the Microsoft Macro Assembler (MASM) versions 5.1, 5.1a, and
6.0, and also in the Microsoft QuickAssembler versions 2.01 and 2.51. The
language specifier is required because it determines which parameter passing
convention will be used with the PROC arguments. If you do not specify a
language on the PROC line, the error

  A2022: Operand must be type specifier

will be generated by MASM 5.1 and 5.1a, and by QuickAssembler 2.01 and 2.51. The
error

  A2119: language type must be specified

will be generated by MASM 6.0.

MORE INFORMATION
================

To correct the code, specify a language in 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.

Sample Code
-----------

  ; Assemble options needed: none

        .MODEL small
        .CODE
        PUBLIC proc1
  proc1 PROC arg1:WORD
  proc1 ENDP
        END

Additional query words: kbinf 5.10 5.10a s_quickasm 6.00

======================================================================
Keywords          :  
Technology        : kbMASMsearch kbAudDeveloper kbMASM510 kbMASM600
Version           : MS-DOS:5.1,5.10a,6.0

=============================================================================

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.