rs-asm6805

Crates.iors-asm6805
lib.rsrs-asm6805
version1.0.1
created_at2025-07-29 00:15:48.555399+00
updated_at2025-07-29 00:26:44.428645+00
description6805 Datalink Assembler in Rust
homepage
repositoryhttps://github.com/nilp0inter/rs-asm6805
max_upload_size
id1771744
size210,350
Roberto Abdelkader Martínez Pérez (nilp0inter)

documentation

README

Datalink 6805 Online Assembler (Rust Port)

This is a Rust port of the datalink ASM6805 assembler, originally written in TypeScript by John Toebes. The original project can be found at https://github.com/toebes/asm6805.

This port was automatically translated from the original TypeScript source code with the assistance of AI tools and has had minimal human supervision.

Building the code

After pulling down the repository, you can build the project with:

cargo build --release

This will create an optimized executable in the target/release directory.

Running the assembler

To assemble a file, run the following command:

./target/release/asm6805 <input_file>

For more options, run:

./target/release/asm6805 --help

Using as a Library

To use this assembler as a library in your own Rust project, add the following to your Cargo.toml:

[dependencies]
rs-asm6805 = "1.0.1"

Or execute cargo add rs-asm6805 to add it automatically.

Then, you can use the assemble function in your code like this:

use rs_asm6805::assemble;

fn main() {
    let source_code = vec![
        "ORG $110".to_string(),
        "LDA #$42".to_string(),
    ];

    match assemble("my_source.asm".to_string(), source_code) {
        Ok((errors, hex, listing)) => {
            if !errors.is_empty() {
                for error in errors {
                    eprintln!("{}", error);
                }
            }
            println!("Hex output: {}", hex);
            println!("Listing:");
            for line in listing {
                println!("{}", line);
            }
        }
        Err(errors) => {
            for error in errors {
                eprintln!("{}", error);
            }
        }
    }
}

License

This project is licensed under the BSD-3-Clause license. See the LICENSE file for details.

Commit count: 0

cargo fmt