This subroutine will multiply 16-bit value at r19:r18 with 8-bit value at r20. Result is 24-bit at r4:r3:r2.
(r19:r18)
(r20)
---------- X
(r4:r3:r2)
mul16by8:
mul r18,r20
mov r2,R0
mov r3,R1
mul r19,r20
mov r4,R1
add r3,R0
brcc NoInc
inc r4
NoInc:
ret