|
|
@ -8,9 +8,11 @@ void fhexdump(unsigned int display_addr, void *in, int size, FILE *stream) { |
|
|
|
uint8_t *p = in; |
|
|
|
|
|
|
|
while(size>0) { |
|
|
|
int i; |
|
|
|
|
|
|
|
fprintf(stream, "%03x: ", display_addr); |
|
|
|
|
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
for (i = 0; i < 16; i++) { |
|
|
|
if (i < size) { |
|
|
|
fprintf(stream, "%02x", p[i]); |
|
|
|
} else { |
|
|
@ -24,7 +26,7 @@ void fhexdump(unsigned int display_addr, void *in, int size, FILE *stream) { |
|
|
|
} |
|
|
|
fprintf(stream, " |"); |
|
|
|
|
|
|
|
for (int i = 0; i < 16; i++) { |
|
|
|
for (i = 0; i < 16; i++) { |
|
|
|
if (i < size) { |
|
|
|
char ch = p[i]; |
|
|
|
if (ch>=0x20 && ch<=0x7e) { |
|
|
|