hi guys pls. help me with this. I want to limit the times when the user would guess the word for 3 trials only. How will i do that?
PLs. see my code below:
TRYAGAIN: mov cx, 12 mov bx, 0 AGAIN: mov ah, 01h ; read a char from KB with echoing on screen int 21h ; stores the char read in al cmp al, 0dh ; cmp al with <cr>(0dh) je ACTION mov ENTRY[bx], al ; stores the chars read in entry inc bx loop AGAIN ; to read next char from KB ACTION: mov ENTRY[bx], '$' ; store $ at the end of the array lea si, ANSWER lea di, ENTRY mov cx, 011 ; cx = 11 length of the answer repe cmpsb ; cmp si(answer) & di(entry) je VIEWMSG lea dx, M3 mov ah, 09h int 21h jmp TRYAGAIN