public void interrupt() {
    switch (dcpu.registers[0]) {
    case ACTION_GET_STATUS:
    	performGetStatus();
    	break;
    case ACTION_SET_SKIP_UNIT:
    	int b = dcpu.registers[1];
    	numberOfUnitsToSkip = ByteBuffer.allocate(8).order(ByteOrder.BIG_ENDIAN).putLong(
    			(dcpu.ram[b]<<48)|(dcpu.ram[b+1]<<32)|(dcpu.ram[b+2]<<16)|dcpu.ram[b+3])
    			.order(ByteOrder.LITTLE_ENDIAN).getLong(0);
    	break;
    case ACTION_TRIGGER_DEVICE:
    	performGetStatus();
    	if (dcpu.registers[2] == 1) {
    		trigger();
    	}
    	break;
    case ACTION_SET_UNIT_TO_SKIP:
    	unitToSkip = dcpu.registers[1] % 4;
    }
	}