[Carradio\PORSCHE\CDR-220 BE4462]

Size(310,470);  

Form {
    	HexDigit(Code,"Code ",70,15,100,4);
    	//CheckBox(ResetCounter,"Обнулить счётчик попыток",82,80);
	//ComboBox(CodeRequest," PROD ",65,50,50,"On","Off");

	Group("Идентификация",5,105,300,45)	  
    {
        Label(sn," ",65,20); 			  
    }
	Group("Информация",5,155,300,50)		 
    {
        Label(message," ",0,22);			 
    }
    	Group("Описание",5,205,300,200) 		 
    {
        Label(lb1,"Code calculator for PORSCHE :",0,15);
    	Label(lb2,"Model:  BAVARIA C BUSINESS",32,30);
    	Label(lb3,"Sec. Type:  CODE 4 dig",32,45);
	Label(lb4,"Manufacturen: BECKER.",32,60);
	Label(lb5,"Partnumer:  BE4462",32,75);
    	Label(lb6,"MCU: ",32,90);
	Label(lb7,"EEPROM: 24C02",32,105);
	Label(lb8,"Sec.loc.: EEPROM",32,120);
    	Label(lb9,"Autor:  telik@ukrwest.net   2008",0,180);
    	Label(lb10,"Enter code: ",32,135);
    }
	Picture(Logo,"porsche.bmp",210,10,0,0);
    {
        Label(msg," ",0,410);				 
    } 
}


OnShow {
	msg.Color=0x0000FF; msg.Bold=1;	msg="http://www.eeprom.lg.ua";				
        	 
    	var0=1;
    	if(@0xA0!=@0xA3){var0=0;}
    	if(@0xA1!=@0xA4){var0=0;}
    	if(@0xA2!=@0xA5){var0=0;}	
    	if(var0=0){ message.Bold=1; message.Color=0x0000FF; message="Неверный дамп !"; Code=0; }
    else
    {
	var1=@0xA0;
	var2=@0xA1;

	var3=var1^0xAA ;
	var4=var2^0xAA ;
	var3=var3<<8 ;

	sn = "Serial No.: "+#c.@0xE1+#c.@0xE2+#c.@0xE3+#c.@0xE4+#c.@0xE5+#c.@0xE6+#c.@0xE7;
    	Code=var3|var4;
	message.Color=0xFF0000; message.Bold=1;	message="Дамп ОК.";
   }
}

OnApply {

}
