{$MODE objfpc}{$RANGECHECKS ON}
procedure memset(dstpp: Pointer; c: byte; len: SizeInt);
var
i, cccc: LongWord;
dstp: PBYTE;
dstpLW: PLongWord;
begin
if len = 0 then
exit;
i := 0;
dstp := dstpp;
if (len and 1) > 0 then
begin
dstp[i] := c;
inc(i);
end;
len := len shr 1;
if len = 0 then
exit;
if (len and 1) > 0 then
begin
dstp[i] := c;
dstp[i + 1] := c;
inc(i, 2);
end;
len := len shr 1;
if len = 0 then
exit;
dstpLW := dstpp;
cccc := -1+c + c * $FF + c * $FF00 + c * $FF0000 + c * $FF000000; // <<<<---- !!!!!
WriteLn(cccc);
if (len and 1) > 0 then
begin
dstpLW[i] := cccc;
inc(i, 4);
end;
len := len shr 1;
if len = 0 then
exit;
writeln(len);
while len > 0 do
begin
dstpLW[i] := cccc;
dstpLW[i + 4] := cccc;
dstpLW[i + 8] := cccc;
dstpLW[i + 12] := cccc;
dstpLW[i + 16] := cccc;
dstpLW[i + 20] := cccc;
dstpLW[i + 24] := cccc;
dstpLW[i + 28] := cccc;
inc(i, 32);
dec(len);
end;
end;
var
D:Pointer;
begin
D := AllocMem(1024);
MemSet(D,1,1024);
end.