Struct lc3_ensemble::sim::SimFlags
source · pub struct SimFlags {
pub strict: bool,
pub use_real_halt: bool,
pub word_create_strat: WordCreateStrategy,
}Expand description
Configuration flags for Simulator.
These can be modified after the Simulator is created with Simulator::new
and their effects should still apply.
Read the field descriptions for more details.
Fields§
§strict: boolWhether strict mode is enabled.
Strict mode adds additional integrity checks to the simulator, such as verifying initialization state is normal for provided data.
use_real_halt: boolWhether to use the real HALT trap.
There are two implementations of HALT within Simulator:
- virtual HALT: On execution of
HALTorTRAP x25, the simulator is automatically halted before executing any true TRAP routine. - real HALT: On execution of
HALTorTRAP x25, the TRAP routine for HALT implemented in the OS is run and executed as usual.
Real HALT is useful for maintaining integrity to the LC-3 ISA, whereas virtual HALT preserves the state of the machine prior to calling the OS’s HALT routine.
word_create_strat: WordCreateStrategyThe creation strategy for uninitialized Words.
This is used to initialize the mem and reg_file fields.
Trait Implementations§
source§impl PartialEq for SimFlags
impl PartialEq for SimFlags
impl Copy for SimFlags
impl Eq for SimFlags
impl StructuralPartialEq for SimFlags
Auto Trait Implementations§
impl Freeze for SimFlags
impl RefUnwindSafe for SimFlags
impl Send for SimFlags
impl Sync for SimFlags
impl Unpin for SimFlags
impl UnwindSafe for SimFlags
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