asm 0.3.0

A Rust library for decoding and encoding assembly of various architectures
Documentation
  • Coverage
  • 100%
    109 out of 109 items documented1 out of 14 items with examples
  • Size
  • Source code size: 53.67 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 6.83 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 14s Average build duration of successful builds.
  • all releases: 14s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • ATiltedTree

Assembly

A Rust library for decoding and encoding assembly of various architectures.

Supported architectures currently include:

  • 6502

Cargo Features

Every architecture has a feature. This allows you to only enable the architectures you need.

For example 6502 support would be enabled by adding this to your Cargo.toml:

[dependencies.asm]
version = "0.1"
features = ["6502"]

Example

Decoding

use asm::{_6502, Decoder};
let assembly = [0x65, 0x83, 0x31];

let mut decoder = _6502::Decoder::new(&assembly[..]);

println!("{:?}", decoder.decode())

Encoding

use asm::{_6502, Encoder};
let mut assembly = [0u8; 1];

let mut encoder = _6502::Encoder::new(&mut assembly[..]);

encoder.encode(_6502::Instruction::BRK(_6502::Addressing::Implied(())));

License