Struct InstructionBuilder

Source
pub struct InstructionBuilder { /* private fields */ }
Expand description

Utility to build instructions.

§Example

use c64_assembler::builder::InstructionBuilder;

let instructions = InstructionBuilder::default()
    .label("main_entry_point")
    .lda_imm(0x00)
    .sta_addr("VIC2_BORDER_COLOR")
    .rts()
    .build();

Implementations§

Source§

impl InstructionBuilder

Source

pub fn adc_imm(&mut self, byte: u8) -> &mut Self

Record a adc instruction with data (byte).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .adc_imm(0xC0)
    .build();
Source

pub fn adc_imm_low(&mut self, address_name: &str) -> &mut Self

Record a adc instruction with lower byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .adc_imm_low("test_data")
    .label("test_data")
    .build();
Source

pub fn adc_imm_high(&mut self, address_name: &str) -> &mut Self

Record a adc instruction with higher byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .adc_imm_high("test_data")
    .label("test_data")
    .build();
Source

pub fn adc_addr(&mut self, address_name: &str) -> &mut Self

Record a adc instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .adc_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn adc_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a adc instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .adc_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn adc_addr_x(&mut self, address_name: &str) -> &mut Self

Record a adc instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .adc_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn adc_addr_y(&mut self, address_name: &str) -> &mut Self

Record a adc instructon that use an absolute address with y-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .adc_addr_y("test_label")
    .label("test_label")
    .build();
Source

pub fn adc_ind_x(&mut self, address_name: &str) -> &mut Self

Record a adc instruction that uses indexed indirect addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .adc_ind_x("test_label")
    .label("test_label")
    .build();
Source

pub fn adc_ind_y(&mut self, address_name: &str) -> &mut Self

Record a adc instruction that uses indirect indexed addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .adc_ind_y("test_label")
    .label("test_label")
    .build();
Source

pub fn and_imm(&mut self, byte: u8) -> &mut Self

Record a and instruction with data (byte).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .and_imm(0xC0)
    .build();
Source

pub fn and_imm_low(&mut self, address_name: &str) -> &mut Self

Record a and instruction with lower byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .and_imm_low("test_data")
    .label("test_data")
    .build();
Source

pub fn and_imm_high(&mut self, address_name: &str) -> &mut Self

Record a and instruction with higher byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .and_imm_high("test_data")
    .label("test_data")
    .build();
Source

pub fn and_addr(&mut self, address_name: &str) -> &mut Self

Record a and instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .and_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn and_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a and instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .and_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn and_addr_x(&mut self, address_name: &str) -> &mut Self

Record a and instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .and_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn and_addr_y(&mut self, address_name: &str) -> &mut Self

Record a and instructon that use an absolute address with y-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .and_addr_y("test_label")
    .label("test_label")
    .build();
Source

pub fn and_ind_x(&mut self, address_name: &str) -> &mut Self

Record a and instruction that uses indexed indirect addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .and_ind_x("test_label")
    .label("test_label")
    .build();
Source

pub fn and_ind_y(&mut self, address_name: &str) -> &mut Self

Record a and instruction that uses indirect indexed addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .and_ind_y("test_label")
    .label("test_label")
    .build();
Source

pub fn asl_acc(&mut self) -> &mut Self

Record a asl instruction that uses accumulator as address mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .asl_acc()
    .build();
Source

pub fn asl_addr(&mut self, address_name: &str) -> &mut Self

Record a asl instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .asl_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn asl_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a asl instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .asl_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn asl_addr_x(&mut self, address_name: &str) -> &mut Self

Record a asl instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .asl_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn bcc_addr(&mut self, address_name: &str) -> &mut Self

Record a bcc instruction that use relativeeeeeeeee address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bcc_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn bcc_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a bcc instruction that use a relative address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bcc_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn bcs_addr(&mut self, address_name: &str) -> &mut Self

