flat assembler
Message board for the users of flat assembler.
Index
> Main > Recursion |
Author |
|
pelaillo 15 Jun 2004, 12:55
The following is a useful example of recursion:
A very nice implementation of QuickSort by BitRAKE.
|
|||||||||||
15 Jun 2004, 12:55 |
|
Matrix 23 Oct 2004, 05:58
pelaillo wrote: The following is a useful example of recursion: Hello Pelailo, i see bitrake can copy c quicksort routines , but can he convert it to assembly ? |
|||
23 Oct 2004, 05:58 |
|
Matrix 23 Oct 2004, 07:37
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 |
|||
23 Oct 2004, 07:37 |
|
roticv 23 Oct 2004, 11:40
Matrix wrote:
I doubt you have the rights to insult BitRake. Btw Matrix, your code is not a recurisive function. |
|||
23 Oct 2004, 11:40 |
|
Matrix 23 Oct 2004, 11:59
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. |
|||
23 Oct 2004, 11:59 |
|
comrade 23 Oct 2004, 13:58
calm down
|
|||
23 Oct 2004, 13:58 |
|
Matrix 23 Oct 2004, 14:06
Hello Comrade,
i'm always calm |
|||
23 Oct 2004, 14:06 |
|
beppe85 26 Oct 2004, 11:40
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. |
|||
26 Oct 2004, 11:40 |
|
comrade 26 Oct 2004, 15:21
recursion is elegant, beppe85
|
|||
26 Oct 2004, 15:21 |
|
beppe85 26 Oct 2004, 15:49
conrade, I'd agree with you. I'm refering to the "way to use", not "to use or not to use".
|
|||
26 Oct 2004, 15:49 |
|
veach1 26 Oct 2004, 21:05
Quote: Does anybody know, how organize recursion? ...to understand recursion you must understand recursion... |
|||
26 Oct 2004, 21:05 |
|
pelaillo 26 Oct 2004, 21:29
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. |
|||
26 Oct 2004, 21:29 |
|
Matrix 26 Oct 2004, 21:57
I don't know
what programs did he wrote? or he is developing quicksort routines? |
|||
26 Oct 2004, 21:57 |
|
comrade 27 Oct 2004, 02:46
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 |
|||
27 Oct 2004, 02:46 |
|
pelaillo 27 Oct 2004, 13:29
This is becoming useless ranting.
What about the exception matter?? I am more interested in debugging a useful routine. |
|||
27 Oct 2004, 13:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.