[Dashboard\Audi\A6 VDO 93C66]

Size(280,220); // ширина и высота

Form
{
Form {

    Digit(Distance,"Distance",60,15,60);
    Group("",5,45,270,40)
    {
        Label(msg,"Wrong dump !!!",90,15);
    }
    Label(lbkm,"kilometers",175,15);
        Group("Description",5,100,270,65) {

            Label(lb1,"Dashboard calculator for a car VW Touareg 2004.",23,18);
            Label(lb2,"Dashboard made by BOSCH. EEPROM 2408.",35,35);
    }
}

OnShow 
{
    // проверка правильности дампа

    Var1 = 0x10;
    Var2 = @0x10 | (@0x11 << 8);
    Var3 = 0x12;
    Var5 = 0;
    while(Var3 < 0x20)
    {
        Var4 = @Var3;
        Var3 = Var3 + 1;
        Var4 = Var4 | (@Var3 << 8);
        if(Var4 != Var2) { Var5 = 1; }
        Var3 = Var3 + 1;
    } 
    if(Var2 = 0)        { Var5 = 1;}
    if(Var2 = 0xFFFF)   { Var5 = 1;}
    if(Var5 != 0)
    {
        msg.Color = 0x0000FF;
        msg.Bold = 1;
        msg = "Wrong dump !!!";
        Distance = 0;
    }
    else
    {
        msg.Color = 0xFF0000;
        msg.Bold = 1;
        msg = "    Dump OK.";
        Distance = Var2 << 4;
    }
}

OnApply {
    Var5 = 0;
    Var2 = Distance >> 4;
    if(Var2 > 0xFFFF) {Var5 = 1;}
    if(Var2 < 0x06)   {Var5 = 1;}
    if(Var5 != 0)
    {
        msg.Color = 0x0000FF;
        msg.Bold = 1;
        msg = "Wrong distance !";
    }
    else
    {
        Var3 = 0x10;
        while(Var3 != 0x20)
        {
            @Var3 = Var2 & 255;
            Var3 = Var3 + 1;
            @Var3 = (Var2 >> 8) & 255;
            Var3 = Var3 + 1;
        }
        msg.Color = 0xFF0000;
        msg.Bold = 1;
        msg = "    Dump OK.";
        Distance = Var2 << 4;
    }
}
