;********************************************************************** ;SMALL 8 BIT SQUARE ROOT ; ;Author: Nikolai Golovchenko <golovchenko at mail.ru> ;Idea: Scott Dattalo <www.dattalo.com> ;"Hint: n^2 = sum of the first n odd integers.(e.g 9 = 3*3 = 1 + 3 + 5)" ;Date: February 16, 2000 ; ;Input: x ;Output: y ;ROM - 10 ;RAM - 2 ;Timing, including call and return ;Best case: 6+9=15 cycles ;Worst case: 6+2+8*16-2+1=135 cycles ;********************************************************************** Sqrt8s mov W, #-1 mov y, W Sqrt8s1 inc y inc y mov W, y sub x, W snb C jmp Sqrt8s1 rr y ret ;**********************************************************************
See:
file: /Techref/scenix/lib/math/sqrt/sqrt8ngsd_sx.htm, 1KB, , updated: 2004/6/10 14:40, local time: 2024/10/31 18:02,
owner: NG--944,
3.15.149.144:LOG IN ©2024 PLEASE DON'T RIP! THIS SITE CLOSES OCT 28, 2024 SO LONG AND THANKS FOR ALL THE FISH!
|
©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/scenix/lib/math/sqrt/sqrt8ngsd_sx.htm"> SX Microcontroller Math Method - Small 8 Bit Square Root</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! |
.