The problem is this line:
Code:
PUInt8( Addr )^ := R or G or B;
Addr is declared as:
Code:
Addr         : cardinal;
And cardinal is a 32bit, which isn't going to work on a 64bit OS

Overall looking sdlutils.pas reveals some pretty bad code(bad in the sense it shouldn't be used for crossplatform use). Cardinal is used all over for pointer arithmetic. Unless it's given a large overhaul it won't work on anything but 32bit platforms