code: @Override
      public ModbusResponse process(DataHolder dataHolder) throws ModbusNumberException {
          MaskWriteRegisterResponse response = (MaskWriteRegisterResponse) getResponse();
          response.setStartAddress(getStartAddress());
          response.setMaskAnd(getMaskAnd());
          response.setMaskOr(getMaskOr());
  
          try {
              int reg = dataHolder.readHoldingRegister(getStartAddress());
              dataHolder.writeHoldingRegister(getStartAddress(), (reg & getMaskAnd()) | (getMaskOr() & (~getMaskAnd())));
          } catch (ModbusProtocolException e) {
              response.setException();
              response.setModbusExceptionCode(e.getException().getValue());
          }
          return response;
      }
docs: /*result = ((reg & and) | (or & !and))