Record a bcs instruction that use relativeeeeeeeee address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bcs_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn bcs_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a bcs instruction that use a relative address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bcs_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn beq_addr(&mut self, address_name: &str) -> &mut Self

Record a beq instruction that use relativeeeeeeeee address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .beq_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn beq_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a beq instruction that use a relative address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .beq_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn bit_addr(&mut self, address_name: &str) -> &mut Self

Record a bit instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bit_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn bit_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a bit instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bit_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn bmi_addr(&mut self, address_name: &str) -> &mut Self

Record a bmi instruction that use relativeeeeeeeee address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bmi_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn bmi_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a bmi instruction that use a relative address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bmi_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn bne_addr(&mut self, address_name: &str) -> &mut Self

Record a bne instruction that use relativeeeeeeeee address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bne_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn bne_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a bne instruction that use a relative address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bne_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn bpl_addr(&mut self, address_name: &str) -> &mut Self

Record a bpl instruction that use relativeeeeeeeee address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bpl_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn bpl_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a bpl instruction that use a relative address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bpl_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn brk(&mut self) -> &mut Self

Record a new brk instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .brk()
    .build();
Source

pub fn bvc_addr(&mut self, address_name: &str) -> &mut Self

Record a bvc instruction that use relativeeeeeeeee address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bvc_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn bvc_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a bvc instruction that use a relative address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bvc_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn bvs_addr(&mut self, address_name: &str) -> &mut Self

Record a bvs instruction that use relativeeeeeeeee address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bvs_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn bvs_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a bvs instruction that use a relative address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .bvs_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn clc(&mut self) -> &mut Self

Record a new clc instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .clc()
    .build();
Source

pub fn cld(&mut self) -> &mut Self

Record a new cld instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cld()
    .build();
Source

pub fn cli(&mut self) -> &mut Self

Record a new cli instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cli()
    .build();
Source

pub fn clv(&mut self) -> &mut Self

Record a new clv instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .clv()
    .build();
Source

pub fn cmp_imm(&mut self, byte: u8) -> &mut Self

Record a cmp instruction with data (byte).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cmp_imm(0xC0)
    .build();
Source

pub fn cmp_imm_low(&mut self, address_name: &str) -> &mut Self

Record a cmp instruction with lower byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cmp_imm_low("test_data")
    .label("test_data")
    .build();
Source

pub fn cmp_imm_high(&mut self, address_name: &str) -> &mut Self

Record a cmp instruction with higher byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cmp_imm_high("test_data")
    .label("test_data")
    .build();
Source

pub fn cmp_addr(&mut self, address_name: &str) -> &mut Self

Record a cmp instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cmp_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn cmp_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a cmp instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cmp_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn cmp_addr_x(&mut self, address_name: &str) -> &mut Self

Record a cmp instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .cmp_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn cmp_addr_y(&mut self, address_name: &str) -> &mut Self

Record a cmp instructon that use an absolute address with y-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .cmp_addr_y("test_label")
    .label("test_label")
    .build();
Source

pub fn cmp_ind_x(&mut self, address_name: &str) -> &mut Self

Record a cmp instruction that uses indexed indirect addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .cmp_ind_x("test_label")
    .label("test_label")
    .build();
Source

pub fn cmp_ind_y(&mut self, address_name: &str) -> &mut Self

Record a cmp instruction that uses indirect indexed addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .cmp_ind_y("test_label")
    .label("test_label")
    .build();
Source

pub fn cpx_imm(&mut self, byte: u8) -> &mut Self

Record a cpx instruction with data (byte).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cpx_imm(0xC0)
    .build();
Source

pub fn cpx_imm_low(&mut self, address_name: &str) -> &mut Self

Record a cpx instruction with lower byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cpx_imm_low("test_data")
    .label("test_data")
    .build();
Source

pub fn cpx_imm_high(&mut self, address_name: &str) -> &mut Self

Record a cpx instruction with higher byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cpx_imm_high("test_data")
    .label("test_data")
    .build();
Source

