Code Scrappers


8086 PROGRAM TO CONVERT BCD TO HEXADECIMAL


            MOV   AL, [4100]

            MOV   BL, AL

            AND   AL, #0F

            MOV   BH, AL

            AND   BL, #0F0

            MOV   CL, 4

            ROR   BL, CL

            MOV   AL, #0A

            MUL   BL

            ADD   AL, BH

            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] : 52

                OUTPUT-->

                AX : 34