MASM 6.1 General Questions & Answers FastTips (Complete)

Last reviewed: July 31, 1997
Article ID: Q90311
6.10 MS-DOS kbref kbappnote

The information in this article applies to:

  • Microsoft Macro Assembler for MS-DOS, version 6.1

Summary:

  Microsoft(R) Product Support Services Application Note (Text File)
                HA0620: MASM 6.1 QUESTIONS AND ANSWERS
                                                   Revision Date: 2/93
                                                      No Disk Included

The following information applies to Microsoft Macro Assembler, version 6.1.

 --------------------------------------------------------------------
| INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY    |
| ACCOMPANY THIS DOCUMENT (collectively referred to as an            |
| Application Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY      |
| KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO    |
| THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A     |
| PARTICULAR PURPOSE. The user assumes the entire risk as to the     |
| accuracy and the use of this Application Note. This Application    |
| Note may be copied and distributed subject to the following        |
| conditions: 1) All text must be copied without modification and    |
| all pages must be included; 2) If software is included, all files  |
| on the disk(s) must be copied without modification [the MS-DOS(R)  |
| utility DISKCOPY is appropriate for this purpose]; 3) All          |
| components of this Application Note must be distributed together;  |
| and 4) This Application Note may not be distributed for profit.    |
|                                                                    |
| Copyright 1993 Microsoft Corporation. All Rights Reserved.         |
| Microsoft and MS-DOS are registered trademarks and Windows         |
| is a trademark of Microsoft Corporation.                           |
 --------------------------------------------------------------------

  • Q. Why does fatal error DX1140 occur when I try to run Microsoft

           Macro Assembler version 6.1 with the Microsoft Windows(TM)
           operating system?
    

        A. This error occurs because the SYSTEM.INI file in the Windows
           directory (by default, C:\WINDOWS) fails to load some needed
           device. The Macro Assembler Setup program does not modify the
           Windows SYSTEM.INI file. Instead, Setup places the required
           changes into the NEW-SYS.INI file in the MASM61\BIN directory.
           Edit the SYSTEM.INI file located in the Windows directory to
           add the contents of the NEW-SYS.INI file. In a default
           installation, this procedure adds the following lines to the
           [386enh] section of the SYSTEM.INI file:
    

              device=C:\MASM61\BIN\DOSXNT.386
              device=C:\MASM61\BIN\CVW1.386
              device=C:\MASM61\BIN\VMB.386
    
    

  • Q. What can I do when the LINK utility always gives me "L1101 -

           Invalid Object Module" errors?
    

        A. Determine which version of the Microsoft LINK utility you are
           using. Type "link" at the MS-DOS prompt and look at the banner
           message displayed by the linker. If you are using Microsoft
           Macro Assembler version 6.1, you should use LINK version 5.31
           or greater. If you are using an earlier version of the linker,
           check the directories specified in the MS-DOS PATH environment
           variable for other files named LINK.EXE. An older version of
           the LINK utility cannot recognize an object module built by
           Microsoft Macro Assembler version 6.1.
    

  • Q. Why do random "system integrity" errors occur when I try to run

           Microsoft Programmer's WorkBench with the Windows operating
           system?
    

        A. Some terminate-and-stay-resident (TSR) applications cause
           "system integrity" errors when they run with Programmer's
           WorkBench. Edit your AUTOEXEC.BAT and CONFIG.SYS files to
           remove all TSR programs and special device drivers from your
           system. To isolate the problem, load one TSR program at a time
           until the errors recur.
    
     4. Q. Why does CodeView tell me that my file has no symbolic
           information even though I requested symbols when I compiled and
           linked my application using Microsoft Macro Assembler version
           6.1?
    
        A. Versions of CodeView prior to version 4.0 do not understand the
           CodeView 4.0 information produced by Microsoft Macro Assembler
           version 6.1. You should use CodeView version 4.01, which is
           distributed with Microsoft Macro Assembler version 6.1. If you
           are using the correct version of CodeView, the problem may be
           caused by an incorrect version of LINK or CVPACK that creates
           incorrect debugging information. Use LINK version 5.31 and
           CVPACK version 4.01 with Microsoft Macro Assembler version 6.1.
           When you link your program, each utility displays a banner
           message that shows its version number. If you are using the
           correct version of the utilities and you specify full segment
           directives in your assembly source code, you may need to
           specify the class 'CODE' for your code segments. If your code
           segments do not have the class 'CODE', the assembly source file
           will not display when you enter CodeView.
    
    

  • Q. Why does NMAKE display a U1045 - "spawn failed: no space on

           device" error?
    

        A. NMAKE produces a U1045 - "spawn failed: no space on device"
           error when inadequate expanded or extended memory is available
           or when inadequate disk space is free in the directory
           specified by the MS-DOS TMP environment variable. When this
           error occurs, close one or more applications to free more
           memory or delete unnecessary files to free disk space. You may
           also want to invoke NMAKE with the /M option to instruct NMAKE
           to swap itself to disk during a build.
    

  • Q. Why do errors occur when I use Microsoft Macro Assembler to

           assemble source files that include CMACROS.INC?
    

        A. Microsoft has distributed many versions of CMACROS.INC. Most of
           these versions were distributed with assembly source files that
           relied on the macros in CMACROS.INC. However, these versions of
           CMACROS.INC were written to work with versions of Microsoft
           Macro Assembler prior to version 6.0. Because Microsoft Macro
           Assembler versions 6.0 and later more strictly check assembly
           language and macro syntax, they detect errors in older versions
           of the CMACROS.INC file that are not detected by Microsoft
           Macro Assembler version 5.1. To address this situation,
           Microsoft Macro Assembler versions 6.0 and later include a
           version of CMACROS.INC with the assembler. If you use Microsoft
           Macro Assembler version 6.0 or later, you should use the
           version of the CMACROS.INC file distributed with your
           assembler. Microsoft continues to distribute older versions of
           the CMACROS.INC file with assembly source files designed for
           use with versions of Microsoft Macro Assembler prior to version
           6.0.
    

  • Q. When I link my program, I receive an L2029 - "unresolved

           external" error. How can I call an assembly language routine
           from a C++ program?
    

        A. A C++ module can access Microsoft Macro Assembler procedures
           and data only if the procedures and data are previously
           declared with "C" linkage. For further information about
           linking a C++ module with a Microsoft Macro Assembler module,
           refer to Chapter 12, "Mixed-Language Programming," of the
           Microsoft Macro Assembler "Programmer's Guide" and to page 36
           of the Microsoft "C++ Language Reference" manual provided with
           Microsoft C/C++ version 7.0.
    
     8. Q. Why does my program hang or give an illegal instruction error
           when the source code includes the .386, .386P, .486, or .486P
           directives?
    
        A. The 386 and 486 processors can operate in two modes: 32-bit
           operations as the default or 16-bit operations as the default.
           In either mode, a prefix byte at the beginning of an
           instruction, either 66h or 67h, instructs the processor to
           treat the instruction as a nondefault operation. For example,
           if the processor executes a prefix byte while in a 16-bit
           segment, it executes the instruction as a 32-bit operation.
    
           When Microsoft Macro Assembler processes a file that uses full
           segment declarations, it assumes that the default operations
           are 32-bit. To change this assumption, specify a USE16 modifier
           for the SEGMENT directive. When the assembler processes a file
           that uses simplified segment declarations, it assumes that the
           default operations are 32-bit if the source includes a .386,
           .386P, .486, or .486P directive before the .MODEL directive. If
           the processor directive occurs after the .MODEL directive, the
           assembler assumes that 16-bit operations are the default.
    
    

  • Q. Why can't I use the SEGMENT AT and ORG directives to place code

           at an absolute address?
    

        A. The Microsoft LINK utility provided with Microsoft Macro
           Assembler is designed to generate relocatable programs that can
           be run with the MS-DOS or Windows operating systems. LINK is
           not designed to generate absolute addressable code. Other
           companies sell link and locate tools to generate this type of
           code.
    

           You can use the ORG directive to specify a relative offset to
           the first items in a segment (for example, 100h for code in a
           .COM file). Use the SEGMENT AT directive to access memory
           that's already in the computer at an absolute address, such as
           the ROM BIOS.
    


  • Additional reference words: 6.10 ivrfax fasttips
    KBCategory: kbref kbappnote
    KBSubcategory:


    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: July 31, 1997
    © 1998 Microsoft Corporation. All rights reserved. Terms of Use.