- 准备: index (uproct); odt, bom, sym-tbl, omt; design
- pre: doc, src
- 用啥的语言实现?
- 因为各个组件之间存在依赖关系, 如 instruction stream 依赖 ODV, OES, 所以还是要先把每一样弄清, 再 design
- bom: 这个要分析的, 不知道这个, 就不知道用户程序里的所有 BRK statement, 而这些断点也含 MI 程序自己指定的!
- 输出问题: rpg 里向 splf 输出挺方便的, 可以考虑支持 splf 输出
An ODV entry is required for each object described in the ODT. The index value for a particular object ODV entry is used as an operand for instructions that operate on the object. An ODT can contain 8,191 entries in template version 0 and 65,526 entries in template version 1. The first entry has an index value of 1.
Each ODV entry generally consists of the following:
- Type information
- The first 2 bytes of each ODV entry contain information identifying the type and general attributes of the object.
- OES offset or attribute information
- The last 2 bytes of each ODV entry contain either detailed attribute information or an offset into the OES where the detailed attribute information is found.
The OES contains a 4-byte OES length entry at the beginning of the OES component. This means that the minimum valid offset is 4 bytes.
The OES consists of a series of variable-length entries that complete an object's description. Several ODV entries for different objects with identical definitions can share the same OES entry. Each OES entry consists of the following:
- OES header. One byte indicating which OES appendages are present. A bit is included for each possible OES appendage. A binary 0 value for the bit means the appendage is not present. A binary 1 value for the bit means the appendage is present.