|
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
|