;;yhx0 ;; Dump of function1 ;; Generated on Thu, 16 Feb 2012 15:39:36 GMT ; ; Type or paste assembly code here ; ; then click on the button above ; ; to import it in a new interactive editing window. ; ; Example of R16 × R16 multiply ; ; YASEP16 : 13 instructions, 44 bytes ; ; R1 x R2 => R3-R4 (R5=scratch) ; ; R2 left modified (rotated) after execution ; ; the 2 middle bytes are computed together 3B 12 00 03 ; MUL8H R1 R2 R3 3B 21 00 04 ; MUL8H R2 R1 R4 ; Notice the exchange of operands 14 43 ; ADD R4 R3 ; carry reused later 0F 83 02 04 ; SHR 8 R3 R4 ; adjust between R3 and R4, 4E 83 ; SHL 8 R3 09 50 00 01 ; MOV 100h R5 ; speculative carry 73 45 80 04 ; OR R4 R5 R4 carry ; and put the carry back into R4 ; ; lower byte 1B 21 00 05 ; MUL8L R2 R1 R5 14 53 ; ADD R5 R3 17 14 82 04 ; ADD 1 R4 R4 carry ; ; higher byte 8E 82 ; ROL 8 R2 3B 21 00 05 ; MUL8H R2 R1 R5 14 54 ; ADD R5 R4 ; ; eventually : 6E 82 ; ROR 8 R2