protected void invoke() {
        // Read from registers
        String xAddress = registerStore.readFrom(Register.XA);
        String xValue = registerStore.readFrom(Register.XV);
        String xType = registerStore.readFrom(Register.XAT);
        
        String yAddress = registerStore.readFrom(Register.YA);
        String yValue = registerStore.readFrom(Register.YV);
        String yType = registerStore.readFrom(Register.YAT);
        
        String zAddress = registerStore.readFrom(Register.ZA);
        String zType = registerStore.readFrom(Register.ZAT);

        String result = "0";
        
        switch(OpCode.getByValue(registerStore.readFrom(Register.OP))) {
            case MSK :
                result = doMSK(xValue, yValue);
                break;
                
            case MOV :
                result = yValue;
                break;
                
            case ADD :
                result = Integer.toString(Integer.parseInt(xValue) + Integer.parseInt(yValue));
                break;
                
            case SUB :
                result = Integer.toString(Integer.parseInt(xValue) - Integer.parseInt(yValue));
                break;
                
            case MEA :
                result = yAddress;
                break;
                
            case SHF :
                result = doSHF(xValue, yValue);
                break;
        }
        
        int intResult = Integer.parseInt(result);
        flag.setNegative(intResult < 0);
        flag.setZero(intResult == 0);
        flag.setMemory(zType.equals("0"));
        
        registerStore.writeTo(Register.FLG, flag.getMask());
        registerStore.writeTo(Register.ZV, result);
    }