diff --git a/rtl/avr/avr.inc b/rtl/avr/avr.inc index 8b45d971fd..dbb4f87eaf 100644 --- a/rtl/avr/avr.inc +++ b/rtl/avr/avr.inc @@ -28,6 +28,59 @@ procedure fpc_cpuinit; end; +{$define FPC_SYSTEM_HAS_MOVE} +procedure Move(const source;var dest;count:SizeInt);[public, alias: 'FPC_MOVE']; +var + aligncount : sizeint; + pdest,psrc,pend : pbyte; +begin + if (@dest=@source) or (count<=0) then + exit; + if (@dest<@source) or (@source+count<@dest) then + begin + { Forward Move } + psrc:=@source; + pdest:=@dest; + pend:=psrc+count; + while psrc@source do + begin + dec(pdest); + dec(psrc); + pdest^:=psrc^; + end; + end; +end; + + +{$define FPC_SYSTEM_HAS_FILLCHAR} +Procedure FillChar(var x;count:SizeInt;value:byte); +var + pdest,pend : pbyte; + v : ptruint; +begin + if count <= 0 then + exit; + pdest:=@x; + pend:=pdest+count; + while pdest