Giter VIP home page Giter VIP logo

pyasm2's Introduction

pyasm2 - x86 assembler library (C) 2012 Jurriaan Bremer

Although its called pyasm2, this is not per se a successor of Pyasm or pyASM. pyasm2 aims to be as flexible as possible, it will support x86, SSE and SSE2.

A key feature of pyasm2 is the ability to have blocks of instructions and being able to give the base address at a later time, that is, you don't need to know the address of instructions before-hand. For example, you can construct a series of instructions, request the size that will be needed in order to store all instructions as sequence, allocate this memory and write the instructions from there, this approach is very useful when making JIT compilers etc.

The syntax of pyasm2 is supposed to be as simple as possible.

For example, an instruction such as "mov eax, dword [ebx+edx*2+32]" can be encoded using pyasm2 as the following.

mov(eax, dword [ebx+edx*2+32])

These memory addresses also support segment registers, e.g.

mov(eax, dword[fs:0xc0])

although this is currently only supported in 64bit python versions.

Furthermore, pyasm2 makes it possible to chain multiple instructions. Take for example the following statement.

block(mov(eax, ebx), push(32))

However, for more implementation-specific details, please refer to the IMPLEMENTATION file.

pyasm2's People

Contributors

jbremer avatar rqndom avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.