Link to home
Start Free TrialLog in
Avatar of Tom3333
Tom3333

asked on

how can implement buble sort using only 2 registers

i need to implement bubble sort in assemply  using only 2 registers.
Is anyone how have information about this concept ?  
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

Well, since you only need to swap (1 register) and remember where you were in the main loop (second register) it should be straight forward. Where are you stuck?
Avatar of Member_2_4694817
Member_2_4694817

You may need to use XCHG instead of MOV at least once in your code (assuming this is about x386 assembly)
Avatar of Tom3333

ASKER

hello TommySzalapski
,
i stuck because i have a confuse how to do the swap.
ASKER CERTIFIED SOLUTION
Avatar of TommySzalapski
TommySzalapski
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial