__stosw
Microsoft 特定的
產生存放區字串指令 (rep stosw
)。
語法
void __stosw(
unsigned short* Destination,
unsigned short Data,
size_t Count
);
參數
目的地
[out]作業的目的地。
Data
[in]要儲存的資料。
Count
[in]要寫入之字組的長度。
需求
內建 | 架構 |
---|---|
__stosw |
x86、x64 |
頭檔<intrin.h>
備註
結果是 Data 一字會寫入目的地字串中的 Count 字組。
此常式僅可作為內建常式使用。
範例
// stosw.c
// processor: x86, x64
#include <stdio.h>
#include <intrin.h>
#pragma intrinsic(__stosw)
int main()
{
unsigned short val = 128;
unsigned short a[100];
memset(a, 0, sizeof(a));
__stosw(a+10, val, 2);
printf_s("%u %u %u %u", a[9], a[10], a[11], a[12]);
}
0 128 128 0
END Microsoft 特定的