;********************************************************************** ;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 13:40, local time: 2024/11/16 03:44,
owner: NG--944,
3.147.74.197: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://massmind.ecomorder.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 ecomorder.com! |
Welcome to massmind.ecomorder.com! |
.