; ------------------------------------------------- ; mul8x8.inc.jsm ; ------------------------------------------------- ; ------------------------------------------------- ; Parameter: ; R0 : operand 1 ; R1 : operand 2 ; Return: ; R0 : product low ; R1 : product high mul8x8: push R2 push R3 push R4 mov R4, R1 mov R1, 0 mov R2, 0 mov R3, 0 loop1: cmp R4, 0x01 jeq ende1 shr R4 jnc next1 add R2, R0 addc R3, R1 next1: shl R0 rolc R1 jmp loop1 ende1: add R0, R2 addc R1, R3 pop R4 pop R3 pop R2 ret ; -------------------------------------------------