I have a question regarding the MULU instruction, its something of a weird behavior after doing it on a certain value. Suppose I have 000FFFFF in a data register. Now what I want to do is add another F so that the value is 00FFFFFF. What I do is I first multiply the current value by 16, and and 'F' like so:
MULU #16, d4
ADD.B #$F, d4
The problem is that in the state of 000FFFFF, when I go to perform that operation again, I don't get another F, instead I get 000FFFF0. Another thing I've noticed is that if I just add 1 to 000FFFFF, the Extend, Zero, and bits are 1. What can I do remedy this issue?
If instead of multiplying by 16, I multiply by 17, I get that new bit (00XXXXXX).