pyasm 0.2 - dynamic x86 assembler for python

olsongt at bellatlantic.net olsongt at bellatlantic.net
Wed Mar 9 01:01:45 CET 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