The task is: Check if the second row of a two-dimensional array is sorted in descending order. I need to do this using assembly masm. Here is the code:
.686
.model flat, stdcall
option casemap:none
include C:\masm32\include\windows.inc
include C:\masm32\include\user32.inc
include C:\masm32\include\kernel32.inc
include C:\masm32\include\masm32.inc
includelib C:\masm32\lib\user32.lib
includelib C:\masm32\lib\kernel32.lib
includeLib C:\masm32\lib\masm32.lib
.data
    sConsoleTitle BYTE "Task", 0
    task BYTE "Check if the second row of a two-dimensional array is sorted in descending order", 0Dh, 0Ah, 0
    Arr     DWORD   4, 6, 2, 8
    RowSize = ($ - Arr)
            DWORD    9, 4, 2, 1
            DWORD    7, 3, 5, 1
            DWORD    6, 8, 1, 7
    resultText BYTE "Result: "
    row BYTE 4
    col BYTE 4
    i BYTE 0
    j BYTE 0
    exitText BYTE "Print enter to exit....", 0Dh, 0Ah, 0
    pos BYTE "Yes", 0Dh, 0Ah, 0
    negative BYTE "No", 0Dh, 0Ah, 0
    resultStr BYTE 16 DUP(' ')
    buffer BYTE 20 DUP(?), 0
    clrt BYTE 0Ah, 0Dh, 0
    tab BYTE "  ", 0
    sum DWORD 0
.code
start:
invoke SetConsoleTitle, offset sConsoleTitle
invoke StdOut, offset task
; Show array
xor ecx, ecx
mov cl, row
mov esi, 0
loop_row_1:
    push ecx
    xor ecx, ecx
    mov cl, col
    mov ebx, 0
loop_col_1:
    mov eax, Arr[esi][ebx]
    push ebx
    push ecx
    push esi
    invoke ltoa, eax, ADDR buffer
    invoke StdOut, ADDR buffer
    invoke StdOut, ADDR tab
    pop esi
    pop ecx
    pop ebx
    add ebx, TYPE Arr
    loop loop_col_1
    invoke StdOut, ADDR clrt
    add esi, RowSize
    pop ecx
    loop loop_row_1
; Check
mov esi,1
xor ecx, ecx
mov cl, col
mov ebx, 0
mov j, 0
loop_col_2:
    mov eax, Arr[esi][ebx]
    cmp eax, 0
    jle no
    add ebx, TYPE Arr
    loop loop_col_2
    invoke StdOut, ADDR clrt
yes:
    invoke StdOut, ADDR resultText
    invoke StdOut, ADDR pos
    jmp exit
no:
    invoke StdOut, ADDR resultText
    invoke StdOut, ADDR negative
exit:
    invoke StdIn, ADDR buffer, lengthof buffer
end start
Why did I always get the possitive answer, by the way I got it always, also when I change the value of esi register to another value (this register is responsible for which string is will be checked). I have no idea what I am doing wrong. (Actually maybe I do something worng with registers, but I have an example which is almost the same as my task and I wrote the code like in this example, but the problem is still on)
 
    