An electronic control unit for a vehicle-mounted engine system has a
computer and a single program memory. The program memory stores a
plurality of functionally finely classified programs, which includes
programs to be used in common between a normal engine control mode and a
fuel evaporation leak diagnosis mode. The plurality of programs is
associated, as a reference table, with the plurality of different control
modes by separating programs required for the respective control modes.
The computer sequentially executes only programs associated with the
designated control mode, when any of the control modes is designated.