data coruption with printf in user code

To overcome the limitations of the “PrintToScreen” built in function (one variable) I tried to use the “user Code function” in EasyC Pro. Here is the code I used:

printf ( “%4d %4d %4d %6d %6d %6d %6d %4d %4d %6d %6d\n”, (int)loop, (long)Timer_1, (int)Step, (long)Position_X, (long)Position_Y, (long)ENC_X, (long)ENC_Y, (int)ACC_X, (int)ACC_Y, (unsigned int)Ultrasonic_Front, (unsigned int)Ultrasonic_Rear );

Whenever I use this command, and many variations that I have tried to debug, I find that the variables get corrupted.

I have tried to create dummy (long) variables and placed them in between the existing variables. They also got corrupted!

Has anyone encountered problems with the real printf command in EasyC Pro? Any ideas on a work around?