Re: pyasm 0.2 - dynamic x86 assembler for python

2005-03-13 Thread Michael Spencer
JanC wrote: [an example of using decorators to control pyasm] 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.

Re: pyasm 0.2 - dynamic x86 assembler for python

2005-03-13 Thread olsongt
[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

Re: pyasm 0.2 - dynamic x86 assembler for python

2005-03-10 Thread Stefan Behnel
Hi! What about an interface like this: -- @pyasm def hello_world(*some_args): !CHARS hello_str 'Hello world!\n\0' !PROC hello_world PYTHON !ARG self !ARG args PUSH hello_str CALL PySys_WriteStdout ADD ESP, 0x4

[ANN] pyasm 0.2 - dynamic x86 assembler for python

2005-03-08 Thread Grant Olson
PyASM by Grant Olson olsongt at verizon.net = PyASM is a dynamic x86 assembler for python. By dynamic, I mean that it can be used to generate inline assembly functions in python at runtime without requiring object file generation or linkage. New in

Re: pyasm 0.2 - dynamic x86 assembler for python

2005-03-08 Thread olsongt
# ## helloWorld.py ## assembly hello world script # DOH! The example file got truncated. Here it is. # ## helloWorld.py ## assembly hello world script # from