apersson850 Posted April 19 Share Posted April 19 10 hours ago, TheBF said: And here is a version that assembles with the default TI Assembler. You will have to un-comment the BLWP line and the two below. Or you simply LWPI the workspace you want Quicksort to run with, then LWPI the workspace you came from back again, when it's time to return. The reason I used BLWP was that at the time, I didn't know where Pascal had its main workspace. Thus I couldn't just do LWPI PASCALWS before returning. Now I know it's at 8380H. The orginal program is written to assemble with the assembler that's provided with the p-system. The CPU is of course the same, but the p-system's assembler contains some directives to interface with the p-systems code pool handler. 2 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted April 25 Share Posted April 25 On 4/18/2023 at 4:58 PM, Vorticon said: Yes! Every little trim helps. I am curious where you landed with this research. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 25 Author Share Posted April 25 I just updated the code in the earlier post with the posted suggestions but did not do further testing. I do plan on converting it to assembly for use in XB since it's so short. 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted April 25 Share Posted April 25 7 hours ago, Vorticon said: I just updated the code in the earlier post with the posted suggestions but did not do further testing. I do plan on converting it to assembly for use in XB since it's so short. How many items are you sorting? Bubble sort can suck even in Assembly language on a large data set. 2 Quote Link to comment Share on other sites More sharing options...
GDMike Posted April 25 Share Posted April 25 Hmm.. sounds like a challenge for me to take up One day... Quote Link to comment Share on other sites More sharing options...
apersson850 Posted April 25 Share Posted April 25 Go ahead. Forty years ago, when I wrote that assembly program you saw above, there wasn't anything better known for internal sorting. 2 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted April 25 Author Share Posted April 25 7 hours ago, TheBF said: How many items are you sorting? Bubble sort can suck even in Assembly language on a large data set. This is not Bubble sort, remember? 😉 1 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted April 25 Share Posted April 25 Ok. So have settled on Quicksort. Cool. 1 Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted May 20 Author Share Posted May 20 Bubble sort in Partial Pascal on the ZX-81. This Pascal implementation seems pretty slow... 20220613_195109.mp4 Quote Link to comment Share on other sites More sharing options...
+TheBF Posted May 20 Share Posted May 20 (edited) Not moving too fast for sure. If you can translate this sort into your program it should run much faster and the sort only needs small number of extra lines vs bubble sort. Sorting algorithms/Comb sort - Rosetta Code Edited May 20 by TheBF typo 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.