pub fn cpx_addr(&mut self, address_name: &str) -> &mut Self

Record a cpx instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cpx_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn cpx_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a cpx instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cpx_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn cpy_imm(&mut self, byte: u8) -> &mut Self

Record a cpy instruction with data (byte).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cpy_imm(0xC0)
    .build();
Source

pub fn cpy_imm_low(&mut self, address_name: &str) -> &mut Self

Record a cpy instruction with lower byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cpy_imm_low("test_data")
    .label("test_data")
    .build();
Source

pub fn cpy_imm_high(&mut self, address_name: &str) -> &mut Self

Record a cpy instruction with higher byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cpy_imm_high("test_data")
    .label("test_data")
    .build();
Source

pub fn cpy_addr(&mut self, address_name: &str) -> &mut Self

Record a cpy instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cpy_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn cpy_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a cpy instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .cpy_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn dec_addr(&mut self, address_name: &str) -> &mut Self

Record a dec instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .dec_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn dec_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a dec instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .dec_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn dec_addr_x(&mut self, address_name: &str) -> &mut Self

Record a dec instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .dec_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn dex(&mut self) -> &mut Self

Record a new dex instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .dex()
    .build();
Source

pub fn dey(&mut self) -> &mut Self

Record a new dey instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .dey()
    .build();
Source

pub fn eor_imm(&mut self, byte: u8) -> &mut Self

Record a eor instruction with data (byte).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .eor_imm(0xC0)
    .build();
Source

pub fn eor_imm_low(&mut self, address_name: &str) -> &mut Self

Record a eor instruction with lower byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .eor_imm_low("test_data")
    .label("test_data")
    .build();
Source

pub fn eor_imm_high(&mut self, address_name: &str) -> &mut Self

Record a eor instruction with higher byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .eor_imm_high("test_data")
    .label("test_data")
    .build();
Source

pub fn eor_addr(&mut self, address_name: &str) -> &mut Self

Record a eor instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .eor_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn eor_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a eor instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .eor_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn eor_addr_x(&mut self, address_name: &str) -> &mut Self

Record a eor instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .eor_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn eor_addr_y(&mut self, address_name: &str) -> &mut Self

Record a eor instructon that use an absolute address with y-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .eor_addr_y("test_label")
    .label("test_label")
    .build();
Source

pub fn eor_ind_x(&mut self, address_name: &str) -> &mut Self

Record a eor instruction that uses indexed indirect addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .eor_ind_x("test_label")
    .label("test_label")
    .build();
Source

pub fn eor_ind_y(&mut self, address_name: &str) -> &mut Self

Record a eor instruction that uses indirect indexed addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .eor_ind_y("test_label")
    .label("test_label")
    .build();
Source

pub fn inc_addr(&mut self, address_name: &str) -> &mut Self

Record a inc instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .inc_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn inc_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a inc instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .inc_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn inc_addr_x(&mut self, address_name: &str) -> &mut Self

Record a inc instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .inc_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn inx(&mut self) -> &mut Self

Record a new inx instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .inx()
    .build();
Source

pub fn iny(&mut self) -> &mut Self

Record a new iny instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .iny()
    .build();
Source

pub fn jmp_addr(&mut self, address_name: &str) -> &mut Self

Record a jmp instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .jmp_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn jmp_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a jmp instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .jmp_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn jmp_ind(&mut self, address_name: &str) -> &mut Self

Record a jmp instruction that uses indirect addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .jmp_ind("test_label")
    .label("test_label")
    .build();
Source

pub fn jsr_addr(&mut self, address_name: &str) -> &mut Self

Record a jsr instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .jsr_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn jsr_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a jsr instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .jsr_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn lda_imm(&mut self, byte: u8) -> &mut Self

Record a lda instruction with data (byte).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .lda_imm(0xC0)
    .build();
Source

pub fn lda_imm_low(&mut self, address_name: &str) -> &mut Self

