A program preparation apparatus that can reduce power consumption and that can
suppress malfunctions and the occurrence of noise by improving software is provided.
An assembler prepares a relative object program based on an assembly source program.
Next, the assembler changes the order of instructions included in the assembly
source program in a range that does not influence the operational results in a
CPU and, thereby, prepares another assembly source program so as to prepare a relative
object program based on this assembly source program. Next, the assembler finds
the respective maximum Hamming distance values between respective instructions
for a plurality of relative object programs so that the program of which the maximum
Hamming distance value is the lowest is determined as a formal relative object program.