;**********************************************************************
;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:
See also:
| file: /Techref/scenix/lib/math/sqrt/sqrt8ngsd_sx.htm, 1KB, , updated: 2004/6/10 13:40, local time: 2012/2/9 21:59,
owner: NG--944,
38.107.179.234:LOG IN |
| ©2012 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/scenix/lib/math/sqrt/sqrt8ngsd_sx.htm"> SX Microcontroller Math Method - Small 8 Bit Square Root</A> |
| Did you find what you needed? |
|
Calculator 7-seg LED chars, port values, resistor color codes and common values, ohms law, wavelength / frequency, RMS and Peak, max value for x bits, etc... |
|
Ashley Roll has put together a really nice little unit here. Leave off the MAX232 and keep these handy for the few times you need true RS232! |
.