flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
pelaillo
The following is a useful example of recursion:
A very nice implementation of QuickSort by BitRAKE.
|
|||||||||||
![]() |
|
Matrix
pelaillo wrote: The following is a useful example of recursion: Hello Pelailo, i see bitrake can copy c quicksort routines ![]() |
|||
![]() |
|
Matrix
However here's a Bubble sort, its working all right:
Code: bubblesort: lea ebx,[edi+ecx*4] mov eax,[edi] .cmploop:sub ebx,4 cmp eax,[ebx] jle .again xchg eax,[ebx] .again: cmp ebx,edi jnz .cmploop stosd loop bubblesort ret |
|||
![]() |
|
roticv
Matrix wrote:
I doubt you have the rights to insult BitRake. Btw Matrix, your code is not a recurisive function. |
|||
![]() |
|
Matrix
I don't know him, i can only guess where did he got his codes.
Anyway i whouldn't post something that i have not tested to work and is causing an exception. |
|||
![]() |
|
comrade
calm down
|
|||
![]() |
|
Matrix
Hello Comrade,
i'm always calm ![]() |
|||
![]() |
|
beppe85
Why bother with recursion?
You just use as if it were other function, the only thing you must remember is that you get a new set of locals at each invocation. So you must (generally) implement reentrant code, and care of memory usage. |
|||
![]() |
|
comrade
recursion is elegant, beppe85
|
|||
![]() |
|
beppe85
conrade, I'd agree with you. I'm refering to the "way to use", not "to use or not to use".
|
|||
![]() |
|
veach1
Quote: Does anybody know, how organize recursion? ...to understand recursion you must understand recursion... ![]() |
|||
![]() |
|
pelaillo
MATRIX wrote: I don't know him, i can only guess where did he got his codes. BitRAKE is a known and knowledgeable assembly programmer. I don't imagine how can be possible that you didn't hear about him. However, if you are intersted in the writing process of this snippet, give a look here: http://board.win32asmcommunity.net/topic.php?t=2361 Quote: Anyway i whouldn't post something that i have not tested to work and is causing an exception. Do you have a fact to give such assertion? Because I've used this code in many situations and always worked flawlessly. |
|||
![]() |
|
Matrix
I don't know
what programs did he wrote? or he is developing quicksort routines? |
|||
![]() |
|
comrade
yes, he is developing quicksort routines for a living
frankly, I wouldn't have heard of bitRAKE unless I was a visitor on win32asmcommunity board Randall Hyde would be more of a character you would certainly hear about it if you were doing assembly |
|||
![]() |
|
pelaillo
This is becoming useless ranting.
What about the exception matter?? I am more interested in debugging a useful routine. ![]() |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.
Website powered by rwasa.