__movsb

Microsoft 固有の仕様

文字列の移動命令 (rep movsb) を生成します。

構文

void __movsb(
   unsigned char* Destination,
   unsigned const char* Source,
   size_t Count
);

パラメーター

宛先
[out] コピー先へのポインター。

ソース
[in] コピー元へのポインター。

Count
[in] コピーするバイト数。

必要条件

Intrinsic アーキテクチャ
__movsb x86、x64

ヘッダー ファイル<intrin.h>

解説

結果として、Source が指す最初の Count バイトが Destination 文字列にコピーされます。

このルーチンは、組み込みとしてのみ使用できます。

// movsb.cpp
// processor: x86, x64
#include <stdio.h>
#include <intrin.h>

#pragma intrinsic(__movsb)

int main()
{
    unsigned char s1[100];
    unsigned char s2[100] = "A big black dog.";
    __movsb(s1, s2, 100);

    printf_s("%s %s", s1, s2);
}
A big black dog. A big black dog.

Microsoft 固有の仕様はここまで

関連項目

コンパイラの組み込み