pub struct Disassembler { /* private fields */ }Implementations§
Source§impl Disassembler
impl Disassembler
pub fn new() -> Self
pub fn set_config(&mut self, config: Settings)
pub fn set_program_counter(&mut self, pc: Option<usize>)
pub fn set_mx(&mut self, m8bit: bool, x8bit: bool)
Sourcepub fn disassemble(
&mut self,
img: &[u8],
range: DasmRange,
proc: ProcessorType,
labeling: &str,
) -> Result<String, Box<dyn Error>>
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.
Sourcepub fn disassemble_as_data(&mut self, buf: &[u8]) -> String
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().
Sourcepub fn disassemble_as_code(&mut self, buf: &[u8]) -> String
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.