Create p1850.c

Based on @Jack-Chen's source code.