2 Copyright © 1995-2016, The AROS Development Team. All rights reserved.
5 Desc: Prints a hexdump of a memory region
9 #include <aros/debug.h>
11 /*****************************************************************************
14 #include <proto/arossupport.h>
24 Prints a hexdump of the data beginning at 'data'. The format
27 xxxxxxxx: dddddddd dddddddd dddddddd dddddddd aaaaaaaaaaaaaaaa
29 Where x is the address (8 chars hex), dd is a data byte (2 chars
30 hex) and a is the ASCII representation of a data byte or "." if
31 the data byte is not printable.
34 data - Start here with the dump
35 offset - This offset is used as the address in the output. If
36 you give 0L here, then the first address will be
37 00000000. If you give (IPTR)data here, then the
38 first address will be the memory address of the data.
39 count - How many bytes to print.
54 ******************************************************************************/
59 end
= (count
+ 15) & -16;
64 kprintf ("%p:", offset
+t
);
70 kprintf ("%02x", ((UBYTE
*)data
)[t
]);
80 UBYTE c
= ((UBYTE
*)data
)[t
-i
];
83 * isprint() introduces dependency on stdc.library, which
84 * prevents using this function from within KS code.
86 if ((c
> 0x1F) && (c
< 0x7E))