Disassembler

Struct Disassembler 

Source
pub struct Disassembler { /* private fields */ }

Implementations§

Source§

impl Disassembler

Source

pub fn new() -> Self

Source

pub fn set_config(&mut self, config: Settings)

Source

pub fn use_shared_symbols(&mut self, sym: Arc<Symbols>)

Source

pub fn set_program_counter(&mut self, pc: Option<usize>)

Source

pub fn set_mx(&mut self, m8bit: bool, x8bit: bool)

Source

pub fn disassemble( &mut self, img: &[u8], range: DasmRange, proc: ProcessorType, labeling: &str, ) -> Result<String, Box<dyn Error>>

Disassemble a range of bytes within img, which can be thought of as a RAM image. If the data source is a file, the data should be copied to img at the appropriate offset. In particular, the starting address will be taken as range[0]. Data sections are triggered by any failure to match an instruction.

Source

pub fn disassemble_as_data(&mut self, buf: &[u8]) -> String

Disassemble as pure data. Various Merlin pseudo-operations are used to express the result. Purpose is to re-disassemble specified lines during an iterative disassembly process. This will label “some lines” if self.pc.is_some().

Source

pub fn disassemble_as_code(&mut self, buf: &[u8]) -> String

Disassemble with the most aggressive possible interpretation as code. Purpose is to re-disassemble specified lines during an iterative disassembly process. If self.pc.is_none() then ORG 0x8000 is assumed, otherwise self.pc is used and “some lines” are labeled.

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.