Discussion in 'Assembly Language Programming (ALP) Forum' started by nits, Oct 20, 2009.
please tell me how 2 write an assembly program to perform selection sorting??
Where are you stuck? What code have you got so far?
L3: DCR C
L2: MOV A,M
L1: DCR B
Is this wrong????? the program is going on an infinite loop
Then yes, I would say it is wrong.
Are you sure it's an infinite loop? If L4 is the exit point (what does RST 1 do?) then the condition for reaching that point is where C is decremented to zero, and since there is nothing that otherwise modifies C then this should eventually happen.
It would help if the code were commented. Then I could understand what you're trying to do at each point.
Separate names with a comma.