24 lines
283 B
C++
24 lines
283 B
C++
![]() |
#include "./memory.hpp"
|
||
|
#include "./types.hpp"
|
||
|
|
||
|
int memcpy(u8 source, u8 dest, u32 size){
|
||
|
|
||
|
u8 *sourceTmp=(u8 *)source;
|
||
|
u8 *destTmp=(u8 *)dest;
|
||
|
|
||
|
int progress=0;
|
||
|
|
||
|
while(progress != size){
|
||
|
|
||
|
*destTmp=*sourceTmp;
|
||
|
|
||
|
sourceTmp++;
|
||
|
destTmp++;
|
||
|
|
||
|
progress++;
|
||
|
}
|
||
|
|
||
|
return progress;
|
||
|
|
||
|
}
|