Commit dc84f344 authored by Daniel Alejandro Maydana's avatar Daniel Alejandro Maydana
Browse files

fix 2C 2024 fixme

parent b11e1486
......@@ -78,6 +78,12 @@ es_indice_ordenado:
push r10
push r11
push r12
push r13
push r14
mov r13, rsi
mov r14, rdi
mov r8, 1 ; j = 0
mov rax,1 ; res = true
......@@ -86,17 +92,22 @@ es_indice_ordenado:
cmp r8, rdx
je .end
; indice[j-1]/indice[j]
; indice[j-1], indice[j]
mov r10, [rdi + r8 * uint16_size]
mov r11, [rdi + r8 - 1 * uint16_size]
; inventario [indice[j-1]] / inventario [indice[j]]
; inventario[indice[j-1]], inventario[indice[j]]
mov rsi, [rsi + r10 * PUNTERO_SIZE]
mov rsi, [rsi + r11 * PUNTERO_SIZE]
mov rdi, [rsi + r11 * PUNTERO_SIZE]
call rcx
cmp rax, 0
je .end
; restaura rdi, rsi
mov rsi, r13
mov rdi, r14
;incrementa j
inc r8
jmp .while
.end:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment