check this solution
LOAD EX, 2020H // initialize array elements
MVI CX, 0Ah // initialize array elements10 numbers
MVI AX, 00h
MOV AX, EX
CMP AX, EX
JMP L2
JG L1
JL L4
L4: MOV AX, EX
MOV BX, AX
JMP L2
L1: MOV AX, EX
MOV DX, AX
L2: INX EX
DEX CX
CMP CX, 00h
JEQ Exit
JMP L3
Exit: End
LOAD EX, 2020H // initialize array elements
MVI CX, 0Ah // initialize array elements10 numbers
MVI AX, 00h
MOV AX, EX
CMP AX, EX
JMP L2
JG L1
JL L4
L4: MOV AX, EX
MOV BX, AX
JMP L2
L1: MOV AX, EX
MOV DX, AX
L2: INX EX
DEX CX
CMP CX, 00h
JEQ Exit
JMP L3
Exit: End
be the member of
Post a Comment