debugged psr code for 32 bit linux and 64 bit mac system