Skip to main content

Python-based multi-architecture assembler

Project description

Asmy - Python Multi-Architecture Assembler

PyPI Tests License Python

A minimal Python-based assembler for multiple architectures.

Features

  • Pythonic syntax for assembly
  • Label support with fixups
  • Little/big-endian aware
  • ROM generation with .org/.db/.dw
  • Bring your own macros and metaprogramming with Python

Supported architectures:

Example (CHIP-8)

from asmy.chip8 import *

org(0x200)
with label("start"):
    ld(V0, 0)
with label("loop"):
    add(V0, 1)
    cls()
    jp("loop")

# Print resulting ROM in hex
print(asm.finalize().hex(" ", 2))

To try this example locally:

PYTHONPATH=. python3 examples/chip8_loop.py

Installation

pip install asmy

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

asmy-0.1.2.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

asmy-0.1.2-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file asmy-0.1.2.tar.gz.

File metadata

  • Download URL: asmy-0.1.2.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for asmy-0.1.2.tar.gz
Algorithm Hash digest
SHA256 92cb751067dbbd180e9025a1890ddd840c2b61699692ec6dddfb183a05d3c70b
MD5 7949bc9c2906ef453e5cd392b118460e
BLAKE2b-256 34584bbf323edeaccba12555db1a8dbf3ddd9dc8a0e9ee6b7f06d3ffaf70b2f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for asmy-0.1.2.tar.gz:

Publisher: publish.yml on zserge/asmy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file asmy-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: asmy-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for asmy-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a1f49d71eb6d73c7097a028d18783e96321dcbc24afa5234a11c8ee3a9c0d90b
MD5 db45ff99213c5746b4dbf406152940f0
BLAKE2b-256 9b47d75447540bec50ab7c146fa667f864cfb4a8306c037c2ec4675da60ebe08

See more details on using hashes here.

Provenance

The following attestation bundles were made for asmy-0.1.2-py3-none-any.whl:

Publisher: publish.yml on zserge/asmy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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