Hi... Could u please send me the complete program of "Sorting of numbers"? In Ascending Order. Regards , Zahid.
Hi sir, I need a complete ALP for sorting of nos in ascending order in microprocessor 8085. I couldn't understand what does fries and supersized mean with my question. Could you help me regarding the same?
You are asking for something which is like what we are asking from you. If you want someone to write complete assignment for you as if someone on the roadside is asking for something like pizza to you.
Hi, I think you assume that I am asking the complete program from you. Actually i got stuck with the program so i wanna refer with the correct one. Whatever i wrote was: MVI B,05H ; i need 5 nos to be sorted, this B reg acts as a counter LXI D,0000H ; i wanna store data to be sorted from 0000H SAME: LDAX D ; loading DE content to A MOV B,A ; storing A in B INX D ; incrementing DE by 1 DCR B ; dec B JZ OVER ; if B goes to zero it should HALT CMP B ; comparing B with A JC SAME ; if the compare result sets CY flag, go to label SAME SWAP: XCHG ; exchange content of DE and HL JMP SAME ; go to label SAME to check the count in B OVER: HLT Since I'm new to microprocessor I donot know much in this program. So I asked you to kindly assist me on the same Thanks, Regards, Zahid
It looks like you are moving everything into B. MVI B,05H - You have the counter in B MOV B,A - Content of memory location is also moved into B.
As Shabbir says, here is your basic problem: you're using B as a counter, but you overwrite B in the fourth instruction. Bye, bye, B as a counter.