Record a lda instruction with lower byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .lda_imm_low("test_data")
    .label("test_data")
    .build();
Source

pub fn lda_imm_high(&mut self, address_name: &str) -> &mut Self

Record a lda instruction with higher byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .lda_imm_high("test_data")
    .label("test_data")
    .build();
Source

pub fn lda_addr(&mut self, address_name: &str) -> &mut Self

Record a lda instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .lda_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn lda_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a lda instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .lda_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn lda_addr_x(&mut self, address_name: &str) -> &mut Self

Record a lda instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .lda_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn lda_addr_y(&mut self, address_name: &str) -> &mut Self

Record a lda instructon that use an absolute address with y-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .lda_addr_y("test_label")
    .label("test_label")
    .build();
Source

pub fn lda_ind_x(&mut self, address_name: &str) -> &mut Self

Record a lda instruction that uses indexed indirect addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .lda_ind_x("test_label")
    .label("test_label")
    .build();
Source

pub fn lda_ind_y(&mut self, address_name: &str) -> &mut Self

Record a lda instruction that uses indirect indexed addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .lda_ind_y("test_label")
    .label("test_label")
    .build();
Source

pub fn ldx_imm(&mut self, byte: u8) -> &mut Self

Record a ldx instruction with data (byte).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0xC0)
    .build();
Source

pub fn ldx_imm_low(&mut self, address_name: &str) -> &mut Self

Record a ldx instruction with lower byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm_low("test_data")
    .label("test_data")
    .build();
Source

pub fn ldx_imm_high(&mut self, address_name: &str) -> &mut Self

Record a ldx instruction with higher byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm_high("test_data")
    .label("test_data")
    .build();
Source

pub fn ldx_addr(&mut self, address_name: &str) -> &mut Self

Record a ldx instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn ldx_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a ldx instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn ldx_addr_y(&mut self, address_name: &str) -> &mut Self

Record a ldx instructon that use an absolute address with y-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .ldx_addr_y("test_label")
    .label("test_label")
    .build();
Source

pub fn ldy_imm(&mut self, byte: u8) -> &mut Self

Record a ldy instruction with data (byte).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0xC0)
    .build();
Source

pub fn ldy_imm_low(&mut self, address_name: &str) -> &mut Self

Record a ldy instruction with lower byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm_low("test_data")
    .label("test_data")
    .build();
Source

pub fn ldy_imm_high(&mut self, address_name: &str) -> &mut Self

Record a ldy instruction with higher byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm_high("test_data")
    .label("test_data")
    .build();
Source

pub fn ldy_addr(&mut self, address_name: &str) -> &mut Self

Record a ldy instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn ldy_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a ldy instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn ldy_addr_x(&mut self, address_name: &str) -> &mut Self

Record a ldy instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .ldy_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn lsr_acc(&mut self) -> &mut Self

Record a lsr instruction that uses accumulator as address mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .lsr_acc()
    .build();
Source

pub fn lsr_addr(&mut self, address_name: &str) -> &mut Self

Record a lsr instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .lsr_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn lsr_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a lsr instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .lsr_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn lsr_addr_x(&mut self, address_name: &str) -> &mut Self

Record a lsr instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .lsr_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn nop(&mut self) -> &mut Self

Record a new nop instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .nop()
    .build();
Source

pub fn ora_imm(&mut self, byte: u8) -> &mut Self

Record a ora instruction with data (byte).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ora_imm(0xC0)
    .build();
Source

pub fn ora_imm_low(&mut self, address_name: &str) -> &mut Self

Record a ora instruction with lower byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ora_imm_low("test_data")
    .label("test_data")
    .build();
Source

pub fn ora_imm_high(&mut self, address_name: &str) -> &mut Self

Record a ora instruction with higher byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ora_imm_high("test_data")
    .label("test_data")
    .build();
Source

pub fn ora_addr(&mut self, address_name: &str) -> &mut Self

