Can you by chance give me an idea of what the loop in the code is doing?
Work through it by hand using pen and paper - the way I would have to do! What's stored at 0x4026c0?