Search code examples
arraysassemblysortingtasm

sorting of array using tasm assembler


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

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.