[Carradio\GRUNDIG\WKC 3842  GR0552]
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 GRUNDIG :",0,15);
    	Label(lb2,"Model:  WKC 3842 ",32,30);
    	Label(lb3,"Sec. Type:  CODE 4 dig",32,45);
	Label(lb4,"Manufacturen: GRUNDIG.",32,60);
	Label(lb5,"Partnumer:  GR0552 ",32,75);
    	Label(lb6,"MCU:  D1719C 641",32,90);
	Label(lb7,"EEPROM:  OKI9743 or GRN-002 = 93C46",32,105);
	Label(lb8,"Sec.loc.:  EEPROM",32,120);
    	Label(lb9,"Autor:  telik@ukrwest.net   2008",0,200);
    	Label(lb10,"Enter code:  ",5,135);
    }
	Picture(Logo,"grundig.bmp",210,10,0,0);
    {
        Label(msg," ",0,315);				 
    } 
}

OnShow {
        msg.Color=0x0000FF;				
        msg.Bold=1;					
	msg="http://www.eeprom.lg.ua";		 
        
	var18=(@0x00^@0x02)|((@0x01^@0x03)<<8);
	if (var18=0x1234) {var21=1;var22=0;}
	else {var22=1;var21=0;} 
	if (var22=1) {message.Color=0x0000FF;message.Bold=1;message="Неверный дамп ! ";Code=0;}  
	else
    {  
	var5=((@0x00>>4)^(@0x01>>4))^0x0F;
	var6=var5&7;
	var7=(@0x00>>4)^(@0x00&0x0F);
	var8=(@0x01>>4)^var7;
	var9=var7<<4;
	var10=var6<<8;
	Code=var8|var9|var10;
	message.Color=0xFF0000;message.Bold=1;message="    Дамп OK."; 
    }
}
