Share via


__movsw

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

The latest version of this topic can be found at __movsw.

Microsoft Specific**

Generates a Move String (rep movsw) instruction.

Syntax

void __movsw(   
   unsigned short* Dest,   
   unsigned short* Source,   
   size_t Count   
);  

Parameters

[out] Dest
The destination of the operation.

[in] Source
The source of the operation.

[in] Count
The number of words to copy.

Requirements

Intrinsic Architecture
__movsw x86, x64

Header file <intrin.h>

Remarks

The result is that the first Count words pointed to by Source are copied to the Dest string.

This routine is only available as an intrinsic.

Example

// movsw.cpp  
// processor: x86, x64  
#include <stdio.h>  
#include <intrin.h>  
  
#pragma intrinsic(__movsw)  
  
int main()  
{  
    unsigned short s1[10];  
    unsigned short s2[10] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };  
    __movsw(s1, s2, 10);  
  
    for (int i = 0; i < 10; i++)  
        printf_s("%d ", s1[i]);  
    printf_s("\n");  
}  
0 1 2 3 4 5 6 7 8 9   

END Microsoft Specific

See Also

Compiler Intrinsics