/* Adds the RegNumber-th register's value to the output buffer, starting at the given OutBufPtr  */
CHAR8* BasicReadRegister(IN EFI_SYSTEM_CONTEXT SystemContext, IN UINTN RegNumber, IN CHAR8 *OutBufPtr)
/* Adds the RegNumber-th register's value to the output buffer, starting at the given OutBufPtr  */
CHAR8* BasicReadRegister(IN EFI_SYSTEM_CONTEXT SystemContext, IN UINTN RegNumber, IN CHAR8 *OutBufPtr)
{
  UINTN  RegSize;
  RegSize = 0;
  while (RegSize < 64) {
    *OutBufPtr++ = mHexToStr[((*FindPointerToRegister (SystemContext, RegNumber) >> (RegSize+4)) & 0xf)];
    *OutBufPtr++ = mHexToStr[((*FindPointerToRegister (SystemContext, RegNumber) >> RegSize) & 0xf)];
    RegSize      = RegSize + 8;
  }
  return OutBufPtr;
}