Skip to content

Instantly share code, notes, and snippets.

@osamaadam
Created January 17, 2020 20:22
Show Gist options
  • Save osamaadam/e1809c86a645c3bf574a3938656e2e59 to your computer and use it in GitHub Desktop.
Save osamaadam/e1809c86a645c3bf574a3938656e2e59 to your computer and use it in GitHub Desktop.
#include <reg52.h>
unsigned char xdata loc1 _at_ 0x1000;
unsigned char xdata loc2 _at_ 0x2000;
unsigned char xdata *ptr1;
unsigned char xdata *ptr2;
int main()
{
int i = 0;
ptr1 = &loc1;
ptr2 = &loc2;
for (i = 0; i < 1000; i++)
{
*ptr2 = *ptr1;
ptr1++;
ptr2++;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment