in r16,PINB ; Read pin values ldi r17,5 ; Load 5 into r17 mul r16,r17 ; r1:r0 = r17 * r16 movw r17:r16,r1:r0 ; Move the result to the r17:r16 register pair
Note the use of the MOVW instruction. This example is valid for all of the multiply instructions.