Code Scrappers


8086 PROGRAM TO SORT NUMBERS IN ASCENDING ORDER


              MOV   CL, #04

              MOV   AH, #00

              MOV   BX, #4100

              MOV   DL, CL

              MOV   AL, [BX]

              INC   BX

              CMP   AL, [BX]

              JC    410A

              JE    410A

              MOV   DH, [BX]

              DEC   BX

              MOV   [BX], DH

              INC   BX

              MOV   [BX], AL

              DEC   DL

              JNZ   4009

              DEC   CL

              JNZ   4004

              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 'E' for exambyte.

                >>  Type the memory address [eg. 4100].

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

                >>  Press 'G'.

                >>  Type 4000 and enter.

                >>  Type 'E'.

                >>  Type the address where the result is stored and press comma(,)


              


Input And Output


                INPUT-->

                [4100] : 50

                [4101] : 20

                [4102] : 10

                [4103] : 40

                [4104] : 30


                OUTPUT-->

                [4100] : 10

                [4101] : 20

                [4102] : 30

                [4103] : 40

                [4104] : 50