I fixed a problem with division and modulus. Apparently I shouldn't be allowed to read data sheets anymore. The operands were swapped, and the wrong byte of the return value was returned as a result (A/B retuned B%A, A%B returned B/A).
What makes me sick is that I specifically went over all this earlier, and made a point of spending lots of time to make this right. I failed.
At least it seems to work now.