Struct lc3_ensemble::sim::SimFlags
source · pub struct SimFlags {
pub strict: bool,
pub use_real_halt: bool,
pub word_create_strat: WordCreateStrategy,
pub debug_frames: bool,
}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.
debug_frames: boolWhether to store debugging information about call frames.
This flag only goes into effect after a Simulator::new or Simulator::reset call.
Trait Implementations§
source§impl Default for SimFlags
impl Default for SimFlags
source§fn default() -> Self
fn default() -> Self
The default flags.
They are defined as follows:
strict: falseuse_real_halt: falseword_create_strat: defaultWordCreateStrategydebug_frames: false