Record a ora instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ora_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn ora_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a ora instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ora_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn ora_addr_x(&mut self, address_name: &str) -> &mut Self

Record a ora instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .ora_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn ora_addr_y(&mut self, address_name: &str) -> &mut Self

Record a ora instructon that use an absolute address with y-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .ora_addr_y("test_label")
    .label("test_label")
    .build();
Source

pub fn ora_ind_x(&mut self, address_name: &str) -> &mut Self

Record a ora instruction that uses indexed indirect addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .ora_ind_x("test_label")
    .label("test_label")
    .build();
Source

pub fn ora_ind_y(&mut self, address_name: &str) -> &mut Self

Record a ora instruction that uses indirect indexed addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .ora_ind_y("test_label")
    .label("test_label")
    .build();
Source

pub fn pha(&mut self) -> &mut Self

Record a new pha instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .pha()
    .build();
Source

pub fn php(&mut self) -> &mut Self

Record a new php instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .php()
    .build();
Source

pub fn pla(&mut self) -> &mut Self

Record a new pla instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .pla()
    .build();
Source

pub fn plp(&mut self) -> &mut Self

Record a new plp instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .plp()
    .build();
Source

pub fn rol_acc(&mut self) -> &mut Self

Record a rol instruction that uses accumulator as address mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .rol_acc()
    .build();
Source

pub fn rol_addr(&mut self, address_name: &str) -> &mut Self

Record a rol instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .rol_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn rol_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a rol instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .rol_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn rol_addr_x(&mut self, address_name: &str) -> &mut Self

Record a rol instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .rol_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn ror_acc(&mut self) -> &mut Self

Record a ror instruction that uses accumulator as address mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ror_acc()
    .build();
Source

pub fn ror_addr(&mut self, address_name: &str) -> &mut Self

Record a ror instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ror_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn ror_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a ror instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ror_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn ror_addr_x(&mut self, address_name: &str) -> &mut Self

Record a ror instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .ror_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn rti(&mut self) -> &mut Self

Record a new rti instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .rti()
    .build();
Source

pub fn rts(&mut self) -> &mut Self

Record a new rts instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .rts()
    .build();
Source

pub fn sbc_imm(&mut self, byte: u8) -> &mut Self

Record a sbc instruction with data (byte).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sbc_imm(0xC0)
    .build();
Source

pub fn sbc_imm_low(&mut self, address_name: &str) -> &mut Self

Record a sbc instruction with lower byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sbc_imm_low("test_data")
    .label("test_data")
    .build();
Source

pub fn sbc_imm_high(&mut self, address_name: &str) -> &mut Self

Record a sbc instruction with higher byte of an address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sbc_imm_high("test_data")
    .label("test_data")
    .build();
Source

pub fn sbc_addr(&mut self, address_name: &str) -> &mut Self

Record a sbc instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sbc_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn sbc_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a sbc instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sbc_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn sbc_addr_x(&mut self, address_name: &str) -> &mut Self

Record a sbc instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .sbc_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn sbc_addr_y(&mut self, address_name: &str) -> &mut Self

Record a sbc instructon that use an absolute address with y-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .sbc_addr_y("test_label")
    .label("test_label")
    .build();
Source

pub fn sbc_ind_x(&mut self, address_name: &str) -> &mut Self

Record a sbc instruction that uses indexed indirect addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .sbc_ind_x("test_label")
    .label("test_label")
    .build();
Source

pub fn sbc_ind_y(&mut self, address_name: &str) -> &mut Self

Record a sbc instruction that uses indirect indexed addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .sbc_ind_y("test_label")
    .label("test_label")
    .build();
Source

pub fn sec(&mut self) -> &mut Self

Record a new sec instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sec()
    .build();
Source

pub fn sed(&mut self) -> &mut Self

Record a new sed instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sed()
    .build();
Source

pub fn sei(&mut self) -> &mut Self

Record a new sei instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sei()
    .build();
Source

