pyasm 0.2 - dynamic x86 assembler for python

olsongt at verizon.net olsongt at verizon.net
Sun Mar 13 18:11:52 EST 2005


[JanC]
> The code below makes it possible to write assembler code for
different
> architectures (in case pyasm ever supports that ;) and also a Python
> code version to use when running on a system where no assembler code
> can be used.  It prints:

[Michael]
> Another (perhaps wacky) approach would be to change the assembler
> source syntax
> enough to make it legal Python - in particular, this means
parenthesizing
>the
> arguments - then it can just be stored in-line with other Python
source. This
> has the additional benefit that one could write support functions to
enable
> the
> source to be executed interactively in Python.
>
> The following example uses the CPython opcodes, represented as Python

> functions.
>  Python control structures 'while' and 'if' are used as assembler
directives
> for flow.

I've been trying to come up with responses to these two posts, but I'm
just plain speechless.  That should be taken as a complement.




More information about the Python-list mailing list