分享方式:


__movsb

Microsoft 特定的

產生移動字串 ( rep movsb ) 指令。

語法

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

參數

目的地
[out]複本目的地的指標。

Source
[in]複本來源的指標。

Count
[in]要複製的位元組數目。

需求

內建 架構
__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.

END Microsoft 特定的

另請參閱

編譯器內建函式