This macro implements the Bubble Sort algorithm.
- Parameters
-
[in,out] | arrayAddress | The starting address of the array to be sorted. |
[in] | arraySize | The size of the array to be sorted. |
[in] | switchToFastModeWhileRunning | If true, the macro will switch to 8502 fast mode. |
This macro sorts an array in ascending order using the Bubble Sort algorithm. If 'switchToFastModeWhileRunning' is true, the macro will switch to 8502 fast mode while running. This can be beneficial for larger arrays.
- Note
- The sorted array is available at the same memory address as the input array. The macro modifies the .A, .X, and .Y registers. If you're using these registers elsewhere in your code, you'll need to save their values before calling this macro and restore them afterward.
- Since
- 0.1.0