public final void checkInterrupts() {
		int intFlags = ioHandler.getRegisters()[0x0F];
		int ieReg = ioHandler.getRegisters()[0xFF];
		if ((intFlags & ieReg) != 0) {
			sp -= 2;
			addressWrite(sp + 1, pc >> 8);  // Push current program counter onto stack
			addressWrite(sp, pc & 0x00FF);
			interruptsEnabled = false;

			if ((intFlags & ieReg & INT_VBLANK) != 0) {
				pc = 0x40;                      // Jump to Vblank interrupt address
				intFlags -= INT_VBLANK;
				//    System.out.println("VBLANK Interrupt called");
			} else if ((intFlags & ieReg & INT_LCDC) != 0) {
				pc = 0x48;
				intFlags -= INT_LCDC;
				//    System.out.println("LCDC Interrupt called");
			} else if ((intFlags & ieReg & INT_TIMA) != 0) {
				pc = 0x50;
				intFlags -= INT_TIMA;
				//    System.out.println("TIMA Interrupt called");
			} else if ((intFlags & ieReg & INT_SER) != 0) {
				pc = 0x58;
				intFlags -= INT_SER;
				//    System.out.println("TIMA Interrupt called");
			} else if ((intFlags & ieReg & INT_P10) != 0) {	// Joypad interrupt
				pc = 0x60;
				intFlags -= INT_P10;
				//	System.out.println("Joypad int.");
			} /* Other interrupts go here, not done yet */

			ioHandler.getRegisters()[0x0F] = (byte) intFlags;
			inInterrupt = true;
		}
	}