Hi MarkMLI,
Take a look at the attached. Though not fully fleshed - missing some stuff for signed integers - it may be a good starting point. External dependency - FPC has to provide support up to 64 bit types, which I understand from PascalDragons response can be assumed.
If you want/need to extend, then pls let me know. Maybe I can help.
Cheers,
MathMan