PiegOS/kernel/Helpers/memory.cpp

24 lines
283 B
C++
Raw Normal View History

2015-07-20 20:06:20 +04:00
#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;
}