A program code generation support device, comprising: storage means for storing as data, an optimization rule that is composed of a conversion condition and a conversion content, the conversion condition being determined on the basis of a repetition number by which the execution codes on the basis of the same command are continued, with respect to data of a program code constituted by an execution code that is composed of process data used for an execution process and a command representing an execution process content; and code optimization means that includes a code analysis unit for analyzing the program code and counting the repetition number, a condition search unit for collating the analyzed program code with the optimization rule stored in the storage means and searching for a part matching the conversion condition in the program code on the basis of the counted repetition number, and an optimization unit for converting a part matching the conversion condition on the basis of the conversion content to generate data of a new program code; the device further comprising: incorporating apparatus condition input means for setting a program code storage capacity of an apparatus executing the program code as an execution process environment of the program code; and program code compression process means (4E,4F) for compressing and processing the program code on the basis of the execution process environment set by the incorporating apparatus condition input means; wherein the program code compression process means (4E, 4F) is configured to compress the program code constituted by the execution codes, each execution code being composed of the process data used for the execution process and the command representing the execution process content which are arranged in order, by discriminating the process data and the command in each execution code, compiling and converting pieces of the process data for each element into a binary format, converting the command into a numeral value corresponding to the command, dividing the process data converted into the binary format and the command converted into a numeral value by a predetermined data amount so as to form a plurality of groups with each group corresponding to either process data or the command, the size of each of the plurality of groups being the predetermined data amount, and, for each group, adding a bit that is a flag for determining whether or not the group contains the command. storage means for storing as data, an optimization rule that is composed of a conversion condition and a conversion content, the conversion condition being determined on the basis of a repetition number by which the execution codes on the basis of the same command are continued, with respect to data of a program code constituted by an execution code that is composed of process data used for an execution process and a command representing an execution process content; and code optimization means that includes a code analysis unit for analyzing the program code and counting the repetition number, a condition search unit for collating the analyzed program code with the optimization rule stored in the storage means and searching for a part matching the conversion condition in the program code on the basis of the counted repetition number, and an optimization unit for converting a part matching the conversion condition on the basis of the conversion content to generate data of a new program code; the device further comprising: incorporating apparatus condition input means for setting a program code storage capacity of an apparatus executing the program code as an execution process environment of the program code; and program code compression process means (4E,4F) for compressing and processing the program code on the basis of the execution process environment set by the incorporating apparatus condition input means; incorporating apparatus condition input means for setting a program code storage capacity of an apparatus executing the program code as an execution process environment of the program code; and program code compression process means (4E,4F) for compressing and processing the program code on the basis of the execution process environment set by the incorporating apparatus condition input means; wherein the program code compression process means (4E, 4F) is configured to compress the program code constituted by the execution codes, each execution code being composed of the process data used for the execution process and the command representing the execution process content which are arranged in order, by discriminating the process data and the command in each execution code, compiling and converting pieces of the process data for each element into a binary format,