Microsoft Visual C++ Processor Pack Release Readme

2000 Microsoft Corporation. All rights reserved.

Welcome to the Microsoft Visual C++ Processor Pack Release with Service Pack 5 for Visual C++ 6.0. The Microsoft Visual C++ Processor Pack Release Readme contains the following sections:

Setup Instructions

The Processor Pack requires that you have already installed Microsoft Visual C++ version 6.0 with Service Pack 5 or greater. To install Service Pack 5, go to the Product Updates page at http://msdn.microsoft.com/vstudio/downloads/updates.asp and download the appropriate version.

The Processor Pack also requires Microsoft Visual C++ version 6.0 Professional or Enterprise Editions. The Processor Pack will not install on the Standard Edition.

To install the Processor Pack, run Vcpp.exe. The Setup program overwrites your compiler files, and the Processor Pack documentation (procpack.chm) is installed in the Vc98 folder. MASM version 6.15 is installed in the bin folder, located in the Vc98 folder.

There is no uninstall; you must uninstall Microsoft Visual C++ 6.0 and manually remove the Processor Pack files.

Compiler-Specific Notes

Debugger-Specific Notes

The debugger requires that if you are running Windows NT version 4.0, you must have Service Pack 5 or greater installed. For remote debugging, you must have Visual C++ with Service Pack 5 installed on both machines.

If you edit the value of a register from the Registers window or an EE window (such as QuickWatch or Watch), it may revert to the previous value once you step in the debugger. This affects STO-ST7, FPU status, MM0-MM7, XMM0-XMM7, XMM00-XMM73, and MM00-MM71 registers on Windows 95 and Windows 98.

Documentation Notes

Under the AMD 3DNow! Technology Overview and Intrinsics node, the Data Types topic lists the second integer data type graphic as (64 bits x 1) Quad word. It should read (16 bits x 4) Quad word. Also, the bit pattern in the last block on this graphic reads 43 to 63. It should read 48 to 63.

Fixed Issues in this Service Pack

The problems with QIfist have been addressed in this service pack. If you encounter any problems using QIfist, report them to Microsoft Product Support Services at http://support.microsoft.com/directory.

Intel Performance Libraries and Sample Files

Intel performance libraries are available at http://developer.intel.com/vtune/perflibst/.

Intel SSE samples are available at http://developer.intel.com/vtune/cbts/strmsimd/appnotes.htm.

Intel SSE2 samples are available at http://developer.intel.com/vtune/cbts/strmsimd/sse2_appnotes.htm.

AMD Sample Files

AMD sample files are available in your installation folder. You can find them by going to the Samples folder in the Vc98 folder. Click the AMD folder, and there are two sample folders, Isdk and Asdk, which contain the sample files. You do not need a project; compile each sample with cl /Ox /DWIN32 /Fesample.exe *.cpp.

Using MASM to Assemble .asm Files

Microsoft Visual C++ does not support assembler source files by default, that is, the Developer Studio does not associate any special significance  to .asm files. However, there are two viable options. You can use the following two methods to add .asm files to a Visual C++ project. The methods are:

The use of custom build is described below. By using a custom build rule, a project can invoke MASM on a per-file basis to assemble .asm files. The resulting object modules are then automatically linked into the desired target.

For more information about MASM, see MASM Reference Documentation.

Using Visual C++ Developer Studio, the following provides sample code and a step-by-step example of how to create a simple console application, CAPP, that requires MASM (ML.exe) to assemble one of its source files.

Sample Code - C Module

/* Filename: CMAIN.C */ 

#include <stdio.h>
 
#ifdef __cplusplus
extern "C" {
#endif
 
void MasmSub (char *, short *, long *);
 
#ifdef __cplusplus
}
#endif

char chararray[4] = "abc";
short shortarray[3]  = {1, 2, 3};
long longarray[3] = {32768, 32769, 32770};

void main( void )
{
   printf ("%s\n", chararray);
   printf ("%d %d %d\n", shortarray[0], shortarray[1], shortarray[2]);
   printf ("%ld %ld %ld\n", longarray[0], longarray[1], longarray[2]);
   MasmSub (chararray, shortarray, longarray);
   printf ("%s\n", chararray);
   printf ("%d %d %d\n", shortarray[0], shortarray[1], shortarray[2]);
   printf ("%ld %ld %ld\n", longarray[0], longarray[1], longarray[2]);
} 

Sample Code - ASM Module

; Filename: MASMSUB.ASM
; Assemble options needed for ML: /c /Cx /coff

.386
.MODEL flat, C
.CODE

MasmSub PROC uses esi, \ 
   arraychar:PTR, \ 
   arrayshort:PTR, \ 
   arraylong:PTR
   mov esi, arraychar ; Load ESI with the address of the char array.
   mov BYTE PTR [esi], "x"      ; Since a char is 1 byte long, each
   mov BYTE PTR [esi+1], "y"    ; successive element can be accessed
   mov BYTE PTR [esi+2], "z"    ; by adding 1 more to esi.
   mov esi, arrayshort; Load ESI with the address of the short array.
   add WORD PTR [esi], 7        ; Since a short is 2 bytes long, each
   add WORD PTR [esi+2], 7      ; successive element can be accessed
   add WORD PTR [esi+4], 7      ; by adding 2 more to esi.
   mov esi, arraylong ; Load ESI with the address of the long array.
   inc DWORD PTR [esi]          ; Since a long is 4 bytes long, each
   inc DWORD PTR [esi+4]        ; successive element can be accessed
   inc DWORD PTR [esi+8]        ; by adding 4 more to esi.
   ret
MasmSub ENDP
END

Sample Code - Step-by-Step Instructions for Building CAPP

Use the following steps to create the project:

  1. Start the Visual C++ Developer Studio program (Msdev.exe).
  2. Create and save Cmain.c and MasmSub.asm.
  3. On the File menu, click New. Create a new console application named CAPP.

Use the following steps to build the project:

  1. On the Project menu, click Add To Project, and then click Files.
  2. Find and select both Cmain.c and MasmSub.asm.
  3. In the Project Workspace window, right-click the file MasmSub.asm and click Settings on the shortcu menu.
  4. On the Project Settings dialog box, select All Configurations in the Settings For list.
  5. Click the Custom Build tab.
  6. In the first line of the Build command(s) dialog box, enter ml.exe. Then enter the desired MASM command-line options, -Fo immediately followed by the macros for the Intermediate directory and file Input Name followed by .obj with the macros separated by a backslash (\), and the macro for the file Input Name followed by .asm. Obtain the macros by selecting the Directories button and choosing Intermediate; then select the Files button and choose Input Name from the resulting menu. For example, the entry would appear as follows:

    ml.exe -c -coff -Cx -Fo$(IntDir)\$(InputName).obj $(InputName).asm

    Note that you must always add -c and -coff when using MASM. For the debug build, select the Win32 Debug configuration and add the -Zi switch.

  7. In the first line of the Output file(s) dialog box, enter $(IntDir)\$(InputName).obj. You can obtain the macros with the same procedure used in step 6.
  8. Select the desired build configuration. On the Build menu, click Rebuild All.

For more information on custom build rules, see the Visual C++ online Help for the Custom Build tab (press the Help button in the Project Settings dialog box when the Custom Build tab is selected).