fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
        try!(write!(f, "CHIP8 CPU @ 0x{:0>4X}\r\n", self.pc));
        try!(write!(f, "V0: {:X}, V1: {:X}, V2: {:X}, V3: {:X}\r\n", self.v[0], self.v[1], self.v[2], self.v[3]));
        try!(write!(f, "V4: {:X}, V5: {:X}, V6: {:X}, V7: {:X}\r\n", self.v[4], self.v[5], self.v[6], self.v[7]));
        try!(write!(f, "V8: {:X}, V9: {:X}, VA: {:X}, VB: {:X}\r\n", self.v[8], self.v[9], self.v[0xA], self.v[0xB]));
        try!(write!(f, "VC: {:X}, VD: {:X}, VE: {:X}, VF: {:X}\r\n", self.v[0xC], self.v[0xD], self.v[0xE], self.v[0xF]));

        try!(write!(f, "\r\nSTACK:\r\n"));
        for (i, item) in self.stack.iter().enumerate()
        {
        	if *item == 0 { break; }
        	try!(write!(f, ">> {}: 0x{:0>4X}\r\n", i, item));
        }

        try!(write!(f, "\r\nI: {:X}", self.i));
        try!(write!(f, "\r\nST: {:X}", self.st));
        write!(f, "\r\nDT: {:X}", self.dt)
    }
/// Implement fancy display formatting for the CPU and it's state
Implement fancy display formatting for the CPU and it's state
Implement fancy display formatting for the CPU and it ' s state
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
        try!(write!(f, "CHIP8 CPU @ 0x{:0>4X}\r\n", self.pc));
        try!(write!(f, "V0: {:X}, V1: {:X}, V2: {:X}, V3: {:X}\r\n", self.v[0], self.v[1], self.v[2], self.v[3]));
        try!(write!(f, "V4: {:X}, V5: {:X}, V6: {:X}, V7: {:X}\r\n", self.v[4], self.v[5], self.v[6], self.v[7]));
        try!(write!(f, "V8: {:X}, V9: {:X}, VA: {:X}, VB: {:X}\r\n", self.v[8], self.v[9], self.v[0xA], self.v[0xB]));
        try!(write!(f, "VC: {:X}, VD: {:X}, VE: {:X}, VF: {:X}\r\n", self.v[0xC], self.v[0xD], self.v[0xE], self.v[0xF]));
        try!(write!(f, "\r\nSTACK:\r\n"));
        for (i, item) in self.stack.iter().enumerate()
        {
        	if *item == 0 { break; }
        	try!(write!(f, ">> {}: 0x{:0>4X}\r\n", i, item));
        }
        try!(write!(f, "\r\nI: {:X}", self.i));
        try!(write!(f, "\r\nST: {:X}", self.st));
        write!(f, "\r\nDT: {:X}", self.dt)
    }
fn fmt ( & self , f : & mut fmt :: Formatter ) -> Result < ( ) , fmt :: Error > { try ! ( write ( f " \r \n " self pc ) ) ; try ! ( write ( f " \r \n " self v [ 0 ] self v [ 1 ] self v [ 2 ] self v [ 3 ] ) ) ; try ! ( write ( f " \r \n " self v [ 4 ] self v [ 5 ] self v [ 6 ] self v [ 7 ] ) ) ; try ! ( write ( f " \r \n " self v [ 8 ] self v [ 9 ] self v [ 0xA ] self v [ 0xB ] ) ) ; try ! ( write ( f " \r \n " self v [ 0xC ] self v [ 0xD ] self v [ 0xE ] self v [ 0xF ] ) ) ; try ! ( write ( f " \r \n \r \n " ) ) ; for ( i , item ) in self . stack . iter ( ) . enumerate ( ) { if * item == 0 { break ; } try ! ( write ( f " \r \n " i item ) ) ; } try ! ( write ( f " \r \n " self i ) ) ; try ! ( write ( f " \r \n " self st ) ) ; write ! ( f " \r \n " self dt ) }
Implement fancy display formatting for the CPU and it's state
Implement fancy display formatting for the CPU and it ' s state
&self
f
&mut fmt::Formatter