Answered! In assembly language x86 only, define a procedure to compute the square root estimate for a 32-bit unsigned…

In assembly language x86 only, define a procedure to compute the square root estimate for a 32-bit unsigned integer. Use the Newton-Raphson method of successive approximations to calculate a square root estimate for each positive integer. Given a positive number N, successive estimates of the square root follow from

Xn = (N / Xn-1 + Xn-1) / 2

For example, the square root estimate of 5 is 2 and square root estimate16 is 4.

Expert Answer

 

#fasm#

org 100h

MOV AX,9 ;number to find the square root
MOV BX,0FFFFh
MOV CX,00
L1: INC CX
ADD BX,02
SUB AX,BX
JNZ L1
MOV [1200],CX
HLT
ret

Here the result is stored in Cx register and address location 1200

Still stressed from student homework?
Get quality assistance from academic writers!