flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Matrix 27 Jun 2005, 08:41
Hy, it was easy to convert 4byte bubblesort to 1 byte, here you are:
Code: ; ; bubble sort ; input: edi = pointer to byte array, ecx = number of indexes ; output: edi = pointer to sorted array ; destroys: al, edx, eflags ; bubblesort0b: lea ebx,[edi+ecx] mov al,[edi] .cmploop:dec ebx cmp al,[ebx] jle .again xchg al,[ebx] .again: cmp ebx,edi jnz .cmploop stosb loop bubblesort0b ret Last edited by Matrix on 29 Jun 2005, 08:47; edited 1 time in total |
|||
![]() |
|
vid 27 Jun 2005, 09:28
Matrix wrote:
What an evil matrix. So now you've reached your goal and you won't post anymore? (Don't dare answer me, you'd ruin it all) ![]() ![]() ![]() |
|||
![]() |
|
Vasilev Vjacheslav 27 Jun 2005, 14:04
Quote: vid -> Posts: 777 hm, very strange ![]() |
|||
![]() |
|
UCM 27 Jun 2005, 21:33
Thanks matrix, I'll try it.
|
|||
![]() |
|
Matrix 28 Jun 2005, 10:07
vid wrote:
wehhehe ;> |
|||
![]() |
|
UCM 28 Jun 2005, 22:29
wait, dont you mean 'loop bubblesort0b' on the second last line?
|
|||
![]() |
|
Matrix 29 Jun 2005, 08:46
yeah sorry, fast conversion
![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.