pub fn dump(&mut self, amt: usize) -> Result<()> {
        for (i, chunk) in (&self.memory[..amt]).chunks(8).enumerate() {
            write!(&mut self.output, "{:03x}:", 8 * i).chain_err(|| ErrorKind::Io("could not write to output".into()))?;
            for w in chunk {
                write!(&mut self.output, " {:04x}", w).chain_err(|| ErrorKind::Io("could not write to output".into()))?;
            }
            writeln!(&mut self.output, "").chain_err(|| ErrorKind::Io("could not write to output".into()))?;
        }

        Ok(())
    }
/// Dumps memory in a nice format to the output.
Dumps memory in a nice format to the output.
Dumps memory in a nice format to the output .
pub fn dump(&mut self, amt: usize) -> Result<()> {
        for (i, chunk) in (&self.memory[..amt]).chunks(8).enumerate() {
            write!(&mut self.output, "{:03x}:", 8 * i).chain_err(|| ErrorKind::Io("could not write to output".into()))?;
            for w in chunk {
                write!(&mut self.output, " {:04x}", w).chain_err(|| ErrorKind::Io("could not write to output".into()))?;
            }
            writeln!(&mut self.output, "").chain_err(|| ErrorKind::Io("could not write to output".into()))?;
        }
        Ok(())
    }
pub fn dump ( & mut self , amt : usize ) -> Result < ( ) > { for ( i , chunk ) in ( & self . memory [ .. amt ] ) . chunks ( 8 ) . enumerate ( ) { write ! ( mut self output " " 8 i ) . chain_err ( | | ErrorKind :: Io ( " " . into ( ) ) ) ? ; for w in chunk { write ! ( mut self output " " w ) . chain_err ( | | ErrorKind :: Io ( " " . into ( ) ) ) ? ; } writeln ! ( mut self output " " ) . chain_err ( | | ErrorKind :: Io ( " " . into ( ) ) ) ? ; } Ok ( ( ) ) }
Dumps memory in a nice format to the output.
Dumps memory in a nice format to the output .
&mut self
amt
usize
&mut self
amt
usize