This file defines the library for arrays and algorithms thereof.
| Array.asm | This file defines the library for arrays and algorithms thereof. |
| indexOf | Functions for finding the index of a value in an array |
| Functions | |
| Array8_indexOf | Returns the index of a byte in an array, or -1 if it’s not in the array |
| Array16_indexOf | Returns the index of a word in an array, or -1 if it’s not in the array |
| Array32_indexOf | Returns the index of a dword in an array, or -1 if it’s not in the array |
| Array64_indexOf | Returns the index of a qword in an array, or -1 if it’s not in the array |
| Array128_indexOf | Returns the index of a dqword in an array, or -1 if it’s not in the array |
| lastIndexOf | Functions for finding the last index of a value in an array |
| Functions | |
| Array8_lastIndexOf | Returns the last index of a byte in an array, or -1 if it’s not in the array |
| Array16_lastIndexOf | Returns the last index of a word in an array, or -1 if it’s not in the array |
| Array32_lastIndexOf | Returns the last index of a dword in an array, or -1 if it’s not in the array |
| Array64_lastIndexOf | Returns the last index of a qword in an array, or -1 if it’s not in the array |
| Array128_lastIndexOf | Returns the last index of a dqword in an array, or -1 if it’s not in the array |
| equals | Functions for checking equality of two arrays |
| Functions | |
| Array8_equals | Checks the equality of two arrays |
| Array16_equals | Checks the equality of two arrays |
| Array32_equals | Checks the equality of two arrays |
| Array64_equals | Checks the equality of two arrays |
| Array128_equals | Checks the equality of two arrays |
| binarySearch | Functions for finding values in sorted arrays |
| Functions | |
| ArrayByte_binarySearch | Finds a byte in a sorted array of bytes with a binary search |
| ArraySByte_binarySearch | Finds a signed byte in a sorted array of signed bytes with a binary search |
| ArrayWord_binarySearch | Finds a word in a sorted array of words with a binary search |
| ArraySWord_binarySearch | Finds a signed word in a sorted array of signed words with a binary search |
| ArrayDword_binarySearch | Finds a dword in a sorted array of dwords with a binary search |
| ArraySDword_binarySearch | Finds a signed dword in a sorted array of signed dwords with a binary search |
| ArrayReal4_binarySearch | Finds a 4-byte real in a sorted array of 4-byte reals with a binary search |
| ArrayQword_binarySearch | Finds a qword in a sorted array of qwords with a binary search |
| ArraySQword_binarySearch | Finds a signed qword in a sorted array of signed qwords with a binary search |
| ArrayReal8_binarySearch | Finds an 8-byte real in a sorted array of 8-byte reals with a binary search |
| ArrayDqword_binarySearch | Finds a dqword in a sorted array of dqwords with a binary search |
| ArraySDqword_binarySearch | Finds a signed dqword in a sorted array of signed dqwords with a binary search |
| insertionSort | Functions for sorting an array with insertion sort |
| Functions | |
| ArrayByte_insertionSort | Sorts an array of bytes with insertion sort |
| ArraySByte_insertionSort | Sorts an array of signed bytes with insertion sort |
| ArrayWord_insertionSort | Sorts an array of words with insertion sort |
| ArraySWord_insertionSort | Sorts an array of signed words with insertion sort |
| ArrayDword_insertionSort | Sorts an array of dwords or pointers with insertion sort |
| ArraySDword_insertionSort | Sorts an array of signed dwords or pointers with insertion sort |
| ArrayDwordMap_insertionSort | Sorts an array of key-value pairs of dwords or pointers with insertion sort |
| ArrayDword_bubbleSort | Sorts an array of dwords or pointers with bubble sort |
| ArraySDword_bubbleSort | Sorts an array of signed dwords or pointers with bubble sort |
| ArrayReal4_bubbleSort | Sorts an array of 4-byte reals with bubble sort |
| ArrayDword_max | Finds the maximum dword in an array |
| ArraySDword_max | Finds the maximum signed dword in an array |
| ArrayDword_min | Finds the minimum dword in an array |
| ArraySDword_min | Finds the minimum signed dword in an array |
| ArrayDword_sum | Finds the sum of an array of signed or unsigned dwords |
| ArrayDword_sum_fast | Finds the sum of an array of signed or unsigned dwords |
| ArrayReal4_sum | Finds the sum of an array of 4-byte reals |
| ArrayReal4_sum_fast | Finds the sum of an array of 4-byte reals |
Functions for finding the index of a value in an array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
| Functions | |
| Array8_indexOf | Returns the index of a byte in an array, or -1 if it’s not in the array |
| Array16_indexOf | Returns the index of a word in an array, or -1 if it’s not in the array |
| Array32_indexOf | Returns the index of a dword in an array, or -1 if it’s not in the array |
| Array64_indexOf | Returns the index of a qword in an array, or -1 if it’s not in the array |
| Array128_indexOf | Returns the index of a dqword in an array, or -1 if it’s not in the array |
Returns the index of a byte in an array, or -1 if it’s not in the array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
Returns the index of a word in an array, or -1 if it’s not in the array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
Returns the index of a dword in an array, or -1 if it’s not in the array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
Returns the index of a qword in an array, or -1 if it’s not in the array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
Returns the index of a dqword in an array, or -1 if it’s not in the array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
Functions for finding the last index of a value in an array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
| Functions | |
| Array8_lastIndexOf | Returns the last index of a byte in an array, or -1 if it’s not in the array |
| Array16_lastIndexOf | Returns the last index of a word in an array, or -1 if it’s not in the array |
| Array32_lastIndexOf | Returns the last index of a dword in an array, or -1 if it’s not in the array |
| Array64_lastIndexOf | Returns the last index of a qword in an array, or -1 if it’s not in the array |
| Array128_lastIndexOf | Returns the last index of a dqword in an array, or -1 if it’s not in the array |
Returns the last index of a byte in an array, or -1 if it’s not in the array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
Returns the last index of a word in an array, or -1 if it’s not in the array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
Returns the last index of a dword in an array, or -1 if it’s not in the array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
Returns the last index of a qword in an array, or -1 if it’s not in the array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
Returns the last index of a dqword in an array, or -1 if it’s not in the array
| pArray | address of array |
| len | length of array |
| value | value for which to search |
Functions for checking equality of two arrays
| pArray0 | address of one array |
| pArray1 | address of the other array |
| len | length of the arrays |
| Functions | |
| Array8_equals | Checks the equality of two arrays |
| Array16_equals | Checks the equality of two arrays |
| Array32_equals | Checks the equality of two arrays |
| Array64_equals | Checks the equality of two arrays |
| Array128_equals | Checks the equality of two arrays |
Checks the equality of two arrays
TODO: Make this more efficient.
| pArray0 | address of one array |
| pArray1 | address of the other array |
| len | length of the arrays |
Checks the equality of two arrays
TODO: Make this more efficient.
| pArray0 | address of one array |
| pArray1 | address of the other array |
| len | length of the arrays |
Checks the equality of two arrays
TODO: Make this more efficient.
| pArray0 | address of one array |
| pArray1 | address of the other array |
| len | length of the arrays |
Checks the equality of two arrays
TODO: Make this more efficient.
| pArray0 | address of one array |
| pArray1 | address of the other array |
| len | length of the arrays |
Checks the equality of two arrays
TODO: Make this more efficient.
| pArray0 | address of one array |
| pArray1 | address of the other array |
| len | length of the arrays |
Functions for finding values in sorted arrays
| pArray | address of array |
| len | length of array |
| value | value for which to search |
| Functions | |
| ArrayByte_binarySearch | Finds a byte in a sorted array of bytes with a binary search |
| ArraySByte_binarySearch | Finds a signed byte in a sorted array of signed bytes with a binary search |
| ArrayWord_binarySearch | Finds a word in a sorted array of words with a binary search |
| ArraySWord_binarySearch | Finds a signed word in a sorted array of signed words with a binary search |
| ArrayDword_binarySearch | Finds a dword in a sorted array of dwords with a binary search |
| ArraySDword_binarySearch | Finds a signed dword in a sorted array of signed dwords with a binary search |
| ArrayReal4_binarySearch | Finds a 4-byte real in a sorted array of 4-byte reals with a binary search |
| ArrayQword_binarySearch | Finds a qword in a sorted array of qwords with a binary search |
| ArraySQword_binarySearch | Finds a signed qword in a sorted array of signed qwords with a binary search |
| ArrayReal8_binarySearch | Finds an 8-byte real in a sorted array of 8-byte reals with a binary search |
| ArrayDqword_binarySearch | Finds a dqword in a sorted array of dqwords with a binary search |
| ArraySDqword_binarySearch | Finds a signed dqword in a sorted array of signed dqwords with a binary search |
Finds a byte in a sorted array of bytes with a binary search
| pArray | address of array |
| len | length of array (number of bytes) |
| value | value for which to search |
Finds a signed byte in a sorted array of signed bytes with a binary search
| pArray | address of array |
| len | length of array (number of bytes) |
| value | value for which to search |
Finds a word in a sorted array of words with a binary search
| pArray | address of array |
| len | length of array (number of words) |
| value | value for which to search |
Finds a signed word in a sorted array of signed words with a binary search
| pArray | address of array |
| len | length of array (number of words) |
| value | value for which to search |
Finds a dword in a sorted array of dwords with a binary search
| pArray | address of array |
| len | length of array (number of dwords) |
| value | value for which to search |
Finds a signed dword in a sorted array of signed dwords with a binary search
| pArray | address of array |
| len | length of array (number of dwords) |
| value | value for which to search |
Finds a 4-byte real in a sorted array of 4-byte reals with a binary search
| pArray | address of array |
| len | length of array (number of dwords) |
| value | value for which to search |
Finds a qword in a sorted array of qwords with a binary search
| pArray | address of array |
| len | length of array (number of qwords) |
| value | value for which to search |
Finds a signed qword in a sorted array of signed qwords with a binary search
| pArray | address of array |
| len | length of array (number of qwords) |
| value | value for which to search |
Finds an 8-byte real in a sorted array of 8-byte reals with a binary search
| pArray | address of array |
| len | length of array (number of qwords) |
| value | value for which to search |
Finds a dqword in a sorted array of dqwords with a binary search
| pArray | address of array |
| len | length of array (number of dqwords) |
| value | value for which to search |
Finds a signed dqword in a sorted array of signed dqwords with a binary search
| pArray | address of array |
| len | length of array (number of dqwords) |
| value | value for which to search |
Functions for sorting an array with insertion sort
| pArray | address of array |
| len | length of array |
| Functions | |
| ArrayByte_insertionSort | Sorts an array of bytes with insertion sort |
| ArraySByte_insertionSort | Sorts an array of signed bytes with insertion sort |
| ArrayWord_insertionSort | Sorts an array of words with insertion sort |
| ArraySWord_insertionSort | Sorts an array of signed words with insertion sort |
| ArrayDword_insertionSort | Sorts an array of dwords or pointers with insertion sort |
| ArraySDword_insertionSort | Sorts an array of signed dwords or pointers with insertion sort |
| ArrayDwordMap_insertionSort | Sorts an array of key-value pairs of dwords or pointers with insertion sort |
| ArrayDword_bubbleSort | Sorts an array of dwords or pointers with bubble sort |
| ArraySDword_bubbleSort | Sorts an array of signed dwords or pointers with bubble sort |
| ArrayReal4_bubbleSort | Sorts an array of 4-byte reals with bubble sort |
| ArrayDword_max | Finds the maximum dword in an array |
| ArraySDword_max | Finds the maximum signed dword in an array |
| ArrayDword_min | Finds the minimum dword in an array |
| ArraySDword_min | Finds the minimum signed dword in an array |
| ArrayDword_sum | Finds the sum of an array of signed or unsigned dwords |
| ArrayDword_sum_fast | Finds the sum of an array of signed or unsigned dwords |
| ArrayReal4_sum | Finds the sum of an array of 4-byte reals |
| ArrayReal4_sum_fast | Finds the sum of an array of 4-byte reals |
Sorts an array of bytes with insertion sort
| pArray | address of array |
| len | length of array (number of bytes) |
Sorts an array of signed bytes with insertion sort
| pArray | address of array |
| len | length of array (number of bytes) |
Sorts an array of words with insertion sort
| pArray | address of array |
| len | length of array (number of words) |
Sorts an array of signed words with insertion sort
| pArray | address of array |
| len | length of array (number of words) |
Sorts an array of dwords or pointers with insertion sort
| pArray | address of array |
| len | length of array (number of dwords) |
Sorts an array of signed dwords or pointers with insertion sort
| pArray | address of array |
| len | length of array (number of dwords) |
Sorts an array of key-value pairs of dwords or pointers with insertion sort
| pArray | address of array |
| len | length of array (number of pairs of dwords) |
Sorts an array of dwords or pointers with bubble sort
| pArray | address of array |
| len | length of array (number of dwords) |
Sorts an array of signed dwords or pointers with bubble sort
| pArray | address of array |
| len | length of array (number of dwords) |
Sorts an array of 4-byte reals with bubble sort
| pArray | address of array |
| len | length of array (number of dwords) |
Finds the maximum dword in an array
| pArray | address of array |
| len | length of array (number of dwords) |
Finds the maximum signed dword in an array
| pArray | address of array |
| len | length of array (number of dwords) |
Finds the minimum dword in an array
| pArray | address of array |
| len | length of array (number of dwords) |
Finds the minimum signed dword in an array
| pArray | address of array |
| len | length of array (number of dwords) |
Finds the sum of an array of signed or unsigned dwords
| pArray | address of array |
| len | length of array (number of dwords) |
Finds the sum of an array of signed or unsigned dwords
The array is preferably aligned to 16 bytes, or even 64 bytes, and with a multiple of 16 entries.
NOTE: Changes values in xmm0, xmm1, xmm2, and xmm3
| pArray | address of array |
| len | length of array (number of dwords) |