Set up R12 and R13 with the numbers you want to multiply, both sides can be any number 0 to 255.
Returns a 16bit value in R13
Every instruction are single word type and it take 27-to-35cycles (plus 3 for ret)
I don't have to clear c before rrc is due to if JNC was done it was of course already clear
if the add.w is done it will always clear c too.
I want to see you C programmer make this a function call and post it here.
Example mov.b #240,r12
mov.b #221,r13
call #multiply
bis.w #CPUOFF+GIE,SR
;--------------------------------
multiply swpb R12
clrc
rrc.w r12
_bit0 rrc.w r13
jnc _bit1
add.w r12,r13
_bit1 rrc.w r13
jnc _bit2
add.w r12,r13
_bit2 rrc.w r13
jnc _bit3
add.w r12,r13
_bit3 rrc.w r13
jnc _bit4
add.w r12,r13
_bit4 rrc.w r13
jnc _bit5
add.w r12,r13
_bit5 rrc.w r13
jnc _bit6
add.w r12,r13
_bit6 rrc.w r13
jnc _bit7
add.w r12,r13
_bit7 rrc.w r13
jnc _bitend
add.w r12,r13
_bitend ret