Prints Number of bytes in a row (hex and ascii). Row size is MaxNumber. */
| 18 | |
| 19 | /** Prints Number of bytes in a row (hex and ascii). Row size is MaxNumber. */ |
| 20 | VOID |
| 21 | PrintBytesRow(IN UINT8 *Bytes, IN UINTN Number, IN UINTN MaxNumber) |
| 22 | { |
| 23 | UINTN Index; |
| 24 | |
| 25 | // print hex vals |
| 26 | for (Index = 0; Index < Number; Index++) { |
| 27 | DebugLog(1, "%02hhX ", Bytes[Index]); |
| 28 | } |
| 29 | |
| 30 | // pad to MaxNumber if needed |
| 31 | for (; Index < MaxNumber; Index++) { |
| 32 | DebugLog(1, " "); |
| 33 | } |
| 34 | |
| 35 | DebugLog(1, "| "); |
| 36 | |
| 37 | // print ASCII |
| 38 | for (Index = 0; Index < Number; Index++) { |
| 39 | if (Bytes[Index] >= 0x20 && Bytes[Index] <= 0x7e) { |
| 40 | DebugLog(1, "%c", (CHAR16)Bytes[Index]); |
| 41 | } else { |
| 42 | DebugLog(1, "%c", L'.'); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | DebugLog(1, "\n"); |
| 47 | } |
| 48 | |
| 49 | /** Prints series of bytes. */ |
| 50 | VOID |
no test coverage detected