Module for parsing and analyzing machine code instructions
The module provides a class Parser for a machine code parsers and a corresponding class Opcode for opcode-patterns that defines bitpatterns and/or bitfields of which the parser can extract the values. It also has an analyzer class Analyzer with its own opocde class AnalyzerOpcode that can be used for analysis of instruction sets and their decoding.
Copy the file ocparse.py to a location where it is found by Python. The code is tested with Python 3.10.
The documentation is in the docs-directory and is based on Sphinx. Type simply make
for a list of possible formats. The formats html
, latexpdf
and man
have been tested.
Some examples of use are found in the correspondingly named folder.