Skip to content

Latest commit

 

History

History
108 lines (88 loc) · 1.99 KB

File metadata and controls

108 lines (88 loc) · 1.99 KB
title __stosb | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-tools
ms.tgt_pltfrm
ms.topic article
f1_keywords
__stosb
dev_langs
C++
helpviewer_keywords
rep stosb instruction
__stosb intrinsic
stosb instruction
ms.assetid 634589ed-2da3-439b-a381-a214d89bf10c
caps.latest.revision 15
author corob-msft
ms.author corob
manager ghogen
translation.priority.ht
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
ru-ru
zh-cn
zh-tw
translation.priority.mt
cs-cz
pl-pl
pt-br
tr-tr

__stosb

Microsoft Specific

Generates a store string instruction (rep stosb).

Syntax

void __stosb(   
   unsigned char* Dest,   
   unsigned char Data,   
   size_t Count   
);  

Parameters

[out] Dest
The destination of the operation.

[in] Data
The data to store.

[in] Count
The length of the block of bytes to write.

Requirements

Intrinsic Architecture
__stosb x86, [!INCLUDEvcprx64]

Header file <intrin.h>

Remarks

The result is that the character Data is written into a block of Count bytes in the Dest 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

Compiler Intrinsics