Have you done anything with interrupts yet? That is what the ASM is doing in this code.
We have touched on it, we did a timing loop interrupt program (it might have been before I bought the full PBP program) so quite a while back .

So where to start then?