pub struct Assembler { /* private fields */ }
Expand description
The assembler translates programs written in asm language (text) to binary code
Implementations
sourceimpl Assembler
impl Assembler
pub fn new() -> Self
pub fn translate(lines: Vec<&str>) -> Vec<AsmInstruction>
sourcepub fn resolve(&mut self, asms: Vec<AsmInstruction>) -> Vec<AsmInstruction>
pub fn resolve(&mut self, asms: Vec<AsmInstruction>) -> Vec<AsmInstruction>
Resolves symbols in the assembly to physical memory addresses.
pub fn assemble(&mut self, asm: impl AsRef<str>) -> Vec<AsmInstruction>
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Assembler
impl Send for Assembler
impl Sync for Assembler
impl Unpin for Assembler
impl UnwindSafe for Assembler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more