It is looping but it never makes it into the tickcount if clause as tickcount is never incremented.
More importantly though attempting to use a loop like this will cause the program to be forcibly halted as it never yields. One way to work around this might be to use a sleep statement of some...