base:fast_sqrt

# Differences

This shows you the differences between two versions of the page.

 base:fast_sqrt [2019-08-04 02:03]verz base:fast_sqrt [2019-08-18 20:28]verz Both sides previous revision Previous revision 2019-08-18 20:28 verz 2019-08-18 10:20 verz 2019-08-04 02:03 verz 2019-07-27 21:28 verz 2019-07-27 18:20 verz 2019-07-24 00:43 verz 2019-07-23 00:16 verz 2015-04-17 04:31 external edit Next revision Previous revision 2019-08-18 20:28 verz 2019-08-18 10:20 verz 2019-08-04 02:03 verz 2019-07-27 21:28 verz 2019-07-27 18:20 verz 2019-07-24 00:43 verz 2019-07-23 00:16 verz 2015-04-17 04:31 external edit 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 ;* ;* ;*   computes Sqrt of a 32bit number ;*   computes Sqrt of a 32bit number + ;******************************************** + ;*   by Verz - Jul2019 + ;******************************************** ;* ;* - ;*      input:  square, the 4-byte source number + ;*  input:  square, 32bit source number - ;*      output: sqrt, 16bit value + ;*  output: sqrt,   16bit value - ;*              remnd, 17bit value + ;*          remnd,  17bit value - ;* + ;******************************************** sqrt32  lda #0 sqrt32  lda #0 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