sorting of numbers in assembly language programming hey shabbir i am new to assembly programming can u send me a program for sorting of numbers in assembly language for 8085 microprocessor.
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
actually i have to complete an assignment in which i have to design an emulator in which sorting can be done as chief operation.
sir i need a programme in Assembly Language to find the maximum number and the minimum number from an array of ten numbers.
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 :embarasse
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.
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
Find Smallest byte from array of ten bytes. Assuming that the bytes are stored in memory from address location 5000H ; Code: LDA 5000H ;[Loads accumulator with data from memory location 5000H i.e. our first number] LXI H,5001H ;[Moves 5001H into register pair H-L] MVI C,09H ;[Initialize counter at 9 as we need to compare nine times] L2: CMP M ;[Compare the number in memory with that in accumulator] JC L1 ;[Jump if CF = 1] MOV A,M ;[Move data from memory to accumulator] L1: INX H ;[Increment H-L pair data] DCR C ;[Decrement Register C Data] JNZ L2 ;[Jump if ZF = 0] MOV M,A ;[Move data from accumulator to memory] HLT ;[Halt] On the similar lines, we will write the program to find the greatest bit as follows Code: LDA 5000H ;[Loads accumulator with data from memory location 5000H i.e. our first number] LXI H,5001H ;[Moves 5001H into register pair H-L] MVI C,09H ;[Initialize counter at 9 as we need to compare nine times] L2: CMP M ;[Compare the number in memory with that in accumulator] JNC L1 ;[Jump if CF = 0] MOV A,M ;[Move data from memory to accumulator] L1: INX H ;[Increment H-L pair data] DCR C ;[Decrement Register C Data] JNZ L2 ;[Jump if ZF = 0] MOV M,A ;[Move data from accumulator to memory] HLT ;[Halt]
Re: sorting of numbers in assembly language programming thanh u dear ,plz sort out my problem .and tell me,. write a program in assemly lang. of 8085 to sort a given set of 8 bit items stored at consecutive memory location? plz ans it and tell me now bcoz tomr. is my exam ,or send me at aryanilu143@gmail.com.i will be thankful.