@@ -16,25 +16,27 @@ assemble bytecode for several different versions of Python.
1616
1717Here are some potential uses:
1818
19- * Make small patches to existing Python bytecode when you don’t have source
19+ * Make small changes to existing Python bytecode when you don’t have source
2020* Craft custom and efficient bytecode
2121* Write an instruction-level optimizing compiler
2222* Experiment with and learn about Python bytecode
23- * Foil uncompyle6 _ so that it can’t disassemble bytecode (at least for now)
23+ * Foil decompilers like uncompyle6 _ so that they can’t disassemble bytecode (at least for now)
2424
25- This will support bytecodes from Python version 1.0 to 3.8 or so.
25+ This support the same kinds of bytecode that xdis _ supports. This is
26+ pretty much all released bytecode, although we tend to lag behind the
27+ latest Python releases.
2628
2729The code requires Python 2.7 or later.
2830
2931Assembly files
3032--------------
3133
32- More detail will be filled in, but some principles:
34+ See how-to-use _ for more deatil. Some general some principles:
3335
34- * Preferred extension for Python assembly is `.pyasm `
35- * assembly is designed to work with the output of `pydisasm --asm `
36+ * Preferred extension for Python assembly is `` .pyasm ` `
37+ * assembly is designed to work with the output of `` pydisasm -F xasm ` `
3638* Assembly file labels are at the beginning of the line
37- and end in a colon, e.g. `END_IF `
39+ and end in a colon, e.g. `` END_IF: ` `
3840* instruction offsets in the assembly file are ignored and don't need
3941 to be entered
4042* in those instructions that refer to offsets, if the if the
@@ -155,7 +157,7 @@ To create a python bytecode file from an assemble file, run:
155157 pyc-xasm [OPTIONS] ASM_PATH
156158
157159
158- For usage help, type `pyc-xasm --help `.
160+ For usage help, type: `` pyc-xasm --help ` `.
159161
160162
161163To convert a python bytecode from one bytecode to another, run:
@@ -165,7 +167,7 @@ To convert a python bytecode from one bytecode to another, run:
165167 pyc-convert [OPTIONS] INPUT_PYC [OUTPUT_PYC]
166168
167169
168- For usage help, type `pyc-convert --help `.
170+ For usage help, type: `` pyc-convert --help ` `.
169171
170172
171173See Also
@@ -178,6 +180,8 @@ See Also
178180
179181
180182.. _uncompyle6 : https://github.com/rocky/python-uncompyle6
183+ .. _how-to-use : https://github.com/rocky/python-xasm/blob/master/HOW-TO-USE.rst
184+ .. _xdis : https://github.com/rocky/xdis
181185.. |Latest Version | image :: https://badge.fury.io/py/xasm.svg
182186 :target: https://badge.fury.io/py/xasm
183187.. |Pypi Installs | image :: https://pepy.tech/badge/xasm
0 commit comments