[Carradio\Chrysler\Chrysler PART No P04859504AD-A]

Size(295,220); 

Form {

    HexDigit(Code,"Code",80,15,100,4);
    ComboBox(Errors,"Error counter",44,45,100,"Not error",
                                                 "1 error",
                         "2 errors",
                         "3 errors (WAIT)",
                         "Unknown state");

    Group("Description",5,85,280,60)
    {
        Label(lb1,"Code calculator",105,15);
        Label(lb2,"for carradio Chrysler (PART No P04859504AD-A)",25,35);
    }
}

OnShow {

    Code = @0x14 << 8 | @0x15;
    Errors = 4;
    if(@23 = 0x10) { Errors = 0;}
    if(@23 = 0x21) { Errors = 1;}
    if(@23 = 0x32) { Errors = 2;}
    if(@23 = 0x43) { Errors = 3;}
}

OnApply {

    Var0 = Code;
    @0x14 = (Var0 >> 8) & 0xFF;
    @0x15 = Var0 & 0xFF;
    @23 = Errors * 0x11 + 0x10;
}
