Hi,
I've written a program which takes a while to complete what it has to do, going through a loop several billion times (You'd think it'd be speedy on a P4, but nooooooooo... ), and I've tried adding a "busy" animation so I know it hasn't crashed. The way I tried to do it was:-
Code:
char chBusy[4] = { 0x2F, 0x2D, 0x5C, 0x7C }; // "/", "-", "\", "|"
int iBusyIndex = 0;
(inside loop)
putchar(0x08); // backspace to remove previous character
putchar(chBusy[iBusyIndex++]);
if (iBusyIndex = 4)
iBusyIndex = 0;
else
iBusyIndex++;
However, this doesn't produce the desired effect. I can't actually see the animation (perhaps it changes too quickly?) and the cursor hops back and forth like mad. What's the proper way, please?