Multiply 8 bits by 8 bits in software by http://elm-chan.org/
;-----------------------------------------------------------------------------: ; 8bit x 8bit unsigned multiply ; ; Register variables: ; Call: var10 = 8bit multiplicand ; var11 = <don't care> ; var20 = 8bit multiplier ; lc = <don't care> (high register must be allocated) ; ; Result:var1[1:0] = 16bit result of var10 * var20 ; var20 = <not changed> ; lc = 0 ; ; Size = 9 words ; Clock = 64 cycles (+ret) ; Stack = 0 byte mul08u: sub var11,var11 ;initialize variables ldi lc,9 ; lc = 9; brcc PC+2 ;---- calcurating loop add var11,var20 ; ror var11 ; ror var10 ; dec lc ;if (--lc > 0) brne PC-5 ; continue loop; ret
file: /Techref/atmel/avr/mul8x8sw-ec.htm, 1KB, , updated: 2007/9/14 16:45, local time: 2025/4/23 05:12,
18.97.14.85:LOG IN
|
©2025 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://www.piclist.com/techref/atmel/avr/mul8x8sw-ec.htm"> Atmel AVR, atmega, Microcontroller, embedded controller, math 8x8 unsigned</A> |
Did you find what you needed? |
![]() o List host: MIT, Site host massmind.org, Top posters @none found - Page Editors: James Newton, David Cary, and YOU! * Roman Black of Black Robotics donates from sales of Linistep stepper controller kits. * Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters. * Monthly Subscribers: Gregg Rew. on-going support is MOST appreciated! * Contributors: Richard Seriani, Sr. |
Welcome to www.piclist.com! |
.