Вопрос

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
Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top