Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

__stosd

Microsoft Specific

Generates a store string instruction (rep stosd).


void __stosd( 
   unsigned long* Dest, 
   unsigned long 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 doublewords to write.

Intrinsic Architecture

__stosd

x86, x64

Header file <intrin.h>

The result is that the doubleword Data is written into a block of Count doublewords at the memory location pointed to by Dest.

This routine is only available as an intrinsic.

// stosd.c
// processor: x86, x64

#include <stdio.h>
#include <memory.h>
#include <intrin.h>

#pragma intrinsic(__stosd)

int main()
{
    unsigned long val = 99999;
    unsigned long a[10];

    memset(a, 0, sizeof(a));
    __stosd(a+1, val, 2);

printf_s( "%u %u %u %u",
              a[0], a[1], a[2], a[3]); 
}

Output

0 99999 99999 0

Community Additions

ADD
Show:
© 2015 Microsoft