I'm trying to write a function in assembly to perform a bubble sort. I'm passing a pointer to an array as a parameter and trying to operate upon it to sort the array. I need to compare two values within the array, but when I try to I get "error A2026:constant expected". The error appears in the following lines:
mov ecx, [arr + pos2 * 4]
cmp [arr + pos * 4], ecx
I am using x86 and MASM (Intel syntax).