MIP: An OPM MI Disassembler
Go back to main page
of i5/OS Programmer's Toolkit.
As a subproject of i5toolkit, MIP was launched in the January of 2011. Like what it is named, MIP is to disassemble an OPM program into corresponding OPM MI source, which can useful for:
- Alanyzing the program logics of the original program.
- Compiling a new program that behaves just the same as its original copy using MIP's cousin, MIC.
- Modifying existing program logics of the original program or adding new ones to it.
The goal of subproject MIP is to implement a practical OPM MI disassembler along with documentations on techniques involved in the disassembling process. OPM MI is not only a set of MI instructions, it's also a programming language (simple, elegant, and powerful). I hope the documentations provided here would help you in understanding and mastering this programming language.
The name of the core CL command of MIP is 'MIP' which resides library I5TOOLKIT. The QShell command name of MIP's 'mip'.
The pre-requisite of applying MIP on an OPM program is that the target program contains observable information; in other words, it haven't been modified by operations such as CHGPGM RMVOBS(*ALL), or it's not a IBM supplied one.
Note that MIP isn't a tool for RPG or COBOL programmers. The output source code of MIP is in OPM IM language. So you need the basic knowledge in MI to read, modify, and compile the MI source back into an OPM program.
Assume that you have an OPM RPG program called ORPHEN whose lastest source isn't availble. To retrieve ORPHEN's MI source back into a source PF member, you might issue CL command MIP like the following:
First of all, all techniques we introduced here are based on an MI instruction, MATPG (Materialize Program)
. Prototype of MATPG's bound program interface, _MATPG, is defined in mih52.rpgleinc along with the receiver instruction template for this instruction, matpg_tmpl_t.
- link to mih52.rpgleinc
Documentation on techniques involved in the design of MIP are listed below: