Skip to content
Snippets Groups Projects
inst.rs 24.3 KiB
Newer Older
  • Learn to ignore specific revisions
  •     cpu.set_half_carry(false);
        cpu.set_carry(false);
    
        (value << 4) | (value >> 4)
    }
    
    
    /// Helper function for RST instructions, pushes the
    /// current PC to the stack and jumps to the provided
    /// address.
    fn rst(cpu: &mut Cpu, addr: u16) {
        cpu.push_word(cpu.pc);
        cpu.pc = addr;
    }