__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 特定的
另請參閱
意見反映
https://aka.ms/ContentUserFeedback。
即將推出:我們會在 2024 年淘汰 GitHub 問題,並以全新的意見反應系統取代並作為內容意見反應的渠道。 如需更多資訊,請參閱:提交及檢視以下的意見反映: