This is knapsack programme that I will send to teacher.I write this program and can compile but when I run it has that I don't understand.please help me to solve this ploblem in line between call waitMsg.Thank you.
INCLUDE Irvine32.inc
.code
input byte 11,8,7,6,5
found byte "The correct combination is ",0
notfound byte "Not found answer",0
count dword ?
addd byte "We add ",0
current byte ".Current target is "
bigger byte ".Bigger! Discard "
foundc byte ".Found the combination!"
output byte ?
main PROC
mov eax,0
mov ecx,lengthof input
mov edi,0
L1: mov esi,0
mov al,20
push ecx
L2:
.IF (input[edi]>al)
mov edx,offset addd
call writeString
call writeDec
mov edx,offset bigger
call writeString
inc edi
jmp J1
.ELSEIF (input[edi]==al)
mov edx,offset addd
call writeString
call writeDec
mov edx,offset foundc
mov bl,input[edi]
mov output[esi],bl
inc esi
jmp J2
.ENDIF
sub al,input[edi]
mov bx,0
mov bl,input[edi]
call waitMsg
mov output[esi],bl ;<-------Error
call waitMsg
inc esi
inc edi
loop L2
pop ecx
J1: loop L1
mov edx,offset notfound
call writestring
jmp O
L3: mov eax,0
J2: mov edx,offset found
call writestring
mov ecx,esi
mov esi,0
mov al,output[esi]
call writedec
loop L3
O: exit
main ENDP
END main