Skip to main content

Python library for writing assembly code through object abstractions

Project description

flexpasm

Python library for writing assembly code through object abstractions. For Linux FASM.
Explore the docs »

Getting Started · Basic Usage · License


Getting Started

flexpasm is available on PyPI. Simply install the package into your project environment with PIP:

pip install flexpasm

Once installed, you can start using the library in your Python projects. Check out the documentation for detailed usage examples and API reference.

Basic Usage

"Hello World":

from flexpasm.instructions.segments import Label
from flexpasm.program import ASMProgram
from flexpasm.settings import Settings
from flexpasm.templates import PrintStringTemplate
from flexpasm.mnemonics.flow import JmpMnemonic


def main():
  settings = Settings(
    title="Example ASM Program",
    author="alexeev-prog",
    filename="example.asm",
    mode="32",
  )
  asmprogram = ASMProgram(settings)

  pst = PrintStringTemplate("Hello, World!")
  pst2 = PrintStringTemplate("Hello, World!", 'msg2', 'print_string2')
  start_lbl = Label("start")

  start_lbl.add_command(JmpMnemonic("print_string"), 1, comment='Jump to print strint template')

  asmprogram.add_label(start_lbl)
  asmprogram.add_template(pst)
  asmprogram.add_template(pst2)

  asmprogram.save_code()


if __name__ == "__main__":
  main()
$ fasm example.asm example
$ ./example

 Hello, World!

Check Other My Projects

  • SQLSymphony - simple and fast ORM in sqlite (and you can add other DBMS)
  • Burn-Build - simple and fast build system written in python for C/C++ and other projects. With multiprocessing, project creation and caches!
  • OptiArch - shell script for fast optimization of Arch Linux
  • libnumerixpp - a Powerful C++ Library for High-Performance Numerical Computing
  • pycolor-palette - display beautiful log messages, logging, debugging.
  • shegang - powerful command interpreter (shell) for linux written in C
  • aioconsole - simple python library for creating async CLI applications

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flexpasm-0.1.1.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flexpasm-0.1.1-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file flexpasm-0.1.1.tar.gz.

File metadata

  • Download URL: flexpasm-0.1.1.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Linux/6.12.0-1-cachyos

File hashes

Hashes for flexpasm-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a59c83057ade9bf03539bf8bec8f6b7be7e896b1bdd540c69e2ac9dc0608fa02
MD5 ff297444e9c14af35b29b2dae63e817b
BLAKE2b-256 aed26c64bce417dde298a716cdca234b913a172c230fd2a60f29992bedf914df

See more details on using hashes here.

File details

Details for the file flexpasm-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: flexpasm-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.7 Linux/6.12.0-1-cachyos

File hashes

Hashes for flexpasm-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ba93b12472edbddbbd305603b3065c332ec38a714feb1ef237db285e676659ef
MD5 828f7cab74710e7b847e9b94011df545
BLAKE2b-256 4d0f576f753c5ca2af8569d6736b4411e9459116b068097431742d802285580b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page