Following is the assembly language program to find square root of 8-bit number.
In this program we initially load the index registers with specified values. We load the value of the number into SI Register. Then using a few logical steps as mentioned in the code i.e JMP insctructions we find the square root of a 8-bit number.
MOV AL,[SI] ; Load AL with the value given as at SI
UP SUB AL,CL
JL down ; jump to down label
ADD CL,02 ; add 2 to contents of CL register
JMP UP ; jump to up label
Thus by implementing the above code we can find the square root of 8-bit number
square root of hexa decimal number
You might be also interested in:
:: Find Square Root of a hexadecimal number in assembly language
:: common intreview questions on 8086
:: Assembly Language Source Codes