G code interpreter in c