A device control system is provided, in which a host device uploads optimal program
code suitable for its own system environment from a target device for control.
In the target device 2, a plurality of pieces of program code 231 through
23n used for different system environments and a header object 221
associated with the respective pieces of program code are stored in advance.
The host device 1 obtains the header object 221 from the target device
2, and then parses the obtained header object 221 to determine program
code 23x (x is one of 1 through n) optimal for its own system environment.
The host device 1 then uploads the determined program code 23x
from the target device 2 for interpretation, thereby controlling the
target device 2.