Convert PLAY ASM to C.

Converted the useful ASM routines to C for portability.