I want to show "Hello World" once the user entered the correct password, but if the password is incorrect the program will prompt for Yes(Y)/No(N), if the user entered Yes(Y), the program will give 3 chances to the user to show the "Hello World" and if the user entered the No(N), the program will exit. My problem is that, every time I select Yes(Y), the program keeps looping, it just end if I entered No(N),
Here is the my code(I've skipped some parts)
...
org 0100h
.code
mov ah, @data
mov ds, ah
mov cx, 3
pool:
dec cx
jz full ;jump if equal to zero seems of no effect, the loop is still counting
dsply:
<codes here are for requesting and comparing the password>
...
...
...
cmp bl, al
jne errr
cmp cl, al
jmp welc
errr:
mov ah, 9
lea dx, pmpt ; Displays whether the Yes(Y)/No(N)
int 21h
mov ah, 1
mov cl, al
int 21h
cmp cl, 'Y'
je dsply
cmp cl, 'N'
je endmain
loop pool
full:
mov ah, 9
lea dx, att ;att will display You've Exceeded
int 21h
jmp endmain
welc:
mov ah, 9
lea dx, hw ; Displaying Hello World
int 21h
jmp endmain
endmain:
mov ah, 4ch
int 21h
end main
I don't know if this codes are right, I don't have the copy of my code right now, and also, I'm sorry if my code and explanation of the problem look stupid, but if anyone could please to help, it would be great, and more great if you could give me your another idea :)