8086 program Write an ALP to perform sorting of array in descending order.

Code :-

org 100h

MOV SI, 2000H 

MOV DI, 2000H

MOV DL , 04H

L3:MOV AL,[SI]

MOV CL,DL

L2 :INC SI

MOV BL,[SI]

CMP AL,BL

JNC L1   

JZ L1

XCHG AL,BL

MOV [SI] , BL

L1:LOOP L2

MOV [DI] ,AL

INC DI

MOV SI,DI

DEC DL

JNZ L3

ret

Output :-



Comments

Popular Posts

What is Tinkercad ? How to use Tinkercad ?

Connect switch to Arduino. If switch is on than print ”ON” else print “OFF” on serial monitor.

Set the time using four switch and display the clock on LCD using arduino ** SW1 : when press, increment 1 digit ** SW2 : when press, decrement 1 digit ** SW3 : when press, display set time and start the clock ** SW4 : when press, reset the clock