Struct lc3_ensemble::asm::ObjectFile
source · pub struct ObjectFile { /* private fields */ }Expand description
An object file.
This is the final product after assembly source code is fully assembled. This can be loaded in the simulator to run the assembled code.
Implementations§
source§impl ObjectFile
impl ObjectFile
sourcepub fn write_bytes(&self) -> Vec<u8>
pub fn write_bytes(&self) -> Vec<u8>
Writes an object file into a byte vector.
sourcepub fn read_bytes(vec: &[u8]) -> Option<ObjectFile>
pub fn read_bytes(vec: &[u8]) -> Option<ObjectFile>
Reads a byte slice back into object file information, returning None if a parsing error occurs.
source§impl ObjectFile
impl ObjectFile
sourcepub fn addr_iter(&self) -> impl Iterator<Item = (u16, Option<u16>)> + '_
pub fn addr_iter(&self) -> impl Iterator<Item = (u16, Option<u16>)> + '_
Gets an iterator over all of the memory locations defined in the object file.
sourcepub fn symbol_table(&self) -> Option<&SymbolTable>
pub fn symbol_table(&self) -> Option<&SymbolTable>
Gets the symbol table if it is present in the object file.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ObjectFile
impl RefUnwindSafe for ObjectFile
impl Send for ObjectFile
impl Sync for ObjectFile
impl Unpin for ObjectFile
impl UnwindSafe for ObjectFile
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