pyasm 0.2 - dynamic x86 assembler for python

olsongt at bellatlantic.net olsongt at bellatlantic.net
Tue Mar 8 19:01:45 EST 2005


>
> #################################
> ## helloWorld.py
> ## assembly hello world script
> #################################


DOH! The example file got truncated.  Here it is.

#################################
## helloWorld.py
## assembly hello world script
#################################

from pyasm import pyasm

pyasm(globals(),r"""
     !CHARS hello_str 'Hello world!\n\0'

     !PROC hello_world PYTHON
     !ARG  self
     !ARG  args

          PUSH hello_str
          CALL PySys_WriteStdout
          ADD ESP, 0x4
          MOV EAX,PyNone
          ADD [EAX],1
     !ENDPROC
     """)

hello_world()




More information about the Python-list mailing list