Abstract:
A program-controlled electronic equipment comprises a memory for storing status information of the presence or absence of each of a plurality of elements, and a loader for loading a plurality of control programs for controlling the elements. Control means controls the loader such that the loader loads only those control programs which control the existing elements, in accordance with the status information stored in the memory.

Description:
This application is a continuation of application Ser. No. 07/956,575 filed Oct. 5, 1992, now abandoned, which is a continuation of application Ser. No. 07/369,858 filed Jun. 22, 1989, which is now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to program-controlled electronic equipment, and more particularly to an electronic equipment which attains various functions by executing an externally loaded control program. 
     2. Related Background Art 
     Peripheral devices such as a printer which have their functions controlled by an externally loaded program have recently been marketed. 
     Such a device usually comprises a fundamental portion which is essential to the device and various optional features. Accordingly, depending on a combination of the optional features, various types of equipment from a minimum function to a variety of functions may be provided. 
     In such an equipment, a control program which is compatible to the control of all functions is loaded irrespectively of the configuration of the equipment, or a control program which conforms to the configuration of the equipment is loaded. In the former case, an unnecessary program which cannot be used in the equipment is loaded. In the latter case, another control program is required if the configuration of the equipment is partially modified or an equipment of a different configuration is installed. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to provide an electronic equipment which detects a configuration of the equipment and efficiently functions in accordance with the configuration of the equipment. 
     It is another object of the present invention to provide an electronic equipment which reads a plurality of control programs and does not load those control programs which are not necessary for the configuration of the equipment. 
     It is a further object of the present invention to provide an electronic equipment which reads a plurality of control programs and loads only those control programs which are necessary for the configuration of the equipment. 
     It is still a further object of the present invention to provide an electronic equipment which reads a plurality of control programs and loads only a group of control programs which are proper to the configuration of the equipment. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows a functional block diagram of a control unit of an electronic equipment, in accordance with one embodiment, 
     FIG. 2 shows a functional block diagram of a detection device of the embodiment, 
     FIG. 3 illustrates loading of a control program in the embodiment, 
     FIG. 4 shows a functional block diagram of detection means in another embodiment, and 
     FIG. 5 illustrates loading of the control program in the other embodiment. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENT 
     FIG. 1 shows a functional block diagram of a control unit of an electronic equipment in accordance with one embodiment. Numeral 1 denotes detection means which scans a hardware configuration (not shown) to detect the presence or absence of predetermined hardware in the equipment. Numeral 2 denotes a control program storage which may comprise an external storage device. It stores all control program modules for all hardware modules included in the configuration of the equipment. Numeral 3 denotes load means which selects from the control program storage 2 those control program modules for the hardware modules whose presence has been detected by the detection device 1 and loads the selected control program modules to the equipment. Numeral 4 denotes a program memory area which stores the loaded control progrum. 
     FIG. 2 shows a functional block diagram of the detection device of the embodiment. Numerals 10-60 denote hardware modules (including interface circuits and mechanical units) of all functions of the electronic equipment. 
     Assuming a printer (laser beam printer) as the electronic equipment, the hardware A 10 is a basic feed sheet stacker control unit, the hardware B 20 is an additional feed sheet stacker control unit, the hardware C 30 is an exposure control unit, the hardware D 40 is a development/fixing control unit, the hardware F 60 is a basic eject sheet stacker control unit, and the hardware E 50 is an additional eject sheet stacker control unit. It is seen that the additional feed sheet stacker control unit 20 and the additional eject sheet stacker control unit 50 are not connected in FIG. 2. Namely, the configuration includes one input stacker and one output stacker. 
     Numeral 70 denotes a device for detecting the presence or absence of the hardware module. It sequentially accesses the interface circuits of the hardware A 10 to hardware F 60 by channel addresses through a bus line. If a bus error occurs or no response comes back, it is determined that the hardware module is not connected to the channel. Numerals 80-130 denote flag memories for storing the presence or absence of the hardware modules. If the hardware module is present, a flag OK is stored, and if it is not present, a flag NG is stored. 
     FIG. 3 illustrates a load process of the control program in the embodiment. Numeral 140 denotes a main control program which does not depend on the presence or absence of the hardware module, and numerals 150-200 denote control program modules corresponding to the hardware modules A-F. Numeral 210 denotes means for loading necessary programs. First, it unconditionally loads the main control program 140. Then, it loads the control program modules corresponding to the existing hardware modules, in accordance with the contents of the flag memories 80-130. The loading is done from predetermined addresses of the program memory area 4. The program module which need not be loaded is skipped in the secondary memory. It is also skipped in the program memory area 4 which has NULL. Accordingly, the loading time for this area is saved. When all necessary control programs have been loaded, the load means 210 shifts the control to the top address of the main control program and the process is terminated. The main control program 140 examines the contents of the flag memories 80-130 and shifts the control to the corresponding control program modules. It does not shift the control to the address at which no program module is present. 
     In the above embodiment, the memory area in which the control program module is not to be loaded is indicated as NULL. If a CPU (not shown) has a program relocation function, the control program modules may be loaded from any address. Accordingly, it is not necessary to leave the NULL area and the control program memory area can be saved accordingly. This is also true when the CPU has a paging function. 
     In the above embodiment, the detection means 1 is used to detect the hardware configuration and the control programs are loaded in accordance with the detection result. Alternatively, a user may input information on the hardware configuration (structure) by input means (not shown) and the control programs may be loaded in accordance with the input information. 
     Alternatively, where combinations of hardware modules are limited to several types, the corresponding control programs may be patterned so that they can be efficiently loaded. 
     FIG. 4 shows a functional block diagram of a control unit of the electronic equipment in accordance with another embodiment. The hardware module detection means 70 detects the presence or absence of the hardware A 10 to hardware F 60 and determines the type of combination in accordance with a table (not shown). For example, there are three types x, y and z for three combinations. In the present embodiment, a type flag 230 is provided and it stores the determined type, for example, type y. 
     FIG. 5 illustrates a load process of the control program in the present embodiment. Numerals 240-260 denote control programs corresponding to the three types x, y and z of the combinations of the hardware modules. The load means 210 loads the y type control program 250 into the program memory area 220 in accordance with the content y of the type flag 230. 
     The common control program modules in the respective control programs are stored in duplicate on the secondary memory, but only one type of control program need be loaded. Accordingly, the efficiency is improved. 
     According to the present invention, the control program which conforms to the hardware configuration is loaded. Accordingly, the electronic equipment starts up in a minimum time, the loading efficiency is improved, and the equipment can immediately operate.