Code Scrappers


8086 PROGRAM TO CALCULATE SQUARE ROOT


            MOV   AX, [4100]

            SHR   AX, 1

            MOV   [4102], AX

            MOV   AX, [4100]

            MOV   DX, #0000

            DIV   WPTR [4102]

            ADD   AX,[4102]

            SHR   AX, 1

            CMP   AX, [4102]

            JNL   4023

            MOV   [4102], AX

            JMP   4008

            INT   3


          


Process for execution on 8086 kit



                >>  Switch on the power supply.

                >>  Press A two times.

                >>  Type 'SG 0'.

                >>  Type DA 4000.

                >>  '@' Symbol will appear.

                >>  Type the code and press 'N' each time for new line.

                >>  After typing the code come to new line.

                >>  Press 'shift+1' and enter.

                >>  Press 'EX'.

                >>  Press 'E' followed by memory address [eg. 4100].

                >>  Press comma(,) and then give the input.

                >>  Press 'G'.

                >>  Type 4000 and enter.

                >>  Press 'R' followed by 'E'

                >>  The result is obtained in hexadecimal.


              


Input And Output


                INPUT-->

                [4100] : 40

                [4101] : 00

                {4000 = HEXADECIMAL value of 64}

                OUTPUT-->

                AX : 08