__stosb
Microsoft Specific
Generates a store string instruction (rep stosb
).
Syntax
void __stosb(
unsigned char* Destination,
unsigned char Data,
size_t Count
);
Parameters
Destination
[out] The destination of the operation.
Data
[in] The data to store.
Count
[in] The length of the block of bytes to write.
Requirements
Intrinsic | Architecture |
---|---|
__stosb |
x86, x64 |
Header file <intrin.h>
Remarks
The result is that the character Data is written into a block of Count bytes in the Destination string.
This routine is only available as an intrinsic.
Example
// stosb.c
// processor: x86, x64
#include <stdio.h>
#include <intrin.h>
#pragma intrinsic(__stosb)
int main()
{
unsigned char c = 0x40; /* '@' character */
unsigned char s[] = "*********************************";
printf_s("%s\n", s);
__stosb((unsigned char*)s+1, c, 6);
printf_s("%s\n", s);
}
*********************************
*@@@@@@**************************
END Microsoft Specific
See also
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho