Question

How can we sort a array in assembly language by taking the input dynamically using tasm assembler?

.model data
.small
array db 90h,10h,23h,33h
.
.
.code


int 3
end
Était-ce utile?

La solution

Use some sort algorithm - for example Quicksort

Although, for very small arrays (as in your example) you better use more simple algorithm as Bubble sort

The later, because of the very easy implementation (smaller code) will be faster than the complex Quicksort for small arrays.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top