<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>243</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>246</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>243</b><br />
<br />
<b>Notice</b>:  Trying to access array offset on value of type bool in <b>/mnt/cpcwiki-httpdocs/includes/libs/IPSet.php</b> on line <b>246</b><br />
<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://oldwiki.cpcwiki.eu/index.php?action=history&amp;feed=atom&amp;title=Programming%3AQuicksort</id>
		<title>Programming:Quicksort - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://oldwiki.cpcwiki.eu/index.php?action=history&amp;feed=atom&amp;title=Programming%3AQuicksort"/>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Quicksort&amp;action=history"/>
		<updated>2026-08-28T20:40:08Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.25.1</generator>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Quicksort&amp;diff=107764&amp;oldid=prev</id>
		<title>Litwr at 15:49, 7 February 2021</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Quicksort&amp;diff=107764&amp;oldid=prev"/>
				<updated>2021-02-07T15:49:14Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 15:49, 7 February 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;L1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Does a Quicksort (ascending) on a memory range in &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;44 &lt;/del&gt;bytes. An optimization for space is possible if you replace the absolute jumps with relative jumps (saves 6 bytes).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Does a Quicksort (ascending) on a memory range in &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;67 &lt;/ins&gt;bytes. An optimization for space is possible if you replace the absolute jumps with relative jumps (saves 6 bytes).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikidb:diff:version:1.11a:oldid:31905:newid:107764 --&gt;
&lt;/table&gt;</summary>
		<author><name>Litwr</name></author>	</entry>

	<entry>
		<id>https://oldwiki.cpcwiki.eu/index.php?title=Programming:Quicksort&amp;diff=31905&amp;oldid=prev</id>
		<title>Octoate: Created page with 'Does a Quicksort (ascending) on a memory range in 44 bytes. An optimization for space is possible if you replace the absolute jumps with relative jumps (saves 6 bytes).  &lt;pre&gt; ; …'</title>
		<link rel="alternate" type="text/html" href="https://oldwiki.cpcwiki.eu/index.php?title=Programming:Quicksort&amp;diff=31905&amp;oldid=prev"/>
				<updated>2009-09-23T16:16:20Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;Does a Quicksort (ascending) on a memory range in 44 bytes. An optimization for space is possible if you replace the absolute jumps with relative jumps (saves 6 bytes).  &amp;lt;pre&amp;gt; ; …&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Does a Quicksort (ascending) on a memory range in 44 bytes. An optimization for space is possible if you replace the absolute jumps with relative jumps (saves 6 bytes).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
;&lt;br /&gt;
; Usage: bc-&amp;gt;first, de-&amp;gt;last,&lt;br /&gt;
; call qsort&lt;br /&gt;
; Destroys: abcdefhl&lt;br /&gt;
;&lt;br /&gt;
qsort   ld      hl,0&lt;br /&gt;
        push    hl&lt;br /&gt;
qsloop  ld      h,b&lt;br /&gt;
        ld      l,c&lt;br /&gt;
        or      a&lt;br /&gt;
        sbc     hl,de&lt;br /&gt;
        jp      c,next1 ;loop until lo&amp;amp;lt;hi&lt;br /&gt;
        pop     bc&lt;br /&gt;
        ld      a,b&lt;br /&gt;
        or      c&lt;br /&gt;
        ret     z       ;bottom of stack&lt;br /&gt;
        pop     de&lt;br /&gt;
        jp      qsloop&lt;br /&gt;
next1   push    de      ;save hi,lo&lt;br /&gt;
        push    bc&lt;br /&gt;
        ld      a,(bc)  ;pivot&lt;br /&gt;
        ld      h,a&lt;br /&gt;
        dec     bc&lt;br /&gt;
        inc     de&lt;br /&gt;
fleft   inc     bc      ;do i++ while cur&amp;amp;lt;piv&lt;br /&gt;
        ld      a,(bc)&lt;br /&gt;
        cp      h&lt;br /&gt;
        jp      c,fleft&lt;br /&gt;
fright  dec     de      ;do i-- while cur&amp;gt;piv&lt;br /&gt;
        ld      a,(de)&lt;br /&gt;
        ld      l,a&lt;br /&gt;
        ld      a,h&lt;br /&gt;
        cp      l&lt;br /&gt;
        jp      c,fright&lt;br /&gt;
        push    hl      ;save pivot&lt;br /&gt;
        ld      h,d     ;exit if lo&amp;gt;hi&lt;br /&gt;
        ld      l,e&lt;br /&gt;
        or      a&lt;br /&gt;
        sbc     hl,bc&lt;br /&gt;
        jp      c,next2&lt;br /&gt;
        ld      a,(bc)  ;swap (bc),(de)&lt;br /&gt;
        ld      h,a&lt;br /&gt;
        ld      a,(de)&lt;br /&gt;
        ld      (bc),a&lt;br /&gt;
        ld      a,h&lt;br /&gt;
        ld      (de),a&lt;br /&gt;
        pop     hl      ;restore pivot&lt;br /&gt;
        jp      fleft&lt;br /&gt;
next2   pop     hl      ;restore pivot&lt;br /&gt;
        pop     hl      ;pop lo&lt;br /&gt;
        push    bc      ;stack=left-hi&lt;br /&gt;
        ld      b,h&lt;br /&gt;
        ld      c,l     ;bc=lo,de=right&lt;br /&gt;
        jp      qsloop&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Programming]]&lt;/div&gt;</summary>
		<author><name>Octoate</name></author>	</entry>

	</feed>