Crates.io | asm |
lib.rs | asm |
version | 0.3.0 |
source | src |
created_at | 2022-02-07 15:20:49.267208 |
updated_at | 2022-06-11 17:42:31.939207 |
description | A Rust library for decoding and encoding assembly of various architectures |
homepage | |
repository | https://github.com/ATiltedTree/asm |
max_upload_size | |
id | 528472 |
size | 52,395 |
A Rust library for decoding and encoding assembly of various architectures.
Supported architectures currently include:
6502
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"]
use asm::{_6502, Decoder};
let assembly = [0x65, 0x83, 0x31];
let mut decoder = _6502::Decoder::new(&assembly[..]);
println!("{:?}", decoder.decode())
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(())));