srounet / PyYasm

Python wrapper for Yasm

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyyasm

https://ci.appveyor.com/api/projects/status/y1yj33qd633a5tk5?svg=true

Python x86/x64 wrapper for Yasm

Using pyyasm

import pyyasm

# some inline asm which does nothing just to show how the library works
# __asm as to be bytes.
__asm = b"""
    use32
    org 0
    pushfd
    pushad
    popad
    popfd
"""
bytecode = pyyasm.assemble(__asm)
print(bytecode)

> b'f\x9cf`faf\x9d'

Running tests

python setup.py test

Changelog

0.0.1: initial release (07/05/2017)

About

Python wrapper for Yasm

License:Other


Languages

Language:PowerShell 46.9%Language:Python 31.2%Language:Batchfile 21.9%