Board Thread:Questions and Answers/@comment-24837408-20150610134832/@comment-9531161-20150610201513

You can't just say 60-MAINCNTL lol.

The problem is the check: "IF NXNX". But NX is MAINCNTL+60, so MAINCNTL won't be strictly greater than NX until it's +61. Just change it to "IF NX<=MAINCNTL", and keep in mind that the order of comparisons can sometimes impact code readability.