;********************************************************************** ;by Nikolai Golovchenko ;8 bit SQARE ROOT ;ACCB0 input/output ;TEMPB0, TEMPB1 used for temporary storage ;3+16*4-2+5=70 cycles execution time ;20 words of program memory ;3 bytes of RAM ;********************************************************************** Sqrt8 mov W, #$40 mov TEMPB1, W clr TEMPB0 sqrt8a mov W, TEMPB1 or W, TEMPB0 mov W, ACCB0-w snb C mov ACCB0, W rr TEMPB0 mov W, TEMPB1 snb TEMPB0.7 or TEMPB0, W clrb TEMPB0.7 rr TEMPB1 rr TEMPB1 sb TEMPB1.7 jmp sqrt8a mov W, TEMPB0 mov ACCB0, W ret ;********************************************************************** ;Last updated 15Nov99
file: /Techref/scenix/lib/math/sqrt/sqrt8_sx.htm, 1KB, , updated: 2004/6/10 13:40, local time: 2024/12/22 05:34,
owner: NG--944,
3.137.221.114: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.org/Techref/scenix/lib/math/sqrt/sqrt8_sx.htm"> SX Microcontroller Math Method 8 Bit Square Root</A> |
Did you find what you needed? |
Welcome to massmind.org! |
Welcome to massmind.org! |
.