I understand that this code could probably look a lot cleaner, and be more efficient, but I am using only the code that has been provided so far in our book. I am trying to create a 2D array, have the user input a salesman number(row number), quantity sold(value), and product id(column number). Once they are finished they enter a value of -1. It should show each salesman's total sales (row totals), and each products total sales (column totals). I can enter information for the first row just fine, but the program freezes when I try to enter information for Salesman 2, 3, or 4. Suggestions?? Here is the portion of the code that I believe has the problem.
L1: mov edx, OFFSET msg1
call WriteString
call ReadInt
.WHILE(eax != quit)
mov ebx, OFFSET tableE
dec eax
add ebx, RowSizeE
imul ebx, eax
call Crlf
mov edx, OFFSET msg2
call WriteString
call ReadDec
mov ecx, eax
call Crlf
mov edx, OFFSET msg3
call WriteString
call ReadDec
mov esi, eax
dec esi
mov tableE[ebx + esi*TYPE tableE], ecx
call Crlf
mov eax, 0
mov ebx, 0
mov edx, 0
mov ecx, 0
mov esi, 0
loop L1
.ENDW