pub struct Instruction {
pub operation: Operation,
pub address_mode: AddressMode,
pub comments: Vec<String>,
}
Expand description
Assembly instruction
An instruction is the combination of the operation and the address mode that the operation should be using.
Fields§
§operation: Operation
Operation of the instruction.
address_mode: AddressMode
Address mode of the instruction.
comments: Vec<String>
Comments for when generating source code.
Implementations§
Source§impl Instruction
impl Instruction
Sourcepub fn byte_size(&self, application: &Application) -> AssemblerResult<Address>
pub fn byte_size(&self, application: &Application) -> AssemblerResult<Address>
Total number of bytes the instruction occupies on a 6502.
Application parameter is used to identify if an instruction should use its zeropage variant.
Trait Implementations§
Source§impl Clone for Instruction
impl Clone for Instruction
Source§fn clone(&self) -> Instruction
fn clone(&self) -> Instruction
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Instruction
impl Debug for Instruction
Source§impl Default for Instruction
impl Default for Instruction
Source§fn default() -> Instruction
fn default() -> Instruction
Returns the “default value” for a type. Read more
Source§impl PartialEq for Instruction
impl PartialEq for Instruction
impl StructuralPartialEq for Instruction
Auto Trait Implementations§
impl Freeze for Instruction
impl RefUnwindSafe for Instruction
impl Send for Instruction
impl Sync for Instruction
impl Unpin for Instruction
impl UnwindSafe for Instruction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more