That's correct, my code meant to check for the end loop condition when going from page 0 up through all the available pages, so it didn't matter. But if you move the BEQ after STA PPAGE, you'll get the same logic flow.
JimDon wrote:
There is also a big difference in the logic flow.
In the second case, PPAGE gets incremented regardless.
In the first case if you take the branch, you will not save it back to PPAGE.
Thanks for the tip....