EASy68K  
It is currently Sun Apr 05, 2020 10:02 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Quicksort tips
PostPosted: Sun Dec 15, 2013 2:21 pm 
Offline

Joined: Sun Dec 15, 2013 2:19 pm
Posts: 2
Any tips on implementing quicksort in easy68k? The gist of it is clear, but I can't find a working way to make recursions do what they're supposed to.


Top
 Profile  
 
 Post subject: Re: Quicksort tips
PostPosted: Mon Dec 16, 2013 2:19 pm 
Offline
User avatar

Joined: Thu Dec 16, 2004 6:42 pm
Posts: 1118
All parameters and local variables must use a stack frame in order for recursion to work correctly. Take a look at tutorial4.x68 in the EASy68K/examples folder for an example of parameter passing.

The other option is to not use recursion.

_________________
Prof. Kelly


Top
 Profile  
 
 Post subject: Re: Quicksort tips
PostPosted: Mon Dec 16, 2013 2:24 pm 
Offline

Joined: Sun Dec 15, 2013 2:19 pm
Posts: 2
Yes, I know that and I was trying to implement it, but couldn't find a solution that works for _all_ arrays I input.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group