User Tools

Site Tools


base:quicksort_16-bit_elements

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
base:quicksort_16-bit_elements [2016-08-30 22:28]
litwr2 a fix for an array address >= $8000
base:quicksort_16-bit_elements [2020-10-20 18:53] (current)
litwr2 a link added
Line 251: Line 251:
  
 qs_csp    ldx #0 qs_csp    ldx #0
-          dex 
-          dex 
           txs           txs
  
Line 263: Line 261:
           lda #<array           lda #<array
           sta lblo           sta lblo
 +          tsx
 +          stx qs_csp+1
 qsok      lda lblo qsok      lda lblo
           sta i2lo           sta i2lo
Line 395: Line 395:
 </code> </code>
  
-The locations //m3hi//, //m3lo//, //m4hi//, //m4lo// maybe situated anywhere in RAM.  The invocation should be in the next form. +The locations //m3hi//, //m3lo//, //m4hi//, //m4lo// maybe situated anywhere in RAM.  The invocation just a call to quicksort routine.  However it is required to put the proper constants after //quicksort// label.  This makes the invocation code more complex in the general case.
-<code> +
-          tsx +
-          stx qs_csp+1 +
-          jsr quicksort +
-</code> +
- +
-It is required to put the proper constants after //quicksort// label.  This makes the invocation code more complex in the general case.+
  
-The other published 6502 Quicksort is at [[http://www.vcfed.org/forum/showthread.php?4687-QuickSort-in-6502-assembler|Vintage Computer Federation]]+The other published 6502 Quicksort is at [[http://www.vcfed.org/forum/showthread.php?4687-QuickSort-in-6502-assembler|Vintage Computer Federation]]. More information can be found on page [[https://github.com/litwr2/6502-sorting|6502 sorting]]
base/quicksort_16-bit_elements.1472588889.txt.gz · Last modified: 2016-08-30 22:28 by litwr2