SMPTE Time Code Algorithms/Code

Can anyone point me to a source of algorithms or code (Pascal or C)
which converts from sample count to SMPTE and vice versa for various
frame rates (including drop frame) and sample rates.  

Any leads would be appreciated.  

---------------------
Al Testani

a...@emi.net
Boca Raton, FL
---------------------