[Carradio\FIAT\AD 182H2  FA0924]
Size(310,380);  

Form {
    	Digit(Code,"Code ",70,15,100);
    	
    	Group("Информация",5,40,300,40)	 
    {
        Label(message," ",100,17);
    }
    	Group("Описание",5,85,300,220) 	 
    {
        Label(lb1,"Code calculator for FIAT :",0,15);
    	Label(lb2,"Model:  AD 182H2",32,30);
    	Label(lb3,"Sec. Type:  CODE 4 dig",32,45);
	Label(lb4,"Manufacturen: GRUNDIG.",32,60);
	Label(lb5,"Partnumer:  FA0925 or FA1092 ",32,75);
    	Label(lb6,"MCU:    ",32,90);
	Label(lb7,"EEPROM:  24C16",32,105);
	Label(lb8,"Sec.loc.:  EEPROM",32,120);
    	Label(lb9,"Autor:  telik@ukrwest.net   2008",0,200);
    	Label(lb10,"Enter code:  ",5,135);
	//Label(lb11,"               ",5,150);
    }
	Picture(Logo,"fiat.bmp",210,0,0,0);
    {
        Label(msg," ",0,315);				 
    } 
}

OnShow {
	msg.Color=0x0000FF;				
        msg.Bold=1;					
	msg="http://www.eeprom.lg.ua";	

	var1 = @0x10; 				 
	var2 = @0x11; 				 
	var3 = var2 & 0x0F; 			 
	var0 = @0x14; 				 
	var4 = var1 ^ 0x34;			//			 
        
	var10 = 1;  
    	if ( var4 != var0 ) { var10 = 0;}	 
	if ( var10 = 0 ) { message.Bold = 1; message.Color = 0x0000FF; message = "Неверный дамп ! "; Code = 0; }
    else
    {  
	var5 = ((var1 >> 4 ) ^ ( var2 >> 4 )) ^ 0x0F;
	var6 = var5 & 7;
	var7 = ( var1 >> 4 ) ^ ( var1 & 0x0F);
	var8 = ( var2 >> 4 ) ^ var7;
	var9 = var7 << 4;
	var10 = var6 << 8;
	Code = var8 | var9 | var10;
	message.Color = 0xFF0000; message.Bold=1; message = "    Дамп OK."; 
    }
}
