Maybe something from the comp.lang.ada archive?
https://archive.legitdata.co/comp.lang.ada/?q=a:dewar&o=-1
Very interesting to browse, thanks Jeremy. It is interesting that he also says Ada has much more flexible pointer arithmetic than C in the above link.
Though I really meant 1a looks most readable but 1c more portable. There is a Spark compatible version from Rod Chapman here.
http://computer-programming-forum.com/44-ada/dfac35f604a197ea.htm
I shall likely turn Spark off for a tiny function that just does byte access, etc…
Perhaps C style shifting is the answer though my feeling is that it is more likely to hide bugs.
I was just wondering if Ada 2012 or later might offer anything new that R. Dewar, might have added to that page if he were to write it today?