Motorola DSP Developer's Kit    
sqrt-sr.asm

MATLAB Usage

Description

This function calculates the square root of single input positive real data

Input/Output

Input: x

Output: y

Algorithm

Full 23(15) bit precision square root routine using a successive

approximation technique.

Memory & Register

Register b = output root

a = temporary storage

x0 = guess

x1 = bit being tested

y0 = input number

r6 = loop number(23 for 56300, 15 for 56600)

Status Register

The assembly function sqrt-sr.asm does not explicitly set any status registers/bits during the function execution.

Data Size Limit

The input is a single value.

Data Range Limit

The value of input X must be between -1.0 and +1.0.

Precision

In the case of DSP563, precision is 23 bits.

In the case of DSP566, precision is 15 bits.


 sort-c.asm sqrt-pr.asm