/* Transfer Length bytes of memory starting at Address to an output buffer, OutBuffer. This function will finally send the buffer as a packet. */
VOID TransferFromMemToOutBufAndSend(IN UINTN Length, IN unsigned char *Address)
/* Transfer Length bytes of memory starting at Address to an output buffer, OutBuffer. This function will finally send the buffer as a packet. */
VOID TransferFromMemToOutBufAndSend(IN UINTN Length, IN unsigned char *Address)
{
  CHAR8  OutBuffer[MAX_BUF_SIZE];
  CHAR8  *OutBufPtr;
  CHAR8  Char;
  if (ValidateAddress (Address) == FALSE) {
    SendError (14);
    return;
  }
  OutBufPtr = OutBuffer;
  while (Length > 0) {
    Char = mHexToStr[*Address >> 4];
    if ((Char >= 'A') && (Char <= 'F')) {
      Char = Char - 'A' + 'a';
    }
    *OutBufPtr++ = Char;
    Char = mHexToStr[*Address & 0x0f];
    if ((Char >= 'A') && (Char <= 'F')) {
      Char = Char - 'A' + 'a';
    }
    *OutBufPtr++ = Char;
    Address++;
    Length--;
  }
  *OutBufPtr = '\0';
  SendPacket (OutBuffer);
}