code: final int writeAsciiByte(int value) throws IOException {
          if (commPort != null && commPort.isOpen()) {
              byte[] buffer;
  
              if (value == ModbusASCIITransport.FRAME_START) {
                  buffer = new byte[]{58};
                  logger.debug("Wrote FRAME_START");
              }
              else if (value == ModbusASCIITransport.FRAME_END) {
                  buffer = new byte[]{13, 10};
                  logger.debug("Wrote FRAME_END");
              }
              else {
                  buffer = ModbusUtil.toHex(value);
                  if (logger.isDebugEnabled()) {
                      logger.debug("Wrote byte {}={}", value, ModbusUtil.toHex(value));
                  }
              }
              if (buffer != null) {
                  return commPort.writeBytes(buffer, buffer.length);
              }
              else {
                  throw new IOException("Message to send is empty");
              }
          }
          else {
              throw new IOException("Comm port is not valid or not open");
          }
      }
docs: Writes out a byte value as an ascii character
  If the value is the special start/end characters, then
  allowance is made for these
  
  @param value Value to write
  @return Number of bytes written
  
  @throws IOException If a problem with the port