SW006013 Microchip Technology, SW006013 Datasheet - Page 121

MPLAB C Compiler For DsPIC DSCs

SW006013

Manufacturer Part Number
SW006013
Description
MPLAB C Compiler For DsPIC DSCs
Manufacturer
Microchip Technology
Series
DsPIC30F/33Fr
Type
MPLAB® C Compilerr
Datasheet

Specifications of SW006013

Supported Families
DsPIC30F, DsPIC33F
Core Architecture
DsPIC
Kit Contents
Software And Docs
Mcu Supported Families
DsPIC30F And DsPIC33F
Tool Function
Compiler
Tool Type
Compiler
Processor Series
dsPIC
Lead Free Status / RoHS Status
na
For Use With/related Products
dSPIC DSCs
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
© 2008 Microchip Technology Inc.
memcpy
Description:
Include:
Prototype:
Arguments:
Return Value:
Remarks:
Example:
Copies characters from one buffer to another.
<string.h>
void *memcpy(void *dst , const void *src , size_t n);
dst
src
n
Returns dst.
memcpy copies n characters from the source buffer src to the destina-
tion buffer dst. If the buffers overlap, the behavior is undefined.
#include <string.h> /* memcpy
#include <stdio.h>
int main(void)
{
}
Output:
buf1 :
buf2 : Where is the time?
buf3 : Why?
buf1 after memcpy of 6 chars of buf2:
buf1 after memcpy of 5 chars of buf3:
char buf1[50] = "";
char buf2[50] = "Where is the time?";
char buf3[50] = "Why?";
printf("buf1 : %s\n", buf1);
printf("buf2 : %s\n", buf2);
printf("buf3 : %s\n\n", buf3);
memcpy(buf1, buf2, 6);
printf("buf1 after memcpy of 6 chars of "
printf("\n");
memcpy(buf1, buf3, 5);
printf("buf1 after memcpy of 5 chars of "
Where
Why?
"buf2: \n\t%s\n", buf1);
"buf3: \n\t%s\n", buf1);
buffer to copy characters to
buffer to copy characters from
number of characters to copy
/* for printf */
*/
DS51456E-page 117

Related parts for SW006013