FIX: ^Z in Input File Appears to Truncate Listing File (74883)



The information in this article applies to:

  • Microsoft Macro Assembler (MASM) 6.0

This article was previously published under Q74883

SYMPTOMS

If one of the source files assembled by the Microsoft Macro Assembler (MASM) version 6.0 contains a CTRL+Z character, the listing file generated by the assembler may appear to be truncated immediately following the position of that source file in the listing.

CAUSE

The CTRL+Z character is considered to be the end-of-file (EOF) character for text files in DOS and OS/2. Many editors support this and use the CTRL+Z as a file termination character. Unfortunately, when MASM 6.0 adds files to the listing file, it reads the entire file including the CTRL+Z at the end, if there is one, and places it in the listing. If you use the DOS or OS/2 operating system commands, such as Type or Copy, to display the resultant file, it will seem to end at the first occurrence of a CTRL+Z (EOF) character.

RESOLUTION

If your editor supports saving a file without a CTRL+Z as the termination character, this is the easiest way to work around this problem. If there is no CTRL+Z in the source file, it cannot be transferred to the list file.

If you cannot eliminate the CTRL+Z characters, you can load the list file into the Programmer's WorkBench (PWB) and remove the CTRL+Z character(s) from the file. Because PWB does not rely on CTRL+Z characters for EOFs, the CTRL+Z characters will be displayed as right arrow characters (->). You can delete these characters just as you can delete any other character. After removing the CTRL+Z characters, the DOS or OS/2 commands will operate on the listing file as expected.

STATUS

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

Modification Type:MinorLast Reviewed:10/29/2003
Keywords:kbfix KB74883