base:fast_sqrt
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
base:fast_sqrt [2019-08-04 02:03] – verz | base:fast_sqrt [2019-08-18 20:28] (current) – verz | ||
---|---|---|---|
Line 397: | Line 397: | ||
This is the code for a 32bit integer Sqrt. Provides the result and the remainder: | This is the code for a 32bit integer Sqrt. Provides the result and the remainder: | ||
- | < | + | < |
; | ; | ||
;* sqrt32 | ;* sqrt32 | ||
;* | ;* | ||
;* | ;* | ||
+ | ; | ||
+ | ;* by Verz - Jul2019 | ||
+ | ; | ||
;* | ;* | ||
- | ;* input: | + | ;* input: |
- | ;* output: sqrt, 16bit value | + | ;* output: sqrt, |
- | ;* remnd, 17bit value | + | ;* remnd, |
- | ;* | + | ;******************************************** |
sqrt32 | sqrt32 | ||
Line 414: | Line 417: | ||
;sta T+1 ; (T+1) is zero until last iteration; (T+0) is always 0 | ;sta T+1 ; (T+1) is zero until last iteration; (T+0) is always 0 | ||
+ | clc | ||
ldy #14 ; 15 iterations (14-->0) + last iteration | ldy #14 ; 15 iterations (14-->0) + last iteration | ||
loopsq | loopsq |
base/fast_sqrt.txt · Last modified: 2019-08-18 20:28 by verz