Keil Logo

memset

Summary
void memset (
  unsigned long start_address, /* memory start address */
  unsigned long length,        /* memory length        */
  unsigned char value          /* value to write       */
)
Description

The debug function memset fills the memory specified through start address and length with the character value.

Note

  • The order of the parameters length and value of the debug function memset are inverted compared to the standard C function memset.
  • [MDK] The parameter length can specify a maximum amount of memory of 64 KB.
  • [PK51, DK251] The parameter length can specify a maximum amount of memory of 64 KB.
  • [C166] The parameter length can specify a maximum amount of memory of 16 MB.
Return Value

None

Example
>MEMSET (0x20000, 0x1000, 'a')       /* Fill 0x20000 to 0x20FFF with 'a' */
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.