Skip to main content

IArm is an ARM interpreter for the ARMv6 THUMB instruction set (More specifically for the ARM Cortex M0+ CPU). It supports almost 100% of the instructions, and some assembler directives. There is also its Jupyter kernel counterpart so it can be used with Jupyter notebooks. Check out the /docs folder to see a technical overview and some example notebooks.

Install

Install with pip

pip install iarm

Or clone the repo and install with setuptools

python setup.py install

To install the Jupyer kernel counterpart, after installation, run

python -m iarm_kernel.install

Usage

Python

Import the arm module and instantiate an interpreter from the Arm class

import iarm.arm
interp = iarm.arm.Arm()

To run code, pass the code into the evaluate method. Multiple lines can be sent in as well as one line at a time.

interp.evaluate(" MOVS R0, #5")
interp.evaluate("""
    MOVS R1, #3
    ADDS R2, R0, R1
""")

By default, code is not run. The run method must be called.

interp.run()
print(interp.register)  # Print out the status of all the registers

Jupyter

Simply activate the iarm_kernel module and make a new notebook as an IArm notebook. Most of the magics have a 1 to 1 to the module. Refer to the notebooks in the /docs/examples folder and the %help magic.

Metadata

Release files for iarm 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iarm 0.1.0
File Size Uploaded
iarm-0.1.0.zip 28.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iarm 0.1.0
File Interpreter ABI Platform
iarm-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 55.3 kB

Release files / iarm-0.1.0.zip

Download URL iarm-0.1.0.zip
Size 28.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d7e95df06afa449b2769c965403a3c5f0ee887795ab95e49a47b1e41cd2dc890
BLAKE2b-256 checksum
How to use checksums
1b94273d68aa80eddbc5f0280243f2de7e48c826514526e96c88a93798d5d1f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / iarm-0.1.0-py3-none-any.whl

Download URL iarm-0.1.0-py3-none-any.whl
Size 27.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f6b8179eb010ffbe57b803ac753487d632c8f0b3606b747c0abe94d1e762ba8
BLAKE2b-256 checksum
How to use checksums
3565a2f823b086ec2d269dc89b01408592536bc5e96f355f96679e57cec71ad4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page