23 #define DBG_PROGNAME "ARCH.LIB"
64 dbg_memdump(
const char *Where,
const unsigned char *InputBuffer,
const unsigned int Count)
67 char outputBufferChars[17];
68 char outputBuffer[100];
75 for (i=0; i<Count; i++)
77 p += sprintf(p,
"%02x ", (
unsigned int) InputBuffer[i]);
81 p += sprintf(p,
"- ");
84 outputBufferChars[i % 16] = isprint(InputBuffer[i]) ? InputBuffer[i] :
'.';
88 outputBufferChars[(i % 16) + 1] = 0;
90 i & 0xfff0, outputBuffer, outputBufferChars));
97 outputBufferChars[i % 16] = 0;
99 i & 0xfff0, outputBuffer, outputBufferChars));
Define makros for debugging purposes.
void dbg_memdump(const char *Where, const unsigned char *InputBuffer, const unsigned int Count)
output a memory dump to the debugging system
Define makros and functions which account for differences between the different architectures.