pub fn sta_addr(&mut self, address_name: &str) -> &mut Self

Record a sta instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sta_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn sta_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a sta instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sta_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn sta_addr_x(&mut self, address_name: &str) -> &mut Self

Record a sta instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .sta_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn sta_addr_y(&mut self, address_name: &str) -> &mut Self

Record a sta instructon that use an absolute address with y-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .sta_addr_y("test_label")
    .label("test_label")
    .build();
Source

pub fn sta_ind_x(&mut self, address_name: &str) -> &mut Self

Record a sta instruction that uses indexed indirect addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .sta_ind_x("test_label")
    .label("test_label")
    .build();
Source

pub fn sta_ind_y(&mut self, address_name: &str) -> &mut Self

Record a sta instruction that uses indirect indexed addressing mode.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .sta_ind_y("test_label")
    .label("test_label")
    .build();
Source

pub fn stx_addr(&mut self, address_name: &str) -> &mut Self

Record a stx instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .stx_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn stx_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a stx instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .stx_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn stx_addr_y(&mut self, address_name: &str) -> &mut Self

Record a stx instructon that use an absolute address with y-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldy_imm(0x08)
    .stx_addr_y("test_label")
    .label("test_label")
    .build();
Source

pub fn sty_addr(&mut self, address_name: &str) -> &mut Self

Record a sty instruction that use an absolute address.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sty_addr("test_label")
    .label("test_label")
    .build();
Source

pub fn sty_addr_offs( &mut self, address_name: &str, offset: Address, ) -> &mut Self

Record a sty instruction that use an absolute address with an offset. Offset is in bytes.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .sty_addr_offs("test_label", 8)
    .label("test_label")
    .build();
Source

pub fn sty_addr_x(&mut self, address_name: &str) -> &mut Self

Record a sty instructon that use an absolute address with x-register as indexer.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .ldx_imm(0x08)
    .sty_addr_x("test_label")
    .label("test_label")
    .build();
Source

pub fn tax(&mut self) -> &mut Self

Record a new tax instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .tax()
    .build();
Source

pub fn tay(&mut self) -> &mut Self

Record a new tay instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .tay()
    .build();
Source

pub fn tsx(&mut self) -> &mut Self

Record a new tsx instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .tsx()
    .build();
Source

pub fn txa(&mut self) -> &mut Self

Record a new txa instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .txa()
    .build();
Source

pub fn txs(&mut self) -> &mut Self

Record a new txs instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .txs()
    .build();
Source

pub fn tya(&mut self) -> &mut Self

Record a new tya instruction (addressing mode is implied).

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .tya()
    .build();
Source

pub fn raw(&mut self, data: &[u8]) -> &mut Self

Record some raw data (bytes) in the instruction stream.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .label("my_data")
    .raw(&[0x42, 0xDE, 0xAD])
    .build();
Source

pub fn label(&mut self, label: &str) -> &mut Self

Record a label into the instruction stream.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .label("my_data")
    .raw(&[0x42, 0xDE, 0xAD])
    .build();
Source

pub fn comment(&mut self, comment: &str) -> &mut Self

Add a comment to the last instruction.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .label("frame_number").comment("Current frame number")
    .raw(&[0x00, 0x00]).comment("Frames are counted from 0")
    .build();
Source

pub fn add_basic_header(&mut self) -> &mut Self

Add a basic program, when run will start the instructions recorded right after.

10 SYS 2062

NOTE: Application entry point should be 0x0800 and add_basic_header must be called as first instruction in the first module.

§Example
use c64_assembler::builder::InstructionBuilder;
let instructions = InstructionBuilder::default()
    .add_basic_header()
    .rts()
    .build();
Source

pub fn build(&self) -> Instructions

Create crate::Instructions from this instance.

Trait Implementations§

Source§

impl Clone for InstructionBuilder

Source§

fn clone(&self) -> InstructionBuilder

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for InstructionBuilder

Source§

fn default() -> InstructionBuilder

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.