摘要 |
A computer-implemented method of translating an assembler program into a high-level language computer program is provided. The method includes receiving each line of the assembler program, parsing individual fields in each assembler program line, including an absolute line number and an opcode for an assembler instruction. Each assembler program line is then stored into a data structure such that each line is accessible and each field in each line is accessible, and the numeric opcode of each assembler program line is parsed into individual digits. Alternatively, the symbolic opcode and operands may be decoded to produce a more human readable and maintainable output. For each assembler program line, a decision tree is traversed in response to the value of each opcode digit to identify the corresponding assembler instruction. The assembler instruction is then translated to an equivalent set of code in the high-level computer language. The equivalent set of code for each assembler program line is generated and provided as output. |