1
When assembling the code below, I am getting the error error: invalid combination of opcode and operands on lines 16, 26 and 28.
SECTION .data
maior: db 0
SECTION .text
global retorna_numeros
retorna_numeros:
    push ebp
    mov ebp, esp
    mov ebx, [ebp+12] ;ebx = L = 3
    mov esi, [ebp+8]  ;esi = matriz 3x3
    mov maior, [esi]  ;*** linha 16 ***
    mov ecx, 0 ;i = 0
loop:
    mov eax, ecx ;eax = i
    mul ebx ;3*i
    add eax, eax ;eax = 3*i+i
    lea edx, [esi + 4*eax]   ;carregando endereço do elemento atual da matriz em edx
    cmp maior, [edx]         ;*** linha 26 ***
    jae end_loop             ;se a variável 'maior' for maior ou igual que o elemento atual da matriz, pula para o final do loop
    mov maior, [edx]         ;*** linha 28 ***
end_loop:
    inc ecx
    cmp ecx, ebx
    jb loop
    mov eax, maior
end:
    mov esp, ebp
    pop ebp
    ret
Would anyone know why?