Code:
; 16bit by 8bit unsigned multiply ; by Martin Sturm 2010 ; tested over all input combinations ; ; Nothing special, just a modified version of 16x16 code on piclist.com ; ; if t is a temp ; W * bH:bL -> r3:r2:r1 ; 19 cycles, 85-125, 105 average ; ; else, comment out MOVWF t ; t * bH:bL -> r3:r2:r1 (t is modified) ; 18 cycles, 84-124, 104 average ; MULT_16x8_SMALL MACRO bH,bL, t, r3,r2,r1 LOCAL m1, m2 CLRF r3 CLRF r2 CLRF r1 MOVWF t ; optionally comment out BSF r1,7 m1: RRF t,F SKPC GOTO m2 MOVFW bL ADDWF r2,F MOVFW bH SKPNC INCFSZ bH,W ADDWF r3,F m2: RRF r3,F RRF r2,F RRF r1,F SKPC GOTO m1 ENDM
file: /Techref/microchip/math/mul/m16x8mds2.htm, 1KB, , updated: 2010/4/12 20:53, local time: 2024/12/22 15:28,
owner: MDS-gmail-IE8,
18.189.192.214:LOG IN
|
©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions? <A HREF="http://sxlist.com/techref/microchip/math/mul/m16x8mds2.htm"> PIC Microcontoller Math Method 16x8 multiply from Martin Sturm</A> |
Did you find what you needed? |
Welcome to sxlist.com!sales, advertizing, & kind contributors just like you! Please don't rip/copy (here's why Copies of the site on CD are available at minimal cost. |
Welcome to sxlist.com! |
.