pub fn stop(cpu: &mut CPU) -> u8 {
    // Read 8-bit value
    let value = cpu.fetch8();

    if value != 0 {
        panic!(
            "Stop instruction should be followed by a zero but found: 0x{:02X} at pc=0x{:04X}",
            value, cpu.registers.pc
        );
    }

    // TODO - Halt the CPU & LCD display until a button is pressed
    debug!("Stop called...");

    4
}
/// Stop the system clock and oscillator circuit to stop the CPU and LCD controller.
///
/// Stop mode can be cancelled by a reset signal.
///
/// Takes 4 cycles.
///
/// # Examples
///
/// ```asm
/// STOP
/// ```
Stop the system clock and oscillator circuit to stop the CPU and LCD controller.
Stop mode can be cancelled by a reset signal.

Takes 4 cycles.
Stop the system clock and oscillator circuit to stop the CPU and LCD controller . Stop mode can be cancelled by a reset signal . Takes 4 cycles .
pub fn stop(cpu: &mut CPU) -> u8 {
    // Read 8-bit value
    let value = cpu.fetch8();
    if value != 0 {
        panic!(
            "Stop instruction should be followed by a zero but found: 0x{:02X} at pc=0x{:04X}",
            value, cpu.registers.pc
        );
    }
    // TODO - Halt the CPU & LCD display until a button is pressed
    debug!("Stop called...");
    4
}
pub fn stop ( cpu : & mut CPU ) -> u8 { // Read 8-bit value let value = cpu . fetch8 ( ) ; if value != 0 { panic ! ( " " value cpu registers pc ) ; } // TODO - Halt the CPU & LCD display until a button is pressed debug ! ( " " ) ; 4 }
Stop the system clock and oscillator circuit to stop the CPU and LCD controller.
Stop the system clock and oscillator circuit to stop the CPU and LCD controller .
cpu
&mut CPU
cpu
&mut CPU
examples
None