View Single Post
I need help with coding the selection sort in ibm pc
(#1 (permalink))
Old
doyler86 is Offline
Private
Points: 192, Level: 2 Points: 192, Level: 2 Points: 192, Level: 2
Activity: 0% Activity: 0% Activity: 0%
doyler86 is an unknown quantity at this point
 
 
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Dec 2007
I need help with coding the selection sort in ibm pc - December 12th, 2007

assembly, Please, and thank you.? i am writng a multi-language program, my first at that, using c, c++, and assembly, right now i need help with the actual assembly code for doing the selection sort
movebx,[list + ebp] ;address of list[]
movecx,[num_elements + ebp] ;num_elements
movesi,0 ; Initialize array offset to 0
moveax,0


cmpeax,ecx ; If (i >= num_elements)...
jgenot_found;search_val is not found in the list (set return value to -1)

not_found:; Element was not found in the list (all element positions searched)
moveax,-1;Set return value to negative


any help is appreciated, im a beginner so please no fancy stuff, and thank you in advance

Revenue Shared Ads