extern crate r68k_tools;

use r68k_tools::assembler::Assembler;
use std::io;
use std::io::BufReader;
use r68k_tools::srecords::write_s68;

fn main() {
    let r68k = Assembler::new();

    let asm = r#"ADD.B   #$3,D0
ADD.B   D0,D1"#;

    println!("{}", asm);
    let mut reader = BufReader::new(asm.as_bytes());
    let (bytes, mem) = r68k.assemble(&mut reader).unwrap();
    println!("wrote {} bytes", bytes);
    let mut stdout = io::stdout();
    write_s68(&mut stdout, vec![&mem], 0).unwrap();
}

Add trivial assembler example w/SRecord output
Add trivial assembler example w/SRecord output
