pub fn from_instructions(input: &[u16]) -> Result<Self> {
        if input.len() > 4096 {
            return Err(ErrorKind::ProgramTooLong.into());
        }

        let mut data = [0u16; 4096];
        data[..input.len()].copy_from_slice(input);

        Ok(Simulator::from_memory(data, input.len()))
    }
/// Load the simulator from the given instructions.
///
/// # Examples
///
/// ```
/// use ibcm::Simulator;
///
/// let mem = &[0x1000, 0x1800, 0x0000];
/// let sim = Simulator::from_instructions(mem).unwrap();
/// 
/// assert_eq!(mem, &sim.memory()[..3]);
/// ```
Load the simulator from the given instructions.
Load the simulator from the given instructions .
pub fn from_instructions(input: &[u16]) -> Result<Self> {
        if input.len() > 4096 {
            return Err(ErrorKind::ProgramTooLong.into());
        }
        let mut data = [0u16; 4096];
        data[..input.len()].copy_from_slice(input);
        Ok(Simulator::from_memory(data, input.len()))
    }
pub fn from_instructions ( input : & [ u16 ] ) -> Result < Self > { if input . len ( ) > 4096 { return Err ( ErrorKind :: ProgramTooLong . into ( ) ) ; } let mut data = [ 0u16 ; 4096 ] ; data [ .. input . len ( ) ] . copy_from_slice ( input ) ; Ok ( Simulator :: from_memory ( data , input . len ( ) ) ) }
Load the simulator from the given instructions.
Load the simulator from the given instructions .
input
&[u16]
input
&[u16]
examples
```
use ibcm::Simulator.




` ` ` use ibcm :: Simulator .