Please help me to write the following program in 8085 assembly language. Only guidelines required.
5 numbers are stored at consecutive memory location. Arrange them in ascending order and store them in another location.
>Unfortunately, I don't remember much
While interesting (well, not really), your post has no meaningful content relevant to this thread. If you're incapable of helping, there's no point in posting to inform everyone of it.
So it doesn't seem as if I'm just posting to complain, how have you tried to solve the problem so far? If there are always five numbers, you can brute force it without too much code, or you can write a more general sorting solution. Because you're moving the data to a different memory location, you would probably be best off using an insertion sort.
I have given a lot of thought to the problem. Actually the problem is arranging the numbers in ascending order. You see I can easily find the largest of the numbers by using loops or something sort of that.
I have an idea to solve this one too but the code is becoming too large. Another problem Iam facing is that the program has to be coded in 8085 Assembly Language. The program is easy to be made in other languages but not in 8085.
Thatz it !!!!! Sorting 6 numbers in memory starting from 0060H hex address (Selection sort algo) -------------------------
LXI H, 0060H
MVI B, 05H
LOOP1: MOV C, B
MOV D, H
MOV E, L
LOOP2: LDAX D
SWAP: MOV D, M
MOV M, A
MOV A, D
MOV D, H
NO_SWP: INR E