Pergunta

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
Foi útil?

Solução

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.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top