Skip to content
Snippets Groups Projects
inst.rs 41.3 KiB
Newer Older
  • Learn to ignore specific revisions
  •     cpu.set_zero(result == 0);
        cpu.set_half_carry(false);
        cpu.set_carry(value & 0x01 == 0x01);
    
        result
    }
    
    
    /// 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;
    }