Struct InstructionDef

Source
pub struct InstructionDef {
Show 14 fields pub instruction: &'static str, pub implied: OpCode, pub immediate: OpCode, pub accumulator: OpCode, pub absolute: OpCode, pub absolute_x: OpCode, pub absolute_y: OpCode, pub zeropage: OpCode, pub zeropage_x: OpCode, pub zeropage_y: OpCode, pub relative: OpCode, pub indirect: OpCode, pub indexed_indirect: OpCode, pub indirect_indexed: OpCode,
}
Expand description

Instruction definition.

Contains the instruction (as str) and the op-codes per addressing mode.

Fields§

§instruction: &'static str

Instruction as lowercase str (lda, sta, …)

§implied: OpCode

OpCode for implied addressing mode.

Contains crate::opcodes::NO_IMPLIED when no op-code exist.

§immediate: OpCode

OpCode for immediate addressing mode.

Contains crate::opcodes::NO_IMMEDIATE when no op-code exists.

§accumulator: OpCode

OpCode for accumualtor addressing mode.

Contains crate::opcodes::NO_ACCUMULATOR when no op-code exists.

§absolute: OpCode

OpCode for absolute addressing mode.

Contains crate::opcodes::NO_ABSOLUTE when no op-code exists.

§absolute_x: OpCode

OpCode for absolute-x addressing mode.

Contains crate::opcodes::NO_ABSOLUTE_X when no op-code exists.

§absolute_y: OpCode

OpCode for absolute-y addressing mode.

Contains crate::opcodes::NO_ABSOLUTE_Y when no op-code exists.

§zeropage: OpCode

OpCode for zeropage addressing mode.

Contains crate::opcodes::NO_ZEROPAGE when no op-code exists.

§zeropage_x: OpCode

OpCode for zeropage-x addressing mode.

Contains crate::opcodes::NO_ZEROPAGE_X when no op-code exists.

§zeropage_y: OpCode

OpCode for zeropage-y addressing mode.

Contains crate::opcodes::NO_ZEROPAGE_Y when no op-code exists.

§relative: OpCode

OpCode for relative addressing mode.

Contains crate::opcodes::NO_RELATIVE when no op-code exists.

§indirect: OpCode

OpCode for indirect addressing mode.

Contains crate::opcodes::NO_INDIRECT when no op-code exists.

§indexed_indirect: OpCode

OpCode for indexed indirect addressing mode.

Contains crate::opcodes::NO_INDEXED_INDIRECT when no op-code exists.

§indirect_indexed: OpCode

OpCode for indirect indexed addressing mode.

Contains crate::opcodes::NO_INDIRECT_INDEXED when no op-code exists.

Trait Implementations§

Source§

impl Debug for InstructionDef

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. 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> 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, 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.