[Carradio\BLAUPUNKT\HAMBURG CD70 BP0810]
Size(310,460);  

Form {
    	HexDigit(Code,"Code ",70,15,100,4);
    	//CheckBox(ResetCounter,"Обнулить счётчик попыток",82,45);
	//ComboBox(CodeRequest,"CANCHECK ",65,50,50,"On","Off");
	
	Group("Идентификация",5,75,300,40)	  
    {
        Label(part," ",40,20); 			
	
    }
    	Group("Информация",5,120,300,40)	 
    {
        Label(message," ",30,17);		 
    }
    	Group("Описание",5,165,300,220) 		 
    {
        Label(lb1,"Code calculator for BLAUPUNKT :",0,15);
    	Label(lb2,"Model:  HAMBURG CD70 BP0810",32,30);
    	Label(lb3,"Sec. Type:  SMARTCARD",32,45);
	Label(lb4,"Manufacturen: BLAUPUNKT.",32,60);
	Label(lb5,"Partnumer:  7 640 810 310 ",32,75);
    	Label(lb6,"MCU: MC68HC11PA8 (ZC401684CFU2 8925904732)",32,90);
	Label(lb7,"EEPROM:  24C08 smd + M92256 smd",32,105);
	Label(lb8,"Sec.loc.:  MCU",32,120);
    	Label(lb9,"Autor:  telik@ukrwest.net   2008",0,200);
    	Label(lb10,"Enter code:   Нажать TU и 1 , и вкл. магнитолу.  Набор",5,135);
	Label(lb11,"                   курсором настройки.Подтверждение кн. ENT",5,150);
    }
	Picture(Logo,"blaupunkt.bmp",210,18,0,0);
    {
        Label(msg," ",0,395);				 
    } 
}

OnShow {
        msg.Color=0x0000FF;				 
        msg.Bold=1;					 
	msg="http://www.eeprom.lg.ua";		  
        
	message.Bold = 1;  
    	Var10 = 1;
    	if(@0x00 != 0x20) { Var10 = 0;}	
    	if (Var10 = 0)
    {
        message.Color = 0x0000FF;
        Message = "                Неверный дамп ! ";
        Code = 0;
    }
    else
    {  
	var1 = ((@0x02 & 0x0F) << 12);
	var2 = ((@0x02 & 0xF0) << 4);
	var3 = ((@0x03 & 0x0F) << 4);
	var4 = ((@0x03 & 0xF0) >> 4);	
        Code = var1 |var2 |var3 |var4; 
	
	message.Color = 0xFF0000;
    	message.Bold = 1;
    	message = "                    Дамп ОК. ";
    }
}

OnApply {
	Var0 = 1;
    	if(@0x00 != 0x20) { Var0 = 0;}	
    	if (Var0 = 0) { message.Color = 0x0000FF; message = "Неверный дамп! Запись прекращена!"; Code = 0; }
    else
    	{
	var0 = Code;
	@0x02 = @0x02 & 0xF0 | (var0 >> 12 & 0x0F);
    	@0x02 = @0x02 & 0x0F | (var0 >> 4 & 0xF0);
    	@0x03 = @0x03 & 0xF0 | (var0 >> 4 & 0x0F);
    	@0x03 = @0x03 & 0x0F | (var0 << 4 & 0xF0);
	@0x11 = @0x11 & 0xF0 | (var0 >> 12 & 0x0F);
    	@0x11 = @0x11 & 0x0F | (var0 >> 4 & 0xF0);
    	@0x12 = @0x12 & 0xF0 | (var0 >> 4 & 0x0F);
    	@0x12 = @0x12 & 0x0F | (var0 << 4 & 0xF0);
	message.Color = 0xFF0000;
        message.Bold = 1;
       	message = "Новый код успешно изменён.";
    }
}
