Arm/memcpy

From ASMBits

Write a function that copies a block of memory from the source location to the destination location. The source and destination are byte-aligned, and length can be any number of bytes.

The source and destination arrays will not overlap. The source and destination arrays do not wrap around the top of memory space (i.e., 0 <= source, and source+length <= 4GB).

void memcpy (char* destination, char* source, unsigned int length);

Expected solution length: Around 10 lines.

Sample Input

0x9999, 0, 0, 0, 0, 0xaaaa, 1, 2, 3, 4, 0xbbbb
Copy 16 bytes from offset 24 to offset 4 

Sample Output

0x9999, 1, 2, 3, 4, 0xaaaa, 1, 2, 3, 4, 0xbbbb

Write your solution here

Upload a source file...