Card Lib

Blitz3D Forums/Blitz3D Userlibs/Card Lib

And the MOD 13 command does it for you...