In previous code Variable Key was not resetted in case of retrail. Here a shorter corrected code.
Code:
Eeprom 100,[48,48,48,48,48,48]
Pass var byte
Key var byte
Len var byte
Char var byte
A0 var byte
Plen con 6
T9600 con 2
IniPass:
Key=0
len=0
Lcdout $FE,1
PassLoop:
Serin pinx,T9600,Char
Read 100+len,Pass
iF pass=Char then
Key=Key+1
else
Key=0
endif
Lcdout $FE, $80+len "*"
Len=Len+1
If Len=Plen+1 then
If Key=Plen then main
else
Lcdout $FE,1,"Access Denied"
pause 2000
goto IniPass
endif
endif
goto PassLoop
Main:
Al.
Bookmarks