/// Load the simulator from the given memory buffer.
///
/// Requires an argument specifying the length of the program,
/// for correct compilation output.
Load the simulator from the given memory buffer.
Requires an argument specifying the length of the program,
for correct compilation output.
Load the simulator from the given memory buffer . Requires an argument specifying the length of the program for correct compilation output .
fn from_memory(memory: [u16; 4096], len: usize) -> Self {
        Simulator {
            memory: memory,
            acc: 0,
            ir: 0,
            pc: 0,
            halted: false,
            len: len,
            input: Box::new(BufReader::new(io::stdin())),
            output: Box::new(io::stdout()),
            show_prompt: true,
        }
    }
fn from_memory ( memory : [ u16 ; 4096 ] , len : usize ) -> Self { Simulator { memory : memory , acc : 0 , ir : 0 , pc : 0 , halted : false , len : len , input : Box :: new ( BufReader :: new ( io :: stdin ( ) ) ) , output : Box :: new ( io :: stdout ( ) ) , show_prompt : true , } }
Load the simulator from the given memory buffer.
Load the simulator from the given memory buffer .
memory
[u16; 4096]
len
usize