sorting of numbers in assembly language programming

nikhil4u's Avatar, Join Date: Mar 2006
Newbie Member
hey shabbir i am new to assembly programming
can u send me a program for sorting of numbers in assembly language for 8085 microprocessor.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Hey its not good to give the complete program but will definitely help you with the main part of the program. It finds the maximum number and this can help you write the sort program
Code:
LXI H,ADD1
; Load 16 bit data in reg pair H
MOV C,M
; Load the counter to compare the total no of data to count
INX H
; Increment the address to point to the next location
MOV A,M
; Load the second no in the accumulator
ADD2:
; Label to jump at
INX H
; Increment the address to point to the next location
CMP M
; Compate the accumulator with the next no in series
JNC LESS:
; Jmp to a location with the comparision returns a carry
MOV A,M
; Move the content of the location M into the accumulator if the Jump fails
LESS:
; Label to jump at
DCR C
; decrement the counter
JNZ ADD2
; Jump if there is anything more to compare
STA ADD_OUTPUT 
; Accumulator will contain the Max no and move to the out put address.
Thanks
Shabbir
0
coderzone's Avatar, Join Date: Jul 2004
Team Leader
Quote:
Originally Posted by nikhil4u
hey shabbir i am new to assembly programming
can u send me a program for sorting of numbers in assembly language for 8085 microprocessor.
Do you mind sharing the programs with us.
0
nikhil4u's Avatar, Join Date: Mar 2006
Newbie Member
actually i have to complete an assignment in which i have to design an emulator in which sorting can be done as chief operation.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by nikhil4u
actually i have to complete an assignment in which i have to design an emulator in which sorting can be done as chief operation.
The routine will help you to design the sort program.
0
khurramee1's Avatar, Join Date: Oct 2006
Newbie Member
sir i need a programme in Assembly Language to find the maximum number and the minimum number from an array of ten numbers.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by khurramee1
sir i need a programme in Assembly Language to find the maximum number and the minimum number from an array of ten numbers.
khurramee1 please post it as seperate thread for it to be seen by the experts.
0
emreee's Avatar, Join Date: May 2008
Newbie Member
Please Help me,

I dont know 8085 assembly but this is a school homework

1) D recorder < 11
E recorder < 11
D+E = write to B recorder
But If Not E < 9 or Not D < 9 Then exit program

2) If (01H + 03H) < AAH Then
01H + 03H = write 2000H
Else
01H + 03H = write 3000H
End If

This Questions write to assemly 8085 language.Please Help me
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
How come you don't have knowledge of 8085 assembly but are getting homework projects anyway? If you're not on the course then you shouldn't get the homework. If you are on the course then (a) you've been goofing around and deserve to fail or (b) you'll know some 8085 in which case you can at least get started and show us where you're stuck, at which point we'll help.
0
digitalpbk's Avatar, Join Date: Jun 2009
Newbie Member
thanx for the codes...
you can check out my online simulator and assembler and play with it to start coding for 8085 ... sadly i cant post any links here .. so it is at

labs.kitiyo.com/8085/

check out