I've noticed that the instruction set has an LSL (logical left shift), which does r << 1 (left shifts the register by 1). I'd like to be able to left shift by an arbitrary number. Do I need to do this in a loop, or is there a single instruction that would do this for me?
I imagine the reason for only shifting 1 bit is so that the carry is always OK, but in my case I will bit shifting 8 bit unsigned numbers a maximum of 8 bits to the left, to get unsigned 16 bit numbers... so I think I should be OK?
Thanks,
z.
ps full disclosure: I'm a student, but this is a small part of an assignment. The assignment is to implement multiplication without MUL. I imagine that I am expected to do multiple additions in a loop... but I wanted to do something different. So I am implementing it recursively with bit shifting! This is just one of the stumbling blocks on the road to my solution.