program interpret;
@projectsettings "system" SPECTRUM
@use "text/txt"

var  
   i: byte =0; 
   user_input: pointer;
   pass: string = ("PASSWORD");
   pp: pointer;
   match: byte;

	@donotremove match
	@donotremove pp
	@donotremove pass
	@donotremove user_input
	@donotremove i

begin
	

	
	while(1) do
	begin
		txt::cls();
		match:=false;
		user_input:="";
		
		txt::print_string("ENTER PASSWORD", True);
		
		user_input:=txt::get_string();	
		txt::print_string(" ", True);

		match:=txt::str_compare(user_input,#pass);	
		txt::print_string(" ", True);
	
		if(match=true) then
		begin
			txt::print_string("YES! ", False);
			txt::print_string(user_input, True);
		end
		else
		begin
			txt::print_string("WRONG ", False);
			txt::print_string(user_input, True);
		end;
		
		txt::print_string("Try again",true);
		txt::wait_key();
	end